Page MenuHome

Geometry Nodes: Rotate Euler Node
ClosedPublic

Authored by Jarrett Johnson (jarrett.johnson) on Sep 28 2021, 3:31 PM.

Details

Summary

This commit introduces the Rotate Euler function node which modifies an input euler rotation. Addresses T91653.

Diff Detail

Repository
rB Blender
Branch
fn_rotate_euler_node_3 (branched from master)
Build Status
Buildable 17494
Build 17494: arc lint + arc unit

Event Timeline

Jarrett Johnson (jarrett.johnson) created this revision.
Jarrett Johnson (jarrett.johnson) retitled this revision from manual rebase on master to Geometry Nodes: Rotate Euler Node.Sep 28 2021, 3:39 PM
Jarrett Johnson (jarrett.johnson) edited the summary of this revision. (Show Details)
Jarrett Johnson (jarrett.johnson) edited the summary of this revision. (Show Details)
Jacques Lucke (JacquesLucke) requested changes to this revision.Sep 28 2021, 3:56 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
33

No need to specify socket identifiers (second input) when the names are different.

37

Put everything except register_node_type_fn_rotate_euler in the namespace and remove the unnecessary blender:: prefixes.

41

What is the operation?

43

This function is not necessary.

58

This is dead code.

This revision now requires changes to proceed.Sep 28 2021, 3:56 PM
  • Addressed Jacques' comments
source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
32

The identifier can be removed here as well. Identifiers only need to be unique on one side of the node (e.g. among all inputs).

44

You are treating the rotation input as vector, not as a euler. Changing an euler with such a matrix multiplication does not seem to make sense, does it? You'll probably have to convert both eulers to a matrix, then perform a matrix multiplication and then convert back.
The node will probably need the Rotation Type and Space properties that exist in the deprecated Point Rotate node. Otherwise this is a fairly limited replacement.

source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
44

Thanks. I was going to bring this up later today after work (I submitted this patch a bit prematurely--I tried to abort from arc diff but it went through instead). Rotating it did not seem to make any sense, but this explains a lot why.

I'm a bit confused on how this is different than the Euler rotation type on the vector rotate node?

I'm a bit confused on how this is different than the Euler rotation type on the vector rotate node?

The difference is that this is changing an euler value, while the Vector Rotate node is changing a vector. The difference would be way more clear when we had a dedicated Euler socket. We will think again about adding that for 3.1, it's probably a bit late for 3.0 now.

  • Added Space and Type, etc...

Some clang tidy warnings that should be fixed: P2463.

Looks like it's doing the right thing now, thanks :)

source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
113

No need to use auto here.

  • fix clang-tidy warnings
This revision is now accepted and ready to land.Oct 1 2021, 5:12 PM

Committed with rBc5c94e3eae74 (copied the wrong URL)