Intro
I want to show how to get a rotation from 2 vectors using the “Align Euler to vector” (AEtV) node. This is simliar to a look at target with a pole target in an Inverse Kinematik (IK).
I saw some people using 2 AEtV nodes in a row with 2 vectors, but nobody explained how it works.
Quick setup
Feeding the Curve into the Points input wokrs in blender 3.0, but this could get patched out for a better solution.
Note: The handles output needs to be subtracted by the position output because they are a position, but we need a direction vector for the Align Euler to Vector node, which is assumed to starting from the origin (0,0,0) and end at the coordinate that it contains.
Why no Curve to Points nodes?
The node outputs the sampled curve to points, but I only want the handles which I created. Besides the output rotation is calculated with the tangent of the curve, which is fine for most cases, but if I use a Fillet Curve node I want the attaching pieces to match the handles.
How does it work?
The “Align the X/Y/Z axis with the vector” and Pivot (axis to rotate around) options depend on each other.
So first a working setup for both nodes.
-
- AEtV node:
- Alignment axis is (for example) X
- Pivot is set to Auto
- Rotation is left empty, without any input
- Factor = 1 (influence on output value)
- Vector input gets your poletarget/up vector
-
- AEtV node:
- Alignment axis is (for example) Z
- Pivot is set to X
- Rotation gets the Rotation output from the 1. AEtV node
- Factor = 1 (influence on output value)
- Vector input gets your look at target vector
The Pivot of the 1. AEtV node is alsways on auto.
The Alignment axis (Top row with X/Y/Z) you choose for the 1. AEtV node will be the pivot for the 2. AEtV node and also the Alignment axis to avoid for the 2. AEtV node.
possible combinations would be (Align + Pivot):
1st node > 2nd node
X + auto > Y/Z + X
Y + auto > X/Z + Y
Z + auto > X/Y + Z