Saturday 7 November 2015

Maya tips 009 - Update on Constraints

This is an update to an earlier post where the constraints are simply parented to the locators separately. This causes problem if the object itself is to be animated, or when a reposition of the constrain is needed. This method is clearer and is much more flexible to use.

Assuming the weapon (Stick) is already created.
1. Click "Create" from menu
2. Click "Locator"
2. Scale Locator to appropriate size



1. Press "ctrl d" to duplicate 2 more Locators and rename the Locators
2. Reposition them equally on the object



1. Highlight the Locators and the object Stick
2. Click "Edit"
3. Click "Group"



Rearrange the Locators and Stick to this hierarchy sequence below by using middle mouse drag.



Click "Freeze transformation" for the whole group so that the values are zeroed and can come back to original position easily.

Load in a character Rig, pose the hand, and position the Stick to the hand using the "Back" Locator.



1. Select any of the the "Finger cup control" (because it is almost never used to animate, except maybe for smear frame effect)
2. Shift select the "Back" Locator
3. Click "Constrain"
4. Click "Parent"



The other hand can also be constraint and they can be switched around.

1. Make sure all attributes are keyed
2. Switch off the constrain to the right hand
3. Similar to the right hand, select any "Finger cup control"
4. Shift select "Back" Locator
5. Click Parent constrain
6. Now there are 2 switches to change between constrain to right hand or left hand. Key it too.
*Note - Make sure when 1 switch is On the other must be Off. Make sure "Blend Parent 1" is on "1".





With this set up the "Middle" Locator or the "Front" Locator can be used to reposition the Stick for a different grip, and it can be used to animate itself.




If the Stick is needed to be constrain to the belt, like in the video, simply repeat the same step as constraining the hands. Then there will be 3 constrain switches in "Back " Locator..



One very important note regarding the "Blend Parent" in the Locator attribute. When any constrain switch is at "1" make sure  "Blend Parent" is also at "1" in order for the constrain to work.

When "Blend Parent" is at "0" it will go back to the position that is last keyed. So in order to be exactly where it is before turning constrain off, and start animating the Stick follow the steps below.

1. Select the "Back" Locator
2. Press the "S" key so that the current position is now keyed
3. Switch "Blend Parent" to "0"
4. Switch constrain to "0"
5. The constrain on the hand is turned off and now the Stick can be animated from where it last stops.