Hello,
I’m currently tryinbg to create a small tactical game based on a lego theme. Something with the look of minecraft (ie cell-based), and the gameplay of UFO… This is purely a personnal project to learn and have fun trying some ideas. However, i’m having a problem with the scene optimisation.
The same scene, represented on screen with different level of detail, always gives me the same fps. Having 580000+ triangles or only 28000 does not matters.
Since my hardware id quite old (2005), may it be that i’m CPU/GPU bound ?
The scenes exemples can be found on my site.
Regards
Guillaume
How many objects do you have ? that is probably the real bottleneck, for explanantion search the forum for any mincraft clone thread
@EmpirePhoenix
I got around 22000 objects.
The cells are regrouped into blocs of 10102 elements, to facilitate culling. It seems i get around 25-30 groups that are totally or partially on screen.
Since the cells can be modified at any time and i need to be able to get ray-intersection with individual cells, i didn’t use the batch factory (yet).
Regards
Guillaume
Well there is your problem the render calls are limitng, since oyu have way to much objects, ( try to stay around 3k)
Check out our http://code.google.com/p/bloxel/source/browse/trunk/bloxel/src/main/java/de/bloxel/world/PreviewTerrainChunkImpl.java#132 we using the GeometryBatchFactory to merge same geometries to reduce the object count in the scene … this would boost your performance
Thanks for the answer, EmpirePhoenix
if its the render call that limits me, then can i create a pseudo root-node, that is not linked to the root node, to perform ray intersection (since the intersection check ask for a node), and use a geometry batch to get the terrain as one object (linked to the real root node) ? This would be akin to have a display model (the batch) and a “true” model to perform the checks…
This should limit the number of object to render…
Regards
Guillaume
This would certainly help.
I don’t know how intelligent the jme ray works, but you might be able to further optimize, by only ray testing possible canidates, (only the ones in front of you or similar) due to the block based world this should be possible relativly fast).
I’m going to try this this evening, just to check.
As for the JME Ray, it seems to be pretty advanced. I currently get no lag between click and camera movement (using my own camera control).
thanks for the input
Guillaume