Ogre mesh and jme3 problems

I several times tried to import several different .mesh or .mesh.xml files using the build in importer but all of them give me unknown exception errors. How ever i am successfully open end render these mesh models using ogre and c++ (with textures etc…). I wonder if alpha 3 release importer is buggy or i am doing some think wrong.



Note. sample models loads successfully.

Without any error logs or access to the models you mention we can also just sit and wonder.

Now i am able to get the mesh working. However i cannot load textures (several .dds format bitmaps) which i exported using ogremax 3d max plugin and put them in to the same directory (material file does not specify a directory therefore i assume i should put them in to the same directory as mesh. What should i do to load the textures in to my model.



Note: i have already read the tutorials, however i still can not figure out.

Thank you

If you cannot get them to work with the exporter, just create a new j3m file based on lighting.j3md and apply that to the geometries (see example video in wiki).

the name of the material file must be the same as the mesh file

material and the mesh file names are the same. Also i am getting the following warnings.



Material018: one_minus_src_alpha

08.Ara.2010 22:57:05 com.jme3.texture.plugins.DDSLoader loadHeader

WARNING: Got 7mipmaps, expected8



many of these (i think i have 14 materials in material file)

May I ask why does the name of the material file have to be the same as the mesh file? The new blender to ogre xml exporter (2.5) does not name the material files the same. Thus jME doesn’t find any of the materials when loading a scene exported via this tool. For simple models, this is not a problem, because I can manually rename a material file. But for scenes that have many meshes, I don’t intend to rename them all manually (or split a single file containing multiple materials into multiple files).



Is there a solution for this?

thegamerm said:
08.Ara.2010 22:57:05 com.jme3.texture.plugins.DDSLoader loadHeader
WARNING: Got 7mipmaps, expected8


It looks a problem when loading the dds textures. Play with others texture extensions, png for example.

If you use a .scene file then the .material file will have the same name

1 Like

Thanks, the trick was to untick the “Separate Materials” checkbox.

frog said:
May I ask why does the name of the material file have to be the same as the mesh file?

Because the mesh file does not save the material name and theres no other way to corellate the two.
normen said:
Because the mesh file does not save the material name and theres no other way to corellate the two.

If you take a look at the .mesh.xml format DTD here, you'll see that the submesh element does define a material attribute and the ogre exporter seems to be using this attribute.

Indeed, I agree if the submesh material attributes could be used. It would also greatly simplify dealing with the scenes which have several meshes, each using a different material.

That is an internal name, it does not hint at the .material file name. There could be X.material and Y.material file both containing a material with that name.

Oh well - bad luck here. On the other hand, it is amazing what those discussions can lead to… I have just discovered that the blender2ogre export plugin has this option that is by default turned on, see the “Separate Materials” option, just turn it off and all materials are going to appear in the material file named after the scene :slight_smile:

Yes, when exporting scenes you obviously have to export the material file with that option, not just with a single mesh as that material file will only contain the materials of one model.