Mesh simplification (decimator)

Is it possibile to simplyfy meshes in jme3?

If yes: how? :smiley:

If no: do you know any java libraries that could be of use?

You can use the LOD generator in the SDK and set a LOD level and grab the mesh if you need it or just use that LOD level.

Is it possibile to use it from code? I have procedurally generated mesh on runtime.

The Lod Generator doesn’t change the mesh though it just create additional Index buffers. You’d need additional operation on the buffers (position, normals, texcoord…) to keep only relevant data.

@Neomex see LodGenerator.java

@nehon said: The Lod Generator doesn't change the mesh though it just create additional Index buffers. You'd need additional operation on the buffers (position, normals, texcoord...) to keep only relevant data.

@Neomex see LodGenerator.java

But by using an optimized index buffer as a base, that is pretty straightforward, copy all used vertices from indexbuffer, and remap the positions to the new with a hashmap in the indexbuffer then.