3
$\begingroup$

I can't find a working example of a node tree with the Transform Gizmo. I can get linear gizmo working, same as the examples online and in the manual. I think it might be related to how I'm attempting to use the matrix?

In this attached image, I got some of the gizmo features to respond, but it's not working fully so it must not be correct.

The translation does work, with the gizmo controlling the position and following along. In this setup, there are multiple issues. First no matter what I do I cant get the gizmo to visually rotate. Second, if there is rotation, then scale is kind of in world space, or at least, the gizmo space, which never rotates. Also related, if I scale while rotated, it changes the rotation value itself, so that was why I think I'm using the matrix wrong.

If someone has a link, image, or node tree that can use the transform gizmo correctly, that would be great.

transform gizmo attempt

$\endgroup$
2
  • 1
    $\begingroup$ "Default Cube" has just done a quick YT tutorial on procedural gizmos in Blender 4.3 here but I'm not sure whether it includes the transform gizmo. I suggest you slow it down a bit as he's known to be a fast talker! $\endgroup$ Commented Nov 25, 2024 at 9:22
  • $\begingroup$ Exactly why I posted, I reviewed all the videos and documentation I could find after seeing that one didnt show the transform gizmo. $\endgroup$ Commented Nov 26, 2024 at 1:29

1 Answer 1

4
$\begingroup$

When I use your setup, I cannot see anything not working except for the missing visual rotation. This is quite easy to explain: the 3D Viewport only shows the rotation if you set the Transform Orientation to Local instead of Global:

global vs. local

I do not see any change of rotation when scaling really. Or at least not noteworthy change. Rotation values which are 0° tend to change to very very low positive or negative values around 0° in the sixth decimal place, these are just rounding errors.

The other thing is the scale gizmo, it simply does not seem to orient its endpoints (the cubes) along the rotation axes (even when you have the orientation set to Local). It's a bit weird, when you rotate around X for example, the scaling cubes on Y and Z seem to be rotating with the axes they are attached to, but the X cube is not rotated along X. I do not know if this is a bug or if they just do not care to show rotation on the scaling gizmo (does not really explain the orientation along all other than the rotation axis though).

My guess would be, the orientation of the scale cube gizmos is derived from the vector between startpoint and endpoint position of the axis, which does not take rotation along said axis into account. But this is just speculation and as I said, I have no idea if it is a bug or they simply do not care about it.

//EDIT: Oh, I understand what you mean. Yes, scaling with the gizmo in Global mode does not really work. Even if you change the nodetree to have less or no glitching, it is not working as expected. Usually with a single Transform Geometry node, something like scaling on a global axis does not work, because within the same node the scaling is based on the local rotation given in this node. Scaling a rotated object globally non-uniformly can deform a mesh in a shearing way instead of stretching, which a single Transform Geometry node cannot do.

To achieve this inside Geometry Nodes (and without gizmo) you would have to do it with two consecutive Transform Geometry nodes, on the first you can do the translation and rotation, on the second you do the scaling which then works like scaling globally.

To anticipate your next question: yes, you can have two Transform Gizmo nodes to transform the mesh one after another, you can select in the Properties that you want the first one to only affect Translation and Rotation and the second one to only affect Rotation with the according checkboxes.

two transform gizmos

However this does not really help. Because I could not find a setup which does not mess up the scaling (and somehow the rotation with it). The problem is, if you have rotated the object on the X axis for example, then you can easily change the X scale afterwards (which would not result in shearing the object).

But if you try to scale on Y or Z it always affects the scale on both axes (all axes on which you have not rotated the mesh). This is after rotating on one axis. As you soon as you rotate more than one axis, trying to scale a single axes will result in affecting the scale on all three axes.

This might be a bug or a limitation of the functionality of the Transform Gizmo, I have no idea. The only solution to make the scaling behave like global scaling is to use the Linear Gizmo nodes, for each axis a gizmo and combine them to create the scaling after translation and rotation:

linear gizmos

But this way the option to scale in Local orientation goes missing. If you want to have both you would need to have different scales for "local" and "global", where the local scaling is done by the Transform Gizmo and the global scaling is done by the three Linear Gizmo nodes.

local and global scaling

All in all I guess this might lead to confusing and slightly incomprehensible behaviour if you have a globally scaled mesh which you then also rotate and scale locally etc., so I would usually prefer to have a single Transform Gizmo and use it with Local orientation.

Finally: back to a simpler setup - just using a single Transform Gizmo and for this demonstration I'll deactivate the Scale property. This is about when you were wondering if you put the Join Geometry into the wrong place.

There is a main difference between placing the Join Geometry node before or after the Transform Geometry node, but depending on the chosen Transform Orientation the outcome is reversed. First I will show in Local orientation what happens: if you join before the transformation then very conveniently the gizmo is translated and rotated with the mesh so that it moves with it and in Local orientation shows how it is rotated.

join before transform

But if you join the gizmo after the Transform Geometry node, it is not translated and rotated and will show as if you were in Global transform orientation - although the transformations will be executed in local space which can result in seemingly weird behaviour:

join after transform

So if you want to join after the transformation, you can plug the Translation value into the Position of the Transform Gizmo node and Rotation into Rotation. The reason why you would want to do this instead of simply joining before transformation is of course to have the freedom to modify the position and/or rotation of the gizmo or give it a completely different one instead of being locked to the mesh.

join after transform and using position/rotation

Now what is different about the Transform Orientation set to Global is the fact that the result is reversed to the Local orientation: if you join before the Transform Geometry node, the gizmo is transformed with the mesh - but it does not show in the viewport. Therefore the seemingly weird behaviour happens in this case, because although the gizmo is displayed in global orientation and you move it globally, the effect works locally.

The other way round when you join after the Transform Geometry node: the gizmo shows a global orientation and it is working globally.

$\endgroup$
5
  • 2
    $\begingroup$ You can set the GN gizmos to global/local in the viewport like you showed ? I didn't know that was a feature, that's nice. $\endgroup$ Commented Nov 25, 2024 at 16:01
  • $\begingroup$ This does explain something, in local it works as expected, whereas I guess it makes sense that scale in global would do something different, it does indeed change rotation value when scaling in global. I was under the impression I could orient the gizmo however I wanted, is this not the case? Because of the scaling changing rotation in global, it glitches out during the interactive scaling, like a cyclic error, which made me think I had the Join geometry in the wrong place but I'm not able to solve that either. Again its only in global though so maybe its not important for my setup. $\endgroup$ Commented Nov 26, 2024 at 1:26
  • 1
    $\begingroup$ @miahelf I've tried to add a little (actually a lot) more explanations or at least descriptions of the behaviour. All in all I'm not sure if something of that is just buggy or a known or necessary limitation as I said in my answer. Perhaps some of these things might change with upcoming versions. In general I would prefer to use the Transform Gizmo in Local orientation mode since this is giving the most plausible or relatable results. $\endgroup$ Commented Nov 26, 2024 at 10:27
  • 1
    $\begingroup$ Oh yeah thanks! I think I did overlook this complication about the join position and the setting of rotation etc. P.s. your answer may well be the only search result with a valid transform gizmo example right now. $\endgroup$ Commented Nov 27, 2024 at 11:03
  • $\begingroup$ @miahelf You're welcome! Well, the Transform Gizmo is new and so I guess there will be others in the future. As it seems now, it is somehow broken and buggy - because honestly, if Geometry Nodes cannot really handle the scaling when the viewport's Transform Orientation is set to Global, why is the gizmo using them at all? Probably just for compliance with how the normal object transformations work in the viewport, but it is a bit confusing... $\endgroup$ Commented Nov 27, 2024 at 11:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.