2
$\begingroup$

I tried to create a setup that would take the host object's rotational values via Object Info +Self Object and 'reverse' them so a geometry could stay fixed no matter the host object's global orientation. The two setups below work fine for single-axis rotations, but as soon as the object is rotated on more than one axis, things go awry. I also tried other setups with more than one Transform nodes where the later ones would fix the errors produced by the previous ones, but Euler calculations proved too much for me.

So, how can I freeze a geometry's global orientation in Geometry Nodes?

Simply reversing Euler (left) works for all three single-axis rotations, but free orientation doesn't work at all. Aligning the Euler (right) to a fixed-Z vector solves the free rotation problem for X and Y, but Z rotation still follows the host object.

$\endgroup$

1 Answer 1

5
$\begingroup$

The inverse of an Euler rotation expressed as vector is not -1 * vector. The XYZ component rotations do not commute. Their order has to be reversed, too, for the rotation to be 'unwound', last in, fist out. GN Eulers are in XYZ order.

Here's a way:

enter image description here

There might be a neater method with other nodes, maybe using the Invert check-box in Vector Rotate? but I haven't found it.

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Thanks Robin. I somehow always manage to forget about Euler rotations being sequential, makes sense. $\endgroup$
    – Kuboå
    Commented Dec 1, 2022 at 9:45
  • $\begingroup$ @Kuboå I wish Rotate Euler had an 'Invert' checkbox, too.... that would be very handy. $\endgroup$
    – Robin Betts
    Commented Dec 1, 2022 at 9:51

You must log in to answer this question.

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