Need Advise about geomtry creation

Hi All,

I’m using JME 3 to implements minimal-memory abstraction pathfinding as describe in this paper, and need to draw abstraction visualization. I have two options in JME 3 using Line shapes and optimizing with GeometryBatchFactory or create abstraction visualization with Custom Mesh. But, we need your advise which one should I use for fast performance in order to get best frame rate ?



If you are creating the mesh on the fly (i mean adding vertices to it on each frame), GeometryBatchFactory is not a good option, because you’ll have to recreate the entire line system on each frame and, this will yield not so great performances.

Also I’m not sure you can add vertex to an existing mesh, because the size of the buffer is predefined, but I guess it would be faster even if you have to regenerate the mesh on each frame.

If you are creating the mesh once in a while, using GeometryBatchFactory could be a better option, because it will be a lot simpler, and you won’t have to bother with mesh buffers etc…

According to your explanation , I think I’ll try to use GeometryBatchFactory because I creating the mesh once while application startup since the abstraction algorithm is in pre-processing phase. By the way, thanks for your bright explanation and advise.