# creating mesh with low polygon count

if i have given a mesh, how do i create mesh with lower LOD/ low polygon count? i don’t want to use any tool. I want to implement it in my code.

I’m not really a modeler, but I’m pretty sure all modeling programs have a way of reducing the poly count. Although, in my limited experience this is a bad idea. Where your vertices are placed is not a decision best left up to machines.

If you just need to get your vertex count down for a test or something Blender has the Decimate modifier.

Otherwise, you’re probably going to be removing the extra vertices by hand. This YouTube video describes how to do it in Blender. You can probably google something like “Blender reduce poly count” and find something for whatever modeling tool you are using.

The best option is to model it with the right number of vertices in the first place, save that version, and then increase the vertices if you need a second version that has a lot more vertices and save that version. You can create normal maps and such this way.

You could implement something like Decimate in your code, but there’s a reason modelers don’t use Decimate. You could remove every 3rd vertex. You could merge vertices that are within a certain distance of one another. Regardless of what you do programmatically, I believe you will find the results to be absolutely horrible. If aesthetics aren’t a concern, then something like this might work. But if you are determined to do it, I would study how modeling programs do it with options like Decimate and Dissolve.

Thank you very much

MeshLab would be a good tool, but …

a psoudocode algorithm i would try:
0. consider 1 vertex

2. calculate the normals for those faces
3. calculate the angle between adjacent normals
4. if (all angles < threshhold) delete vertex (and fix adjacent faces)
the smaller the “threshhold angle”, the less vertices will remain

Is it possible that concave polygons could result from this approach?

a psoudocode algorithm i would try:
0. consider 1 vertex