I am a leaf on the wind (of topology)

 An update on my previous post about holes in the skin modifier.

I have made some significant progress on fixing these holes by applying various tricks to the topology using BMesh. The image at right shows a quick test that would have failed quite badly before these changes due to the four frames that sit partially inside the branch vertex’s convex hull. The new result gives a proper manifold mesh in this case, which you can see better in the lower subsurf’d version.

There are plenty of cases that still fail, but I believe I’m on a good track to fix many of these in a fairly generic way. Since this code is still very much in flux it’s not yet in my github branch; will post another update when that changes.

My immediate goal is to make it impossible to generate a non-manifold surface with the skin modifier. That will address 90% of the problem. Once that’s ready though, I’m wondering about the possibility of running further passes to clean up the topology. The “limbs” generated by the skin modifier already have really nice simple topology, just long lines of quads. While the branch node areas are inherently less “nice”, it might be possible to do a better job of relaxing the polygons in those areas, perhaps avoiding too much variance in the sizes of polygons, merging long skinny triangles, and turning ngons into quads. For now this is just ideas, not sure how it’ll pan out.

Another concern is symmetry. I expect that for most cases, users will want their skins to have symmetry across one of the axes; the current code attempts to generate symmetric quads (which is already flaky), and the problem gets even worse once these weird branch node topologies are allowed. Still pondering how best to address this issue, will post more when I figure something out.


I’ve pushed some of the new code to github. This update contains only the code for improving connected-ness, none of the fancier relaxation/symmetry ideas mentioned in the last two paragraphs above.

There are still cases that can fail (you may see printouts in the console like “no good face found” in these cases), so still more work to do here. It should now at least be significantly harder to create non-manifold meshes.

4 thoughts on “I am a leaf on the wind (of topology)”

Leave a Reply

Your email address will not be published. Required fields are marked *