Hi how to automatic invert normal.

   1699   1   0
User Avatar
Member
7 posts
Joined: Oct. 2013
Offline
Hi, how to make automatic invert this normal without selecting by hands, or how to blast it by inverted normal. thx
Edited by Stalevarov - Jan. 21, 2021 11:16:01

Attachments:
quesr.png (882.4 KB)
test.2.bgeo.sc (2.1 MB)

User Avatar
Member
40 posts
Joined: Aug. 2018
Offline
if, like it seems to be the case from your screenshot, the majority of your primitives have correct normals, and you want to just correct the "few" inverted ones, then you can simply use a Clean SOP node with the option "orient polygons" checked. Unless you have some really messed up geometrym, it will work.

And after that, if you want to delete the initially inverted normals, then I'd add a primitive wrangle after that. first input from the output of clean node, second input from the output of your node before Clean/initial geometry (as long as both input get the same prims numbers, and order); with this code, for example:

vector normA = prim_normal(0,@primnum,0.5,0.5);
vector normB = prim_normal(1,@primnum,0.5,0.5);

if (normA != normB)
    removeprim(0,@primnum,1);

.
Edited by Herve - Jan. 23, 2021 18:02:01
  • Quick Links