3
$\begingroup$

Is there a way to recalculate the face orientation (normals) of an object so they all face outwards?

I basically want to select the faces that are flipped (red color) so I can add them to the selection of the flip faces node in geometry node.

So that at the end I can achieve the same result of using bpy.ops.mesh.normals_make_consistent

Screenshot

$\endgroup$
5
  • 1
    $\begingroup$ I don't understand this question. The lines you instantiate here (and which, by the way, you could instantiate at the points you could better achieve with Mesh to Points), they all point outward. Other than that, I just see some missing faces here. Can you please be a little more specific or rephrase the question? Thank you & welcome to BSE! $\endgroup$
    – quellenform
    Commented Oct 9, 2022 at 8:46
  • $\begingroup$ the missing faces are flipped I want them to face the direction of the other faces. $\endgroup$ Commented Oct 9, 2022 at 12:04
  • $\begingroup$ also forget about the instance lines on points, that was just for me to visualise normals $\endgroup$ Commented Oct 9, 2022 at 12:05
  • $\begingroup$ I would suggest you take a screenshot of the whole node tree or share your blend file with us to avoid further misunderstandings. Thank you! $\endgroup$
    – quellenform
    Commented Oct 9, 2022 at 12:10
  • $\begingroup$ all done, hope the question is clear and the file can be downloaded in the link above. hope you can help me to solve this problem. let me know if the question is not clear. (I basically want to select the flipped faces (the one in red) $\endgroup$ Commented Oct 9, 2022 at 12:23

1 Answer 1

3
$\begingroup$

The following solution works in this case, but may fail with more complex meshes.

First you would have to define somehow where the inside and the outside is.

You can do this by using the node Attribute Statistics to determine the center of the geometry.

By subtracting the position of the individual points of the mesh from this position, you get the direction vector to the respective point.

If then the dot product of this direction vector and the face normal is greater than $0$, then the face is obviously pointing in the wrong direction:

enter image description here


(Blender 3.1+)


Update:

In your special case, however, you can use this technique, but you would have to apply it at a different place in the node tree.

Since you have two different objects here, which you process with Mesh Boolean, you would have to compare the normals of each of the two objects with those of your additionally created mesh and apply them with Flip Faces.

Something like this:

enter image description here

enter image description here

$\endgroup$
6
  • $\begingroup$ it only work in some cases. someone also suggested me to use the Raycast node. $\endgroup$ Commented Oct 10, 2022 at 4:08
  • $\begingroup$ here is the scene I'm working on in my case as you can see this method doesn't work. the problem is that every time the boolean rebuild the curve it changes the direction of it and so the face normals. maybe something can be done to make the curve have always the same direction. Here is the link $\endgroup$ Commented Oct 10, 2022 at 4:12
  • $\begingroup$ @GiuseppeBufalo I looked at it again with your specific example, and added to the post accordingly. Good luck! $\endgroup$
    – quellenform
    Commented Oct 11, 2022 at 9:10
  • $\begingroup$ Thank you for your help, it makes perfect sense. I just need some practice with vector math :) $\endgroup$ Commented Oct 12, 2022 at 22:35
  • $\begingroup$ I would also like to create a procedural bevel of that edge that I create using geometry nodes but I haven't seen anyone doing that so far. I don't know if the developers are going to create a bevel node soon. I also had an idea how to make it. Perhaps I will create another post on how to create a procedural bevel if I struggle with it. $\endgroup$ Commented Oct 12, 2022 at 22:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .