# Recalculate normals of an object using geometry nodes

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

• 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! Commented Oct 9, 2022 at 8:46
• the missing faces are flipped I want them to face the direction of the other faces. Commented Oct 9, 2022 at 12:04
• also forget about the instance lines on points, that was just for me to visualise normals Commented Oct 9, 2022 at 12:05
• 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! Commented Oct 9, 2022 at 12:10
• 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) Commented Oct 9, 2022 at 12:23

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:

(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:

• it only work in some cases. someone also suggested me to use the Raycast node. Commented Oct 10, 2022 at 4:08
• 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 Commented Oct 10, 2022 at 4:12
• @GiuseppeBufalo I looked at it again with your specific example, and added to the post accordingly. Good luck! Commented Oct 11, 2022 at 9:10
• Thank you for your help, it makes perfect sense. I just need some practice with vector math :) Commented Oct 12, 2022 at 22:35
• 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. Commented Oct 12, 2022 at 22:38