Ogre3D Mesh.XML Importer

That's mighty nice!

Hi all,



I  exported my model from Maya2008 using the Ogre exporter to mesh and material file. I converted mesh file with OgreXMLConvertor to xml file. I placed all the files with texture files (jpg) into my source folder and I tried to load the model in jmonkey. Everything is working good without any error and I can see the model nicely but there are just colors instead of textures. It seems like there is used a kind of main color for each texture. Could anyone give me an advise how to see textures properly?



try {
           
            SimpleResourceLocator locator = new SimpleResourceLocator(OgreTest.class
                                                    .getClassLoader()
                                                    .getResource("models/ogre/"));
            ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_TEXTURE, locator);
            ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MODEL, locator);          
        } catch (URISyntaxException e1) {
            log.warn("unable to setup texture directory.", e1);
        }

Perhaps no texture coordinates were exported?

Are you specifying a material list to the OgreLoader? Look at the example on how to do it. Also it might be an issue with the material loader, which is a bit limited in features right now. Can you post the material file of the model?

Hi,



here is my material file.



Andrej

Seems fine to me. There are a lot of extra statements like scale 1 1, scroll 0, rotate 0, etc. but the importer should ignore those. There are 3 floats used for emissive and specular, the importer prefers 4 floats. I think the first version had issues with slashes as well. All those problems are probably causing issues in the materials and cause the issues you have.

New version out. Should fix some bugs mentioned in the thread and possibly other minor issues. Has the aforementioned simple attachment point support, see the example for usage.

I’m so sorrry to ask too basic question  :frowning:



This importer seems to read ogre xml file, but I can’t export xml from 3DS max.



I exported max modeling file by plugin OgreMax Scene/Mesh Exporter http://www.ogre3d.org/wiki/index.php/OgreMax_Scene/Mesh_Exporter

but doesn’t export xml



And tried 3DS2Mesh http://www.ogre3d.org/wiki/index.php/3DS2Mesh

It exports material file, but mesh file isn’t xml format and can’t be used.



What plugin can be used in 3DS max?  :?

Please pick one for me

I can't use hardware skinning.

Where can I get the jME2 patch for setUniform(Matrix4f[]) ?

I know many people need this functionality.

It should be patched to jME2 trunk!  :slight_smile:

Yeah sorry about that about the hardware skinning thing, though I didn't notice much improvement on my machine to be honest. If you have a regular .mesh file (not XML), you have to use the commandlne tool OgreXMLConverter to convert those files to mesh.xml for use with the OgreLoader.

See this page: http://www.ogre3d.org/index.php?option=com_content&task=view&id=413

Download the "Ogre Commandline tools", they are currently available for Windows & MacOS.

I always thanks for your kind answer  :slight_smile:

I added blending support and fixed the material loading a bit. I am planning on fixing the export to jME binary.



Anybody has suggestions? What kind of features are you looking for in a universal art pipeline?

I am curious is the link on the first page the updated version or do I have to get it from svn and if svn  is it a sub-project, what exactly am I looking for

The link on the first page is the latest "release", it is not suggested that versions in SVN are used…

thanks man :slight_smile:

I'm trying to use poses, but it seems the loader expects a different format than the format I get from my exporter (oFusion, then OgreTools to get it to the .mesh.xml format).



In particular, the poses are exported into the tags <poses></poses>, and inside them <pose></pose> are used to describe the poses. This part is successfully loaded by the loader, but then it expects to see an <animations> node, with <animation></animation> describing some information about the pose:



// In ogreloader.java
Node posesNode = getChildNode(meshNode, "poses");
      Node animationsNode = getChildNode(meshNode, "animations");
      
      if (posesNode != null)
      {
         List<Pose> poseList = MeshAnimationLoader.loadPoses(posesNode, sharedgeom, submeshes);
         
         if (animationsNode != null)
         {
            MeshAnimationLoader.loadMeshAnimations(animationsNode, poseList, sharedgeom, submeshes, animations);
                                // Which expects to load a list of <animation></animation> nodes that correspond to the loaded poses
         }
      }



My exporter does not create these nodes. I suppose the problem is that different exporters for some reason export slightly differently? Momoko_Fan, could you perhaps say which exporter you used? Or help in any other way...

Thanks :).

Does this load the "Ogre3D export" from Freeworld3d?

Trussell said:

Does this load the "Ogre3D export" from Freeworld3d?

No. The Ogre3D export in freeworld3d apparently exports a certain ini file that one of the Ogre3D terrain managers can load. This importer is for Ogre3D mesh.xml models only.

I'm glad to hear that. I've been working on a Freeworld3D importer and was going to be quite upset if somebody had it out this whole time.

So anyone successfully used poses? I still haven't solved my problem :frowning: