Advertisement

Voxel meshes and degenerate triangles.

Started by July 20, 2018 05:06 PM
2 comments, last by Gnollrunner 6 years, 1 month ago

So I'm running into this problem that I sometimes get little sliver polygons when generating meshes with marching prisms.  After thinking about it, it's even possible to get single point triangles. The main issue is when I try to calculate normals for such triangles, it's basically inaccurate or sometimes even impossible.  I came up with this idea (which I'm sure it's not new) of simply collapsing one edge of any triangle where this happens.  This would necessarily destroy the triangles on the other side of the edge as follows:Collapse.jpg.694adfe6ddc7cc509f9dc61e886d7fe3.jpg

I think this should work OK but before implementing it I was wondering if there was some other standard way of doing this, especially when dealing with marching cubes or algorithms of that nature.

I tink this https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification has been implemented with the same application in mind (marching cubes results), IIRC.

 

Advertisement

Thanks, but I just realized I can't use any kind of edge collapsing because it will mess up the interface between chunks. However since my voxels are explicit and non-uniform anyway, I think I'm going to try to just perturbing corners of any voxels who's values are at or near zero.  Hopefully I'll get a better mesh up front and I won't have the issue.

This topic is closed to new replies.

Advertisement