LOD seems broken

When I do this (the level2.j3o was converted from level2.scene):

[java]
sceneModel = (Node)assetManager.loadModel(“Models/level2/level2.j3o”);
sceneNode.attachChild(sceneModel);
[/java]

my game loads with no problem.

But when I do this, this node never shows up on the screen:

[java]
sceneModel = (Node)assetManager.loadModel(“Models/level2/level2.j3o”);
for (int index = 0; index < sceneModel.getQuantity(); index++)
{
Geometry sceneModelGeometry = (Geometry) sceneModel.getChild(index);

        LodControl lodcontrol = new LodControl();
        sceneModelGeometry.addControl(lodcontrol);
        sceneNode.attachChild(sceneModelGeometry);
    }

[/java]

Which means the ogre exporter doesn’t export LODs for scene files. Is that correct?

I’m aware that one can convert .xml to .j3o with LOD level inside blenders but that kills my productivity from 100% to 1% which is really annoying. I other words I have to convert manually each of the hundreds of objects in my scene.

Edit: after reading the level2.scene.xml file I notice that it doesn’t indicate anything about LODs. The same for the level2.scene file.

Well if you use blenader i would suggest another pipeline anyway.

blend -> import -> create material -> generate lod -> save.
(all of those steps can be mostly automated if you have a strict anming convention for the textures and similar)

Lod levels have to be generated, adding a lod control is not enough. You can do it when converting xml to j3o as you said.

I added last week a LodGenerator that allow you to generate the Lods inside JME.
I invite you to read the javadoc.

@nehon This should do the trick http://hub.jmonkeyengine.org/forum/topic/brand-new-lod-generator/. XD

Where can I get the LodGenerator class? It is not even referenced here http://hub.jmonkeyengine.org/javadoc/.

I don’t see the LodGenerator class on the nightly builds either in the plugins tab on JMonkey.

As per @Empire Phoenix. What are you saying? I follow your steps but I never get to a point where I set the LODs. Are all the steps you mentioned happening inside JMonkey engine?

Its in the svn version, or in the nightlys.

Wht i mention is to write yourself a small batch converter, that does all necessary steps. (Or alternativly do them by hand depending on the amount of models you use)