# Geometry node, face normal directions

I want to place planes facing all the same direction on a tube/cylinder which positioned horizontally using the Geometry Nodes. I could do this if I didn't apply rotation after turning 90 degree. However, it flips half of them in opposite direction if I applied the rotation.

Does anybody know why this happen and how to fix it?

I'm just worried if "not applying rotation" cause problems when exported to Unity etc...?

• As far as I know you cannot import the Geometry Nodes into Unity, so have to make a mesh of those planes... and in a regular mesh the normals can be flipped so if everything else fails you could do it manually. Jan 17, 2022 at 9:09
• Thank you very much! I'll make sure to convert to mesh when I export for other programs. Jan 17, 2022 at 9:36

Note what the documentation for the Distribute Points on Faces Node says about the Rotation output:

An XYZ Euler rotation built from the normal attribute for convenience. Such a value can also be built from the normal with the Rotate Euler Node. Keep in mind that the Z axis of the result rotation will be arbitrary, since the mesh normal used to create the rotation does not have enough information to set all three rotation axes.

Emphasis mine. The rotation of your planes is not fully-determined by the surface normal of your cylinder, and it cannot be, since there is no way to know what direction “up” should be for each plane (only what direction “out” should be).

If you need to guarantee the planes will always be placed facing the same direction, you’ll need to use the normal in combination with some other vector to compute an unambiguous rotation. For example, you could choose to make the planes always face “upwards” according to the object’s local Z axis:

This results in the following when the object is rotated:

However, this is probably not what you want, since you presumably want the “up” direction for the planes to all point towards one end of the cylinder. Unfortunately, there isn’t really any consistent way to get that information—the concept doesn’t make terribly much sense for an arbitrary mesh. However, you could in theory compute it based on the relative positions of the top and bottom ends of the cylinder, like this:

This requires creating two vertex groups, one that contains the cylinder’s top vertices and another that contains the bottom ones, and passing those groups as the appropriate inputs. This results in the behavior I suspect you want:

However, this is a bit of a silly thing to do, and just not applying the rotation is probably a better choice.

• Wow... Thank you very much for the informations and examples! That is amazing!! Jan 16, 2022 at 19:34

I think you can get the rotations from normals.

Default rotations work not so well because the target axis is Z. But in Align Euler to vector you can set up the target axis manually.

• This doesn’t really work—the other axis is unconstrained, so you sometimes get weird results. (See my answer for why, as well as a workaround.) Jan 16, 2022 at 18:57
• Thank you both very much for answering my question so quickly. It really helped me understand how some nodes works. Jan 16, 2022 at 19:46