How to show a big scene on android? There are 4 millions of triangles or more

Hello everyone:

I have trouble in using JME3 to handle a big scene on android, in the scene there are 4 millions of triangles or even more than 10 million.

I tried to add all the triangles to the scene divided into several times, and the OOM appeared at last. Then I found that in the function “GeometryBatchFactory.optimize(childNode);” , there has used “Buffer” in it, and not release the buffer, when I want to add more triangles, the OOM appeared. Now I can show 1 million triangles in my scene.

What I want to do is after I moved the data to the GPU, I can release the buffer and move the next data to the GPU, and release … In this case, I want to show a big scene in my android phone just like what I did in using the OpenGL ES.

In order to show a big scene on android, what should I do? Is there any solution?

Thank you very much!

Isn’t it easier to simply generate the buffers yourself instead of relying on GeometryBatchFactory?
Also creating and releasing buffers each time is probably not the best idea. Modifying an existing buffer might work a bit better.

Could you explain it clear to me? Thanks. What do you mean that I should generate the buffers by myself and modify the source code of JME? If true, I think it’s a little difficult for me. Is there some simple method to let the scene what I want to display on my phone?

The reason why I use “GeometryBatchFactory” is that it can make my scene refresh in a high fps. So is there any other method can replace it?

Thank you very much.

You probably would want to create custom meshes:
http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:custom_meshes
You don’t need to modify the source code to do this.