American Flags-Made In The USA

Wednesday, November 17, 2010

Tips & Techniques - MOCCA Cinema 4D


If you have observed how your leg works when you walk, you might have noticed that the foot rolls before it lifts off of the ground. In this tutorial you will setup a leg that uses the Reverse Foot method to achieve this roll motion for the feet.

 
Step 1: To start this off you will need to create bones for the leg and feet. While using the Bone Tool create the bones as shown (Plugins=>MOCCA=>BoneTool).

 
Step 2: Make sure the topmost bone of the chain is selected and use the Add / Update Null Bone function from the Active Tool Manager. Make the naming for each bone unique by renaming the bones as in the image shown.

 
Step 3: Zoom in closer on the feet area of the bones. Make sure no bones are selected by using Edit=>Deselect All. This is where you will create the bones for the foot going in the opposite direction. Ctrl + click on the yellow dot that indicates the end of the Toe bone.

 
Match up the the end yellow dot of the newly created bone with the yellow dot that starts the Toe bone. The image shown will aid in demonstrating this.

 
Now Ctrl + click on the yellow dot that indicates the start of the Ankle bone. These two bones that were just created will serve as the reverse feet.

 
Rename these bones just like in the image shown.

 
Step 4: The bone creation process is done, so select the Leg_Null bone and fix the bones to their current position (Objects=>Fix Bones). Do this for the Rev_Toe hierarchy as well. Since you don't need to create anymore bones switch to the Move Tool (Tools=>Move).

 
To avoid cluttering the Editor View, hide the Rev_Toe bone by clicking it's top tristate until it turns red.

 
Step 5: Now its time to setup the IK for the leg. Disable the Soft IK solver temporarily while you setup the IK for the leg (Plugins=>MOCCA=>Use Soft IK).

 
Select the Leg_Null object and use the Setup IK Chain command from Plugins=>MOCCA=>Setup IK Chain.

 
A goal needs to be created at the root of each bone for the foot, so select the Toe bone and use the Add Root Goalcommand (Plugins=>MOCCA=>Add Root Goal). Do this for the Ankle and Shin bones as well.

 
Select the Thigh bone and Add UpVector by going to Plugins=>MOCCA=>Add UpVector. Do this for the Shin bone as well. This will constrain the Y axis of the bones to a null object, which prevents bones from spinning around the Z axis.

 
You should have a total of four goals and two upvectors as children of the Leg_Null bone. Multi-select all six of these objects and move them out of the Leg_Null hierarchy as shown.

 
While these goals are still multi-selected, switch over to the Object tab in the Attributes Manager. Change the Display to the following settings: Display = Point, Radius = 20m, and Orientation = XY.

 
Step 6: You are going to want a rigid IK chain, so you will be adjusting the strengths of the goals. Select the Soft IK tag applied to the Leg_Null bone. Increase the Strength of the Anchor to 100%.

 
Now multi-select the Soft IK tags that are applied to the Toe.Tip Effector, Toe, and Ankle objects. In theConstraint tab of the Attributes Manager increase the Goal Strength to 100%.

 
Also select the Soft IK tag applied to the Shin bone and lower its Goal Strength to 30%.

 
Now select all of the Soft IK tags except for the one applied to the Leg_Null bone. In the Rest tab of theAttributes Manager enable Force Position so the bones cannot stretch apart from one another.

 
Lastly, select the Leg_Null bone and use the Rest Position and Rest Rotation commands (Plugins=>MOCCA=>Set Chain Rest Position / Rotation). This will define the resting positions and rotations of the IK for all the bones in the IK chain.

 
Step 7: The goals that you applied to the foot need to be rotated by the reverse bones to give that nice roll motion. To do this place the Toe.Root Goal and Toe.Tip Goal as children of the Rev_Toe bone. Make sure the goals do not break the bones hierarchy as shown.

 
Also place the Ankle.Root Goal as a child of the Rev_Ankle bone. This will cause the leg to move up when the reverse bones are rotated. Leave the Shin.Root Goal and both upvectors out of any hierarchy.

 
Step 8: When placing the goals as children of the Rev_Toe hierarchy, the goals were hidden from the editor due to the tristate of the Rev_Toe. To fix this, click the top gray dot of every goal until it turns green. This means that the visible state of the parent object is disregarded.

 
Step 9: You now need to create an object that is easy to select in the Editor that moves the Rev_Toe hierarchy. Create a Null Object (Object=>Null Object) and rename it to 'LegControl'.

 
Transfer the LegControl object to the position of the Ankle.Root Goal with the Transfer function (Functions=>Transfer). in the dialog enter Ankle.Root Goal into the Search For field. Make sure that only Position is enabled and hit OK.

 
In the Object tab chage the Display to the following settings: Display = Cube, Radius = 30m, and Orientation = XY.

 
Place the Rev_Toe hierarchy as a child of the LegControl object.

 
Step 10: Now you need to create sliders to control the rolling of the foot. Make sure the LegControl object is selected and Add User Data from theAttributes Manager.

 
In the Add User Data dialog use the following settings: Name = Toe Roll, Data Type = Float, Interface = Float Slider, Unit = Real, Min = -15, and Max = 20.

 
Add another User Data slider with the following settings: Name = Ankle Roll, Data Type = Float, Interface = Float Slider, Unit = Real, Min = -15, and Max = 20.

 
Create another User Data slider with the settings shown.

 
Again, add another User Data slider using the settings shown.

 
Step 11: You now have four sliders that do nothing. You will use Set Driven keys to add functionality to the sliders. Right + click (PC) or Cmnd + click (MAC) on the Toe Roll text in theAttributes Manager. Use Set Driver from the Animation submenu.

 
Select the Rev_Toe object and go to the Coord. tab. Right + click on the P text of the R.P field and select Set Driven (Relative) from the Animation submenu.

 
Go back to the LegControl object and set the Toe Pivot slider as the driver. Hit the back arrow in the top part of theAttributes Manager to navigate back to the last object which is the Rev_Toe. Set the H field as the relatively driven attribute (Animation=>Set Driven [Relative]).

 
Have the Ankle sliders drive the rotation of the Rev_Ankle. The connection should be as follows: Ankle Roll->Rotation.P and Ankle Pivot->Rotation.H.

 
Step 12: The leg is now setup. The LegControl is the object that will have the most control over the leg. But, the Shin.Root Goal does have an affect on the knee area and you may need to adjust this goal's position when moving the leg to extreme positions. Also remember to turn back on the Soft IK Solver by going to Plugins=>MOCCA=>Use Soft IK.

0 comments:

Post a Comment

 
Design by Kangmas | Bloggerized by Lasantha - Gamer | Tutorial Photoshop