PDA

View Full Version : creating mesh with low polygon count



debonair
05-11-2016, 09:14 PM
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.

BBeck1
05-12-2016, 04:55 AM
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 (https://www.youtube.com/watch?v=ttU6Gz1W0Xw) 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.

InsTreet
05-13-2016, 03:05 AM
Thank you very much

john_connor
05-13-2016, 05:59 AM
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.

MeshLab would be a good tool, but ...

a psoudocode algorithm i would try:
0. consider 1 vertex
1. get all adjacent faces
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

Carmine
05-13-2016, 07:38 PM
a psoudocode algorithm i would try:
0. consider 1 vertex
1. get all adjacent faces
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?