Improving FPS through LOD

I have a floor with a lot of characters and objects moving around ( I am talking about more than 2000 characters moving around). So I am having around 5 Million vertices (3 Million triangles) which is killing my FPS.



In order to optimize I decided to go with the LOD approach. Most of the wiki examples are jme2 related so not sure how to do it.



I noticed from the TestLodStress.java example how to do it but the object was a mesh.xml while all mine are in .obj.



is there a way around that?



thanks

The overhead is from the nodes. Having 2000 nodes even with 1 vertex is gonna be slow.



You can use geometryBatchFactory.optimize for your static maps to increase speed.



.obj files don’t have animation, so how are they characters.

.obj files don’t have animation, so how are they characters.


Well my animation is really through moving them around and rotating them. So I thought .obj might be the way to go. What should I switch to?

You can use geometryBatchFactory.optimize for your static maps to increase speed.


I put this in my init() code and nothing happened:
[java] jme3tools.optimize.GeometryBatchFactory.optimize(rootNode);[/java]

You can’t optimize the root node… and anyway, once you’ve optimized the geometry in that way then you can no longer move them.



BatchNode allows you to batch the child nodes while still being able to move and rotate them, etc… though I’m 99% sure it doesn’t support LOD as is.

Just to avoid cross posting, this topic has been continued here:



http://hub.jmonkeyengine.org/groups/general-2/forum/topic/creating-floor/?#post-165805



I tried using BatchNode but didn’t work as well as I wanted.