Another Way Around Gimbal Lock Proposal
3037 7 1-
- HongMao
- Member
- 63 posts
- Joined: Aug. 2013
- Offline
…It seems that rotating objects in the 3D scene has no problems with gimbal lock, why not design the UI for animators where that's the only way to change any objec'ts rotation value(s)? I've figured out a workaround for the parameters menu using a peformance-hitting phyton node in a subnet that update the subnet's button's labels to the current rotation values, but is it possible to do this across all animation/parameter interfaces (say for example, having a click anywhere inside a rotation parameter's anim curve trigger the same switch to the 3d scene rotation control like the buttons do)?
-
- tamte
- Member
- 9249 posts
- Joined: July 2007
- Offline
HongMao
…It seems that rotating objects in the 3D scene has no problems with gimbal lock
gimbal lock is not about the ability to rotate object on the single frame
obviously if you use any other gizmo than Gimbal (which shows true alignment of the axes) it will always allow you to rotate around orthogonal axes of the reference transform space (world, object, parent, …)
however you will most probably run into a gimbal lock issues when interpolating between keyframes as that's unavoidable for rotations represented with euler angles as they are highly dependent on hierarchy of axes defined by rotation order
the way to avoid it is either use quaternion interpolation functions, which unfortunately in houdini there is only qlinear() and that's not really useful for smooth animation
or control the rotations procedurally using quaternions or matrices and only convert the results for every sample to euler angles, which includes controlling rotations using constraints at least the ones that do that under the hood
otherwise obviously some smart choice of rotation order may alleviate the gimbal lock probability or at least the full gimbal lock (all depending on the range of motion required)
Edited by tamte - Oct. 30, 2019 23:48:17
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- HongMao
- Member
- 63 posts
- Joined: Aug. 2013
- Offline
Drat, I was looking for a way out of rotation order altogether that also didn't force animators into anthing more technical ( stuff like quaternions starts shifting the debate from whether or not 3d animators should learn 2d/fine arts skills to whether or not they-perhaps escelating to everyone-should learn calculus, topology and other computer science phd skills…) …And there's no way to create a quaternion/4d rotation handle, and/or intutively control keyframe interpolation (as well as rotation order), in a 3d scene?
-
- tamte
- Member
- 9249 posts
- Joined: July 2007
- Offline
no need for 4D handle or having to know any math
in XSI, MAX, and pretty sure in Maya and others there is a smooth quaternion interpolation mode based on TCB or TCBS values
Animators just animate as usual with euler keyframes, and tweak Tension Continuity Bias (Spin) values per rotation keyframe (with visual feedback in curve editor) instead of slope and acceleration
since the interpolation is done behind the scenes using quaternions all 3 (XYZ) euler values have to be keyed for every keyframe and the angle difference between keyframes can't be more than 180 degrees as quaternions interpolate using shortest distance
as I mentioned, in Houdini there is only linear quaternion interpolation mode qlinear() so this is not as useful
I submitted RFE#79013 about 3y ago to add something similar, maybe qtcb() or qtcbs() intepolation functions, but so far I'm not aware of anything like that being implemented
in XSI, MAX, and pretty sure in Maya and others there is a smooth quaternion interpolation mode based on TCB or TCBS values
Animators just animate as usual with euler keyframes, and tweak Tension Continuity Bias (Spin) values per rotation keyframe (with visual feedback in curve editor) instead of slope and acceleration
since the interpolation is done behind the scenes using quaternions all 3 (XYZ) euler values have to be keyed for every keyframe and the angle difference between keyframes can't be more than 180 degrees as quaternions interpolate using shortest distance
as I mentioned, in Houdini there is only linear quaternion interpolation mode qlinear() so this is not as useful
I submitted RFE#79013 about 3y ago to add something similar, maybe qtcb() or qtcbs() intepolation functions, but so far I'm not aware of anything like that being implemented
Edited by tamte - Oct. 31, 2019 03:03:34
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- HongMao
- Member
- 63 posts
- Joined: Aug. 2013
- Offline
Thanks for sharing the fanciest name for twist (which I assume is a synomym for spin), that might be useful for my computer-graphics-papers-browsing-hobby…Does SideFX not give houdini the option to control keyframes and their interpolation methods procedurally, or by some API feature, or by just allowing one to write their own keyframe/spline editor/UI?
-
- tamte
- Member
- 9249 posts
- Joined: July 2007
- Offline
you can control that procedurally (SOPs, CHOPs and export to channels every time sample), but that's not the most convenient for animators
so the oldschool way of using keyframes and keyframe interpolation functions is pretty convenient at times when you need manual control
not sure about building your own interpolation functions, especially ones like qlinear() that actually uses the whole tuple, but feel free to research
there is a lot that you can actually do on curve segments in curve editors, you can use any functions in there along with some local variables, so it's super powerful, just not something you want animators to have to do
so the oldschool way of using keyframes and keyframe interpolation functions is pretty convenient at times when you need manual control
not sure about building your own interpolation functions, especially ones like qlinear() that actually uses the whole tuple, but feel free to research
there is a lot that you can actually do on curve segments in curve editors, you can use any functions in there along with some local variables, so it's super powerful, just not something you want animators to have to do
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- HongMao
- Member
- 63 posts
- Joined: Aug. 2013
- Offline
-
- HongMao
- Member
- 63 posts
- Joined: Aug. 2013
- Offline
There appear to be a few projects in development for cross-program UI libraries, like https://github.com/Peter92/vfxwindow [github.com] …Perhaps those could be useful for creating custom timeline editors which are both artist and interpolation friendly?
-
- Quick Links