Page MenuHome

Geometry Nodes: Support fixed pivot axis in Align Rotation to Vector node.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Feb 3 2021, 1:05 PM.

Details

Summary

This implements the pivot axis option as described in T85211.

When the pivot axis is not set to auto, the node will try to align the rotation to vector as best as possible, given the selected rotation axis.

Note, currently there is still some rotation when the main axis and pivot axis are the same. We could try to prevent that, but it is a bit tricky in the general case. A better solution might be to just warn the user when both are set to the same axis (this isn't a useful configuration of the node anyway).

Diff Detail

Repository
rB Blender
Branch
pivot-for-aligning-rotation (branched from master)
Build Status
Buildable 12570
Build 12570: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Feb 3 2021, 1:05 PM
Jacques Lucke (JacquesLucke) created this revision.

Works great!

I tested it with the use-case it was designed for. As you can see, the initial rotation of the leaves does not matter, they can easily be aligned along the normal and then rolled with the normal axis as a pivot to face up.

A better solution might be to just warn the user when both are set to the same axis (this isn't a useful configuration of the node anyway).

Agreed. Ideally, it would be nice to have the node do nothing and display a warning, but it's not really necessary.

This revision is now accepted and ready to land.Feb 3 2021, 8:02 PM
  • simple check to avoid rotation when main axis and pivot axis are the same