how to fix black normals after boolean? SOLVED

   4790   6   0
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm making a rock generator that uses booleans. I noticed some black vertices at some places and I would like to know how to easily fix this.

It looks like the triangulation inside the quads can get flipped after a boolean.

-Olivier
Edited by olivierth - Feb. 26, 2019 14:35:07

Attachments:
black_normal_problem.JPG (77.8 KB)

User Avatar
Staff
3455 posts
Joined: July 2005
Offline
Normal SOP
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
1004 posts
Joined: April 2017
Offline
The normal sop set to Each Vertex Equally fixes that problem but it doesn't preserve the hard edges I had. Changing the cusp angle never give a perfect result.

I have an edge group that highlights all the edges that should be hard edges. Is there a way to use that group to affect my normals?

-Olivier
User Avatar
Member
1004 posts
Joined: April 2017
Offline
…I used a second normal with the edge group. It sets the nomals just right except I get the same black vertices again…
User Avatar
Member
1004 posts
Joined: April 2017
Offline
SOLVED

It took a few SOPs but I fixed it. I used:

1. a Divide sop with max edges set to 3 (triangulates mesh and makes sure I don't have 5 sides polygons)
2. a prim wrangle to activate @N
3. an attribute promote sop to transfer prim normals to vertex
4. A normal sop set to 180 (vertices, by vertex angle)
5. Another normal sop using the edge group abseams coming from the booleans. Set to vertices and cusp angle set to zero

…I don't fully understand how it fixes the problem but it works perfectly!

-Olivier

Attachments:
black_normal_problem_fixed.JPG (96.4 KB)

User Avatar
Member
7749 posts
Joined: Sept. 2011
Offline
Putting the normals sops (set to vertex) before the boolean is all it takes.
User Avatar
Member
1004 posts
Joined: April 2017
Offline
That doesn't work since I have to deal with the cusp angle. I only want the abseams of the boolean to have a hard normal transition. If I put a normal to 180 my abseams end up looking smooth (should not) and if I set it to 0 my smooth surfaces look sharp/faceted (should not).

What I'm doing is passing a sphere in a foreach loop with a numbered iterations and using each result to feedback on the next iteration. Each pass booleans one side of the sphere. I tried using the normal sop on the A and B geos connected to the boolean and I can't get a good result no matter the settings.

-Olivier
  • Quick Links