Is there a way to set the draw distance on Jme?
I tried setting the far frustum to 256 or 1000 and both values give me the same performance.
Also, I don’t want to use Jmonkey LOD because I use geometry batching inside my blender file (not programmatically), therefore LOD would never kick in no matter where in the terrain I’m in. In other words, no matter where I’m at, all the geometries are close to me because they are big. These big geometries don’t cause JBullet performance hugging thought. Moreover, I don’t want to use LOD because LOD doesn’t make geometries disappear completely.
Any technique you suggest would be appreciated.
If you have big giant objects that LOD wouldn’t work for then you have big giant objects that early culling wouldn’t work for.
You can set the frustum far value and it will limit visibility but all of that data still needs to be sent to the card because JME can’t cull the object for the same reasons LOD won’t work.
A big giant object as you suggest will be rendered no matter what. It can’t be otherwise.
Other than that, we don’t know enough about your scene. My random guessing suggests that you have huge high-poly objects and maybe thousands of small objects. If so then you’ve put the worst of the worst together on top of each other.
You know @pspeed I have many files of the same game level. All ranging from few big meshes to many small meshes. My problem is that no matter which level layout I use, I keep getting the same performance. Whether I set far frustum to 256 or 1000 I still get the same performance, no matter which size of meshes I use. And I think/know LODs won’t solve the problem because LODs don’t stop drawing meshes, LODs make meshes smaller but they are never absolute zero. I’ve been trying to solve this problem for two days straight now and it’s not fun to say the least.
All I want my program to do is to behave like when I don’t do .attachChild(myNode);. When I don’t do the aforementioned the performance is boosted by 50% percent. But of course I can not see the level I’m playing, only the physics work in that case (invisible meshes).
jME does nothing different than OpenGL really, you need to adapt the object and poly count of the scene to your needs. The wiki contains a lot of information on how to optimize the scene. General information on OpenGL, shaders, meshes and data transfer is available on the web. As pspeed said, we have way too few information to optimize your game.
Maybe your performance problem is not something that is actually visible? Can you post the on-screen statistics perhaps?
@Momoko_Fan As per request. Here is an statistics screen shot (typed):
Textures (M) = 23
Textures (F) = 18
Textures (S) = 17
Shaders (M) = 8
Shaders (F) = 8
Shaders (S) = 10
Objects = 114
Uniforms = 377
Triangles = 40432
Vertices = 58052
Frames per second: 16
what graficcard do you use, those values should give several hundred fps if there is not something else the culprit?
Google nexus 7 tablet. But my PC is Nvidia gt 9200 (my pc has the power of an XBOX 360).
When on my tablet it just makes 10 FPS. But on my PC is 16 FPS as I said above.
OH SNAP! @pspeed was correct with this “You can set the frustum far value and it will limit visibility but all of that data still needs to be sent to the card because JME can’t cull the object for the same reasons LOD won’t work.”. After I use small objects and then use a small value for the far frustum, it gives me more frames per second (10 extra fps).