Lesson 1: Setting up basic skin deformation

 
 
 

This lesson shows you how to set up an object to be deformed by the Muscle deformer with bones and joints. You will prepare a rig for basic skin deformation and set initial weighting on your mesh.

Note

If you already have an object with a Maya skinCluster applied, you can easily convert it to use Muscle following a workflow similar to this lesson. See Convert Maya skin to Maya Muscle in the Maya Muscle guide to learn how to convert a skinCluster to the Muscle setup.

Open the scene for the lesson

  1. Load the DragonLeg_Basic_Start.mb file from the Lesson 1 folder.

    This scene contains a basic polygon mesh of a leg, some joints with a simple, animated IK rig, and some background lights.

  2. In the Display Layer editor (Channel Box/Layer Editor > Display tab), turn off the lyrSkin and lyrLIGHTS layers (click off the "V" in the layer's display) to hide the skin and view the underlying rig.
    Tip

    Use the (Windows) +b or (Mac OS X) +b hotkey to toggle the background color in the scene view.

  3. Scrub the timeline to view the animation.

    You can see the basic IK rig setup as the leg moves back and forth over time. In addition to the basic Maya joints, there are two polygon bone objects for the hip blade and kneecap.

Set up muscles

Currently, there is no stable root joint for this rig. Rather than creating a Maya joint as the root, and since you will be using the Muscle deformer for skinning, you can create a capsule object to use as the root.

Capsules are like joints, except that they have a true size and thickness and can be used by the Muscle skin deformer as both joints for Sticky weighting and actual sliding effects. They effectively work as bones, and are faster than polygon mesh bones.

To create and set up a capsule object

  1. Select Muscle > Muscles/Bones > Make Capsule to create a capsule object.

    A capsule object appears at the origin. In the Outliner, you can see a group called grpMUSCLES is added. This group holds all capsules and muscles and is designed to keep your rig hierarchy clean.

    Note

    Since capsules are locators, you must have Locators turned on the scene view’s Show menu in order to see them.

  2. Select Muscle > Simple Muscles > Set Muscle Parameters to open the Muscle Builder window.

    The top of the Muscle Parameters tab lets you edit basic attributes for capsules, bones, and muscles. You can also use the Attribute Editor or Channel Box to control these.

  3. In the Muscle Object Settings, set the capsule Length to a value of 4, then close the Muscle Builder window.
    Tip

    You can also adjust the capsule color in the Muscle Object Settings.

  4. Move and rotate the capsule to a position beside the boneBlade object as shown. This is a good location for your root object.

    Since only objects that have a cMuscleObject shape node can be connected to the Muscle skin deformer for skinning, you need to convert all of the joints and polygon bones to have this node.

Convert the joints to bones

Rather than manually creating a capsule by hand for each joint, Maya Muscle provides an automatic way to convert joints to capsules so that they can be directly connected to the Muscle deformer. Converted joints function as both a regular Maya joint and a Muscle capsule object.

  1. Select all of the joints in the dragon leg rig.
    Tip

    Use the filter field at the top of the Outliner window as a quick way to isolate all of the leg joints. Enter jnt* to display only the leg joint objects, which use that naming convention.

  2. Select Muscle > Muscles/Bones > Convert Surface to Muscle/Bone.

    Since you are converting joints and not a surface, the Joint to Capsule Conversion window appears.

    This window lets you set which axis runs down the length of the joints in your rig. The default for Maya is X, but for this rig a custom Joint Orient tool was used to get a clean joint rotation on the Y-axis. It is highly recommended you use this sort of tool to set up your joints before rigging.

  3. Click Y-Axis in the Joint to Capsule Conversion window.

    Each joint is converted to be a capsule object and have the shape node. You can adjust the color and length of capsules in the Muscle Parameters (Muscle > Simple Muscles > Set Muscle Parameters).

    Next you will convert the rig’s polygon bone objects so they can be connected into the Muscle deformer for skinning.

  4. Select the kneecap and blade bone objects (use Shift + click), then select Muscle > Muscles/Bones > Convert Surface to Muscle/Bone.

    The polygon mesh objects are converted and connected to a new cMuscleObject shape node.

    While there is no visible change in the scene, you can see the new shape node in the Channel Box. You can also use the Muscle Builder window to turn on display of the shape and adjust colors or other settings. Make sure you leave the Strength setting at 1.0.

Now that you have a series of joints and polygon mesh objects converted to work with the Muscle skin deformer, you can apply the skin deformer and connect the muscle objects.

Apply the Muscle skin deformer

In these steps, you select only the mesh where you want to apply the deformer. You connect the bones and muscles afterwards.

To apply the Muscle skin deformer

  1. Turn on the lyrSkin layer in the Display Layer editor and select the dragon leg skin mesh in the scene view.
  2. Select Muscle > Skin Setup > Apply Muscle System Skin Deformer.

    As the deformer is applied, a window appears to pre-calculate required information for the Relax deformer in case you use it later.

    When the process is complete, the dragon leg mesh looks the same, but it now has the Muscle skin deformer applied. You can view the cMuscleSystem node attributes in the Channel Box or Attribute Editor.

    At this point, animating the mesh will have no deformation effect, because you have not yet connected or weighted any bones or muscles to the skin mesh. In the next steps, you connect all the capsules and bones.

Connect the muscle objects

  1. Go to frame 0 and notice how the bones/capsules look in their default base pose.
  2. Select the following in the Outliner:
    • All of the capsule objects created in the previous lesson, including the root capsule object (muscleCapsule1) and all the joints that you converted to capsules.
    • The two polygon bone objects (boneKneeCapRt and boneBlade).
    • The skin mesh (pSkinMesh).
  3. Select Muscle > Muscle Objects > Connect selected Muscle Objects.

    All the bones are connected into the Muscle deformer. At this point, scrubbing the Timeline still does not produce any motion on the skin mesh because you have not yet applied the default skin weights.

Apply default weights

Applying default weights to bones and polygon mesh objects is similar to weighting with the Maya skinCluster. The points on the skin will move when the capsule/bone moves.

To apply default weights

  1. Select the skin mesh (pSkinMesh).
    Tip

    Open the Muscle Paint window now (Muscle > Paint Muscle Weights) to view the mesh in Paint mode, so you can see the weights after you complete the following steps.

  2. Select Muscle > Weighting > Apply Default Weights.
  3. In the Default Weights window that appears, select Sticky in the Weight drop-down list, and set the Smooth value to 3.

    The Smooth value sets how many iterations the smooth operation applies.

  4. Click Apply Default Weights.

    Now that you have applied default Sticky weights, scrubbing the timeline shows the effect. The skin mesh moves when the capsules/bones move.

This concludes the first lesson. You can find the completed file for this lesson, DragonLeg_Basic_End.mb, in the Maya Muscle Advanced Techniques folder.

Beyond the Lesson

In this lesson you learned how to:

Now you are ready to refine the default weighting on your dragon leg mesh by painting weights with the Muscle Paint window.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License