Multi Gizmo

The Multi Gizmo is used in the 3D viewport to translate (move), scale, and rotate whatever it is highlighted on. It will be synchronized to the Orbit Gizmo in the GUI.

As mentioned in my previous post, it will mimic 3D in 2D since the user will interact with it by clicking on flat buttons.

It is using my shader to display all the visual elements on a texture. Some elements will be hidden depending on the selected tool mode such as translate, scale, rotate, or combined.

Multi-gizmo

There are many shader parameters to control positions, sizes, and colors. These parameters will be driven by a script that will set the mode of the tool (show and hide elements), move elements around etc.

The view of it here is simply showing all the visual elements in manually adjusted states. In practice, the control script will set the positions, scales, and visibility accordingly.

It will do the same kind of things that the tool in Blender (a tool used by at least 1 million people) does.

The circles will be used for moving instead of pointing cones, and the squares for scaling instead of cubes.

The colored arcs will be circles when flat and half ellipses as the relevant axis is rotated.

The parent node will capture mouse events and the script will need to determine what area of the tool is being clicked on and act accordingly such as emitting signals and highlighting an element.

This implementation may be better from a UX perspective (flat buttons), more performant than a 3D model Gizmo (because it is using a 2D shader), and easier to maintain (because it is generated by code); but I will have to see.

Downsides are: less accurate or fancy visual representation of a 3D rotating widget (but is that a problem).

The next stage of development will be to sync this tool with the Orbit Gizmo.

Challenges will involve mapping the 3D transform to values to set shader parameters and resolving elements that are under the mouse pointer.

More Blog posts

Most recent first