I wrote a tool to help me pose things around the screen a little easier, and thought I`d share it.
When using the translation manipulator, I sometimes get annoyed with how it can make you work a bit too hard to get your object where you want it. I tend to use the world space setting, because I find if I use object mode, its too restricted by the orientation of the object, eg:
If I simply want to move the character in his forward direction ( Z - blue ) Its easier to use world space setting because if I use the object mode ( that does have his "true" Z forward axis ) then I end up getting unwanted upwards translation as I move his hips forward because of the rotation of that controller.
World space is good, but it also has its problems. If I want to move the object along an axis that isn't aligned to the world, I have to do as many as three separate movements, e.g
So in this example I have a character climbing up a ramp. The ramp is at an angle, and not directly aligned to the world. I need to translate the characters hips in the direction of the arrow, so I can start posing the next key of his climbing up animation.
You can see that both world and object ( local ) settings are pretty useless because they don't represent the broad direction of movement that we want the character's hips to travel in ( i.e, they don't represent the orientation of the ramp ). In this case, using either world or object mode, I would still have to modify X Y and Z to get my hips where I wanted them for the next pose. I could use the square in the middle of the manipulator, but this does a "screen space" translation, and I find it hard to work with because I cannot drag a specific axis. The feet also are at arbitrary rotations, so they also have exactly the same problem as the hips. It seems like a lot of work translating objects around in this way.
This is where the script becomes very useful. I can set an object that I use to represent my direction of travel.. or something that describes the overall "direction of movement" that I'm animating in:
So here I've made a locator that represents the direction that I want the character to move in.
I can then use this locator as a reference to override the translation manipulator on whatever object I now select.
So now I have a manipulator that represents the direction I want to translate my objects in. Its easy for me to simply translate the Z axis and have my character travel forwards, upwards, and in the direction of the ramp all at the same time! this is now set for every object I select - so it will be the same for both feet in this example. I can even select all objects ( the hips, and both feet ) and slide the whole character up and down the ramp...
If I was animating this little sequence, I could use the locator as a "translation reference" for pretty much all objects, for that patricular "climbing" section of the animation. Once the character gets to the top of the ramp, I could change the position and rotation of the locator to match the broad direction of whatever move comes next, and so on... its much easier working this way...
There is also an option to use a custom "screen" oriented manipulator, that allows you precise control over the axes. You may want to use this if you simply want to say pose the translation of the hips a little higher in a 2D way relative to the frame - without having to worry about any orientation already on the hips.
The script has a simple four button UI that lets you switch between world, reference object, and screen space translation, and also a button to tell the script which object you are using as your reference object. You can assign each mode to a hotkey if you prefer using the following commands:
moveObjectRel "UI"; - launch the script with the UI.
moveObjectRel "screen" - perform a screen relative translation.
moveObjectRel "object" - perform an object relative translation ( like in our example ).
moveObjectRel "setRef" - tells the script the selected object is your direction reference object.
moveObjectRel "world" - set the translate tool back to its default world setting.
You can grab the script here: moveObjectRel.mel
When using the translation manipulator, I sometimes get annoyed with how it can make you work a bit too hard to get your object where you want it. I tend to use the world space setting, because I find if I use object mode, its too restricted by the orientation of the object, eg:
If I simply want to move the character in his forward direction ( Z - blue ) Its easier to use world space setting because if I use the object mode ( that does have his "true" Z forward axis ) then I end up getting unwanted upwards translation as I move his hips forward because of the rotation of that controller.
World space is good, but it also has its problems. If I want to move the object along an axis that isn't aligned to the world, I have to do as many as three separate movements, e.g
So in this example I have a character climbing up a ramp. The ramp is at an angle, and not directly aligned to the world. I need to translate the characters hips in the direction of the arrow, so I can start posing the next key of his climbing up animation.
You can see that both world and object ( local ) settings are pretty useless because they don't represent the broad direction of movement that we want the character's hips to travel in ( i.e, they don't represent the orientation of the ramp ). In this case, using either world or object mode, I would still have to modify X Y and Z to get my hips where I wanted them for the next pose. I could use the square in the middle of the manipulator, but this does a "screen space" translation, and I find it hard to work with because I cannot drag a specific axis. The feet also are at arbitrary rotations, so they also have exactly the same problem as the hips. It seems like a lot of work translating objects around in this way.
This is where the script becomes very useful. I can set an object that I use to represent my direction of travel.. or something that describes the overall "direction of movement" that I'm animating in:
So here I've made a locator that represents the direction that I want the character to move in.
I can then use this locator as a reference to override the translation manipulator on whatever object I now select.
So now I have a manipulator that represents the direction I want to translate my objects in. Its easy for me to simply translate the Z axis and have my character travel forwards, upwards, and in the direction of the ramp all at the same time! this is now set for every object I select - so it will be the same for both feet in this example. I can even select all objects ( the hips, and both feet ) and slide the whole character up and down the ramp...
If I was animating this little sequence, I could use the locator as a "translation reference" for pretty much all objects, for that patricular "climbing" section of the animation. Once the character gets to the top of the ramp, I could change the position and rotation of the locator to match the broad direction of whatever move comes next, and so on... its much easier working this way...
There is also an option to use a custom "screen" oriented manipulator, that allows you precise control over the axes. You may want to use this if you simply want to say pose the translation of the hips a little higher in a 2D way relative to the frame - without having to worry about any orientation already on the hips.
The script has a simple four button UI that lets you switch between world, reference object, and screen space translation, and also a button to tell the script which object you are using as your reference object. You can assign each mode to a hotkey if you prefer using the following commands:
moveObjectRel "UI"; - launch the script with the UI.
moveObjectRel "screen" - perform a screen relative translation.
moveObjectRel "object" - perform an object relative translation ( like in our example ).
moveObjectRel "setRef" - tells the script the selected object is your direction reference object.
moveObjectRel "world" - set the translate tool back to its default world setting.
You can grab the script here: moveObjectRel.mel
5 comments:
Once again awesome suggestions. I dont write often but I always read, and several times at that.
Thanks for sharing and keep it up!!
The move tool in Maya 8.5 has "along live object axis" and "custom axis orientaion" which could do the same thing.
In fact maya 7 has both the features you mentioned - and this is exactly how the tool works. Instead of using a "live" object, which isn't so fast to setup, and not as adapdable ( i.e nulls or locators cannot be made live ) it uses the "custom axis orientation" feature to align the axis to a custom object that the animator chooses!
So basically the whole point of the script is that does use the "custom axis orientaion" but takes the hard work of sampling axes degrees, converting them to radians, and then outputting it to your manipulator - as well as provinding a nice quick UI so you can get on with your animation..
Late to the party. This looks like a great script. Looking forward to giving it a go:)
Man it's so obvious you came from max, great work budd, and the arcs...man i miss 3dsmax's arcs, your arc script is just perfect, when watching the turok animation i actually thought its mac because of those arcs..
thanks!!
Post a Comment