Ogre export or Model problem?

Okay, so this all started with a simple model import. We were excited that the designers were able to lower the models vertex count to under 6000. However, when I try it out in JME, it says there are 9000 triangles and 14000 verts. Their are going to be at most 4 on the screen at once, so this won’t do.

I look around to make sure my ogre exporter is doing it’s thing (which I, by know means, know how). All I know is that I get a material, a mesh, and a skeleton, and then in JME I right click the mesh to convert it into the j3o file. However, it seems that the exporter I’m using runs the ogreDotscene.py Is this correct? I downloaded the blender2ogre exporter, and it says it autoinstalls, but I don’t know which one i’m using anymore…

If none of this has to do with the ogre, then is there something in the model that needs to change? It’s 1 material, multi-textured model. Any more information I try to give may mark me as a liar, so if any more specific info is needed, ask away. I’ll then ask my designers and get back to you with answers.

Smooth or flat shading?

Why, hello again, zarch :slight_smile:

“Fairly certain it’s smooth” says one of the designers.

I just did some preliminary exporting on a model with 436 vertices in Blender (no animations):

Smooth shading:
Blender importer: 436
Ogre exporter: 436
OBJ exporter: 436

Flat shading:
Blender importer: 2604 (this is more than double the others)
Ogre export: 1127
OBJ exporter: 952

These stats were taken from the scene explorer in the JMEDK

Hmm, well I wasn’t sure what is was earlier, but this time, I specifically clicked smooth and then exported it, and still the same results.

Plus, can I know if the way I’m doing this is right? I select the model, export it from blender into my models folder in JME. I get 2 skeleton files (one .xml) 2 meshes (1 .xml) a scene file, a texture.png file, and a material file. Then, I have to rename the material to match the mesh file, and I export the mesh.xml to the j3o.

I have a feeling this is too complicated, or not right in some way…

Should I share the file too?

I always directly import .blend to .j3o using the SDK so I’m not sure about via the ogre route.

Quads in blender need to be triangulated to import them.

Flat shaded vertexes need to be split into one vertex per face as the normal needs to be different on each vertex.

They are the two most usual causes of an increase in vertex and/or face count during imports.

Okay, so I tried just sticking the blend model in the assets folder and then converting it. It messed up the material, but the vertices were good (about 6000) although with 9000 triangles… However, I could not add a listener to the anim control–it gives me a null exception. Does the conversion take out the ability to add listeners to the control if there are no animations in the model?

Then, I tried using the SDK’s import feature and I didn’t get anything better. Plus i couldn’t attach the listener to the anim control too.

And I’ll forward that info to the graphics team.

Okay, triangulated, not much help. However, I removed the UV map and BOOM down to 6000 vertices. I got the idea to check this from http://hub.jmonkeyengine.org/forum/topic/exporting-from-blend-to-ogre-xml-creates-duplicate-vetices/

Could I be having the same problem? If so, how do I tell my guys how to fix it? Is following the UV Mapped Textures portion from https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender all it takes, or are we missing something?


Oh, and I we are using blender 2.6.4, but I am only on the stable version of JME 3. Should I move to the nightly?

Well, triple post, but that’s cuz this in big news.

Simply updating the driver (like other threads suggested…) boosted the fps of 4 models hitting 51,000 vertices (the UV maps still add unnecessary vertices) my fps is 150-200 fps. So that problem is now closed.

But for the UV maps, one final question. The original model was 48,000 vertices, and then we had someone work on it to cut it down to 6000. However, the UV map was made for the original 48,000 mesh. Could it be that because the original UV map no longer matches the coords of the new 6000 vertex mesh, the Ogre exporter (since that’s the once that seems to give me no problems) creates new vertices for most of the points in the UV map?

Honestly I don’t know how the ogre exporter works for UV - but it could be something like that. Try and unwrap the model as one continuous sheet with just a few seams - as each seam will increase the number of vertices. (Seams are where vertices need different uv maps for the texture each side of the seam).

Basically for 1 vertex in blender to be 1 vertex in JME then every property of the vertex needs to have 1 value only (i.e. normals, uv mapping, co-ordinates, etc). If the vertex has more than 1 value then it needs to be split into multiple with each one having one of the different values from blender.

Smooth mapping makes the normals be the same, how you do the UV mapping controls that, etc.

Okay, thanks for the info zarch. The UV mapping issue is lower on the priority list, now that the fps is normal (or perhaps awesome?). But I’ll tell my guys that to make sure they still remember to fix that when they’ve got nothing better to do :slight_smile:

Blender counts the number of vertices differently than how jME3 does it, both applications send the same amount of data to the GPU in the end though.

So, are you saying that even though blender reports 5900 vertices with the UV map and jme reports 13,000 vertices with the UV map, the same data is essentially being rendered?

Then, in that case, if a main character with UV map should come to around 6000 vertices, does one plan to make a model that without UV is only, like, 3000 vertices? Isn’t that a little too little?