Page 1 of 1

Visualising transform axis constraints

Posted: Mon Sep 08, 2003 9:02 am
by matt_e
Unfortunately the funboard tracker is down, so I'll post this here:

Some of you may know that theeth has been working on some great stuff lately, including numerical input and axis constraining (global/local) for transformations (i.e. move/rotate/scale). This will be very useful, as a completely contrived example, being able to accurately scale or move vertices along the length of a pipe or cylinder if the object is rotated differently to the usual global XYZ co-ordinates. This also means we can add a toolbox menu for move/rotate/scale along the various different axes/normals/whatever) that's very useful in Wings3D.

One issue with these constraints (that is present using the current middlemouse->constrain to axis method too) is that when the movement is constrained to an axis, it becomes unintuitive and more difficult to understand/predict where the object will be moving to, because the on-screen movement does not follow the mouse movement. Theeth has also been working on a great solution to alleviate this, by drawing a line through the object or vertices' centres showing the constrained axis, and thereform the direction that the transform will happen along.

One thing I've been thinking about though is how to make this feature more useful than it already is. In the current system, it works by users entering move/rotate/scale, then pressing X Y or Z (once or twice, for global/local) for whatever axis they want to constrain to. One thing I can see, is that especially when you're using local axis transformations, unless you have 'draw axes' switched on for your object (and there is no simliar feature for verts :/ ), it's difficult to know what X Y or Z axis you will need to constrain to, especially if your object has been rotated a lot. The way to find, I suppose would be to keep pressing X, Y, or Z keys repeatedly and using trial and error to figure out which axis is the one you want. This is messy and slow to use. I love Blender's speed and freedom when modelling, and I think it should be preserved as much as possible.

So one idea is to display the axes before they have to be chosen, so it's easy to see at a glance, which axis to constrain to. A possible idea for how this might work could be like this:

User presses G to start moving freely:

To toggle constraining to the global axes, press a hotkey (eg. C):

Or press C again to toggle constraining to the local axes:

Then press X, Y, or Z to constrain to that particular axis

Now I just thought of that usage of hotkeys, interaction etc. just then very quickly (not well thought through). It may not be a very practical way to do it in reality and may be difficult to integrate with other methods like a toolbox menu. The main thing I'm getting at right now is making the visualisation clearer. So does anyone have any ideas on this? How to make it work well, smoothly, efficiently? Or if it's a bad idea all together?

Posted: Mon Sep 08, 2003 9:08 am
by matt_e
Oh just a few notes too:

* Relying on Blender's draw axes feature is not so good because you'd either need to a) turn it on for all objects = cluttered wireframes on screen or b) turn it on before transforming, and off again afterwards = very slow and clumsy. And of course it doesn't help much for vertices.

* I did that mockup a bit similar to Wings3D's axes, the difference is though, that the axes would not be on screen at all times like in wings, only when they're needed for transforming (which would be more useful for local transforms too). I also like the idea of colour coding the axes, X = red, Y = green, Z = blue. It would work well for experienced users who, over time, would be able to recognise the axis very quickly, just by glancing at the colour.

Posted: Mon Sep 08, 2003 9:10 am
by Goofster
I like it! gives clear feedback to the, are you gonna code it? :D


Posted: Mon Sep 08, 2003 9:13 am
by matt_e
Hehe, if I could, I would have already tried it :)

Like I said, it's just an idea/mockup of course. Better to get the ideas out than in, though!

Posted: Mon Sep 08, 2003 11:33 am
by ideasman
Send me a quote and a timeframe!

Posted: Mon Sep 08, 2003 11:40 am
by kid_tripod
You could have a "gizmos" mode, which would mean a visible axis appears for the highlighted object/group of vertices, which could then be manipulated like the ones in XSI/MAX/Maya etc.

'G' turns into a translate gizmo, 'r' rotate, 's' scale and then they stay that way.

Taken to a logical conclusion you could use the existing "choice of origin" buttons to select how the gizmo is placed, etc. Maybe add a "global" button . . . ?

I'm quite a fan of the 'slice of pie' rotation ones that you get in some programs, and scaling on one axis can be made a lot easier using this approach.

Posted: Mon Sep 08, 2003 12:01 pm
by matt_e
Hrm, well I went and did some copying and pasting of theeth's code and got it to a working state for the visualisation anyway, though there are a couple of issues that could use some tweaking and fixing. I also haven't got the X/Y/Z letters either - perhaps a coder cleverer than I might be able to implement that.

However that's working the same way as what I described above (which isn't that good for menus). Need more brainstorming! :)

kid_tripod: I suppose having a toggle to draw it on selected objects could work, although, it could get quite cluttered on-screen especially with many selected objects. I thought it would be best to only show it when in the move/rotate/scale mode, since that's when you really need it. As a side note, in testing, the colour coded lines were surprisingly easy to memorise :)

Although I'm a fan of them too, I'm not really talking about manipulators (gizmos) right now since it's a much bigger job than this, and will take a lot of time and thought to reconcile how they traditionally work in other packages with the way Blender works. Manipulators usually use clicking and dragging while blender's transforms work quite differently (the distance from mouse pointer to object influences the amount of transformation, LMB to start/RMB to cancel, and so on). So that's a pretty large scope to worry about. I thought this would be a good first step to at least get some more visual communication. There was a topic in the funboard tracker about this. but alas it's down atm :/

ideasman: huh?

Posted: Mon Sep 08, 2003 12:04 pm
by ilac
I like! :D

Gizmos could make a handy addition too!

Posted: Mon Sep 08, 2003 12:58 pm
by sten
this looks great!

but the axis in the corner as we have now in only Ortho views, should be in all other views too...not only axis flat views...and also in perspective 3D view...a good helper as well!!

Posted: Mon Sep 08, 2003 11:10 pm
by theeth
Really good idea regarding the colors and all that. I don't mind if you want to code it, but I could very well do it since I more or less already begun working on that. I could use some help regarding the openGL call.

Ideasman: I'll talk to broken about it, if we split the job, we'll send you the quotes at the same time.


Posted: Tue Sep 09, 2003 12:04 pm
by ideasman
Sounds good,

Have you looked at vertex snapping yet?

Posted: Tue Sep 09, 2003 3:10 pm
by theeth
already done. sorry for not e-mailing before, I was kinda busy and always forgot :?