Polygon reduction / optimization algorithm

I’m looking around for libraries/code that reduce/optimize a mesh.



I need to do it dynamically within my code for procedurally created geometry, it is in effect a sort of LOD technique I need it for.



I’ve seen a lot of stuff in c++ around, but not much with Java.



Thanks.

Simple do it by hand if possible as the automated require some cpu overhead and generally are not worth it artist wise (as they alter the appearance of objects in a way you cannot influrence in detail)

well yes I could do it myself, but with a lot of head scratching and pain,

it wont affect performance as it’s blocks of terrain being occasionally created as the player moves around.

In any case the performance will be best if you generate that data once and then use it. Since that is so creating that data before actually loading the model in the game is the best option, use the LOD generation of the advanced ogrexml importer to generate LOD levels in your model.z

it wont affect performance as it’s blocks of terrain being occasionally created as the player moves around

If you're using heightmapped terrain, consider using TerraMonkey (jME3 terrain) system.

no it’s all procedurally created on the fly by things such as 3d noise and math - not height fields,

so I have all these wonderful creations, but just need to shave some polys off,

probably best I figure out my own methods or google a bit harder,

thanks anyway.

actually, one way, because i’m creating my initial data with math in boolean 3d arrays - so that ‘1’ means solid and ‘0’ means empty, which then goes to a mesh creation method - I could skip/stride every 2 or 3 elements in the array, which would approximate the overall shape, and then create a mesh from this and scale up…

a bit crude, but it’s a start :slight_smile:

If you’re generating your meshes procedurally then just reduce your sample rate to get less verticies.

yep that’s what i’ve been doing thanks.