Scale functionality in OGRE format?

So Momoko has brain washed me enough and the Collada exporters available for Maya on the mac aren't the greatest, so we're looking into other formats to support in the project.



So, does OGRE have any way of storing real world scale like "1 meter = 10 units" or something like that?  Collada has this built in and the Maya obj exporter sticks the exported coordinate scale in the comments…  Just looking for something similar in mesh.xml (or .scene)

yes the ogre format has scale information (its an attribute of the scene xml node). Bad news for you is that ogremax exporters (for Maya) only work for maya in windows, not on mac.

sbook said:

So Momoko has brain washed me enough and the Collada exporters available for Maya on the mac aren't the greatest, so we're looking into other formats to support in the project.


What's wrong with the Maya exporter? I mean, it can't be worse than the blender one!
dhdd said:

yes the ogre format has scale information (its an attribute of the scene xml node). Bad news for you is that ogremax exporters (for Maya) only work for maya in windows, not on mac.


Some days you just can't catch a break :p

pgi said:

What's wrong with the Maya exporter? I mean, it can't be worse than the blender one!


I haven't had to do much with Collada coming from Blender, but OpenCollada (which works on OS X) does really strange things with UV coordinates it seems

Can you post a sample model exported in collada format from maya on osx, involving texture coordinates? The models i'm testing right now are the ones found on the collada site or models i build with blender, it would be interesting for me to look at different sources.

It's not just OS X, but seemingly anything that used OpenCOLLADA…  In any event, I'll do a simple model and get it up this weekend from the Mac :slight_smile:

Sorry it took so long to get back with the files :confused:



Anyway, I'm uploading a zip with the png texture, the .dae, and the model from Maya 2011 (its a Maya ASCII, you should be able to just change the version in the file and it will open for you)



When loading it into jME2, I just get a grey material and no texture

The dae file is ok. What is peculiar is the fact that instead of referring to a sampler2d node, the texture element points to an image element and defines a custom technique to apply that image. I don’t know the details of the JME2 parser but maybe it misses the image (sometimes the spec says “the element A contains B or C” and the following example shows that it can really contain anything from B to Z and more than once).



I don’t have maya so i dont’ know how the model looks. The jme3 plugin shows me a horrible figure:







but this maybe due to some UV madness (i have a slight problem with texture mapping and a gigantic one with animations).



I question i have is: how to translate measuring unit in JME? The dae file says that 1 unit is 0.01 meter. Does this mean that i have to “scale” things according to that value, assuming 1 = 1m in the engine (and the the box will be 31.07 jme-unit tall instead of 3107)?

Nope, that's correct…  The png has a transparent background though, which doesn't seem to be reflected there.  The coordinates look correct :slight_smile:



I keep Maya set to 1 unit = 1m, but that usually results in the scale factor in the dae being 1:1…  The box should be 31.07 jME units high

I see that the diffuse component is being linked to the texture, but the transparent component is also linked to it. So yes, the collada file does specify that the texture should be used for transparency.

Lack of transparency is due to the current implementation of the LambertMaterialGenerator in the plugin:


    public void setTransparentTexture(Texture get) {
   if(get != null) {
       Todo.implementThis();
   }
    }



Most of the material stuff is just a placeholder for the real implementation.