PDA

View Full Version : Unify Normals Inconsistency



faulknermano
02-27-2010, 02:31 AM
Hi folks! Wanted to share this to help troubleshoot a puzzle I'm having.

The problem is about polygons not aligning themselves in a (visually) predictably way. This is not really a bug in the Unify Normals / Align Polygons command since the geometry is non-manifold so I don't expect it to work at all. The problem, however, is the apparent inconsistency: sometimes it works and sometimes it doesn't. What I'd like to understand is why it works, and why it doesn't.

Attached are images of a process that I went through to get to the puzzle.

I've also attached the lwo for testing.

If anyone could shed some light why this is happening, it'd be appreciated. Thanks!

faulknermano
02-27-2010, 02:41 AM
The other attachments...

Sensei
02-27-2010, 10:23 AM
Unify Normals/Align Polygons absolute require that one edge is used by just 1 or 2 polygons. In your example it's 3 and more in places where branches are splitting..

faulknermano
02-27-2010, 03:00 PM
Thanks for that; I had figured that my geometry was causing it. But would you know why it works for the end part of the branch, and why it doesn't for the parts that are in the middle? Point order of polygons, maybe?

Sensei
02-27-2010, 04:20 PM
Unify Polys is probably using similar thing like Select Connected- check first selected polygon, then find all edges, check whether second edge polygon is selected- if so, it's pushed to stack and normal is fixed.. Then repeat with all edges.. Fixing normal is done by just reversing point order, from last to first. Polygons are pushed/popped from stack until it's empty.

This method will work as long as edge has just 1-2 polygons, 3 or more, won't work- routine can't know what is inside and what is outside of object. Your split branches are either inside and outside at the same moment.