Lesson 5: Setting up Sliding Deformation
 
 
 

You now have a working muscle rig for the leg mesh. The Muscle skin deformer provides even more quality in the rigging with Sliding weights. This deformer lets you use true muscle and bone sliding under the skin. Combined with the Relax weights you can create in a later lesson, you can achieve very effective skin pulling and sliding effects.

Load the tutorial file

  1. Start with the last file you had from the previous section, or load the tut_dragonLeg_sliding_START.ma.

    This file has the leg properly skinned and weighted with bones and muscles using Sticky Weights.

Enable Sliding deformation

  1. Select the skin mesh, and in the Channel Box under INPUTS click the cMuscleSystem1 node to display its attributes.

    Each main section of the deformer is broken down by label headings. For now, use the ones listed under the SLIDING section. The Sliding deformer can be turned on and off for faster interaction and playback.

  2. Turn Enable Sliding on and leave quality as “Full”.

    Later you can adjust the quality attribute as needed. See Sliding attributes for further information about the quality attribute.

Paint Sliding weights

Start by painting weights for the hip blade bone.

  1. Select the skin mesh and select from the Muscle > Paint Muscle Weights to bring up the Muscle Paint tool.
  2. In the Weights drop-down menu, select Sliding.
  3. Set the Weight slider to 1.0 and turn Replace on.
  4. In the Influence list, select "boneBlade".
  5. Paint around the area where the blade bone might push out.

    TipIt's important to paint only the area around the bone for speed purposes, and also so points on other parts of the mesh don't try to jump and be pushed by the blade.

    As you paint, you can see the Sliding deformation start to happen. Note that the slide is not accurate because there is not enough detail in the mesh relative to the bone. This is a good example where you may want more skin detail for areas where smaller or thinner bones or muscles cause the sliding.

Set a Fat offset

For areas where a muscle or bone often penetrates the skin during sliding, you can set a Fat value to create an offset between the muscle or bone and the skin.

The Fat attribute on the cMuscleObject shape node for each muscle or bone object lets you adjust the offset from the skin to the muscle or bone during sliding.

A good example is the MusHipBack muscle, since the skin often penetrates the muscle on the back. The image below shows that muscle painted with Sliding weights, and a fat offset on the muscle set to 0.55.

To define an offset from the skin mesh to the bone blade

  1. Select the bone blade object.
  2. In the Attribute Editor, select the "cMuscleObject_boneBlade1" tab to view the cMuscleObject shape node attributes for the bone blade.
  3. Set the Fat value to 1.0.

    The skin is now offset from the bone blade.

Notice that right now the Sliding only affects a few points and is somewhat sharp. The muscle is also causing some self-penetration due to Sliding. We can use another Sliding feature, called Direction weights to improve how the slide occurs.

Create a Direction node

  1. Make sure nothing is selected, close the Muscle Paint tool, then select Muscle > Direction > Make Muscle Direction.

    By default, a vector type direction node is created at the origin. It has an arrow that points in the direction the Sliding will attempt to work once it is connected to the Muscle skin deformer.

    In this case, since nothing was selected, a new cMuscleDirection shape node is created.

    TipSince you may often want to have radial direction nodes created based on the center line of your mesh, and since capsules are typically used for bones that run down the centerline, you can easily convert any capsule to also function as a cMuscleDirection node. Simply select the capsule, then select Muscle > Direction > Make Muscle Direction. The capsule will be converted to be both a capsule and a radial muscle direction simultaneously. You can then connect the capsule to the deformer as a capsule muscle object and/or a muscle direction and use it both ways.
  2. In the Channel Box or Attribute Editor, set the cMuscleDirection node’s Type attribute to radial.

    This creates a radial-type push out along an axis. The Length and Falloff Outer attributes control how far this axis goes.

    Next, you connect the direction object to the Muscle deformer.

Connect the Direction node

  1. Select the direction object and the skin mesh.
  2. From the main menu, select Muscle > Direction > Connect selected Muscle Directions.

    The Direction object is connected, although there is no visible change on the mesh because you have not yet painted Direction weights.

  3. Move the Direction object to align it with the rear hip muscle.
  4. Parent it to the first hip muscle cube mover.

  5. Set the Length attribute to 3.0.

    Leave the Falloff Outer attribute set to 1.0, as it only changes the length at the tips. The actual effect of the direction node comes only from weighting. The Inner/Outer Falloff values are primarily for visual feedback only.

Paint Direction weights

  1. Select the skin mesh, then select Muscle > Paint Muscle Weights.
  2. In the Muscle Paint tool, select Direction in the Weights drop-down menu.

    This lets you set and paint Direction weights for any connected direction nodes.

  3. Paint Direction weights in the same area where you painted Sliding from the hip muscle.

    The Sliding direction is now corrected so that it is pushed out radially from the center line of the muscle direction node. This corrects the penetration problem.

  4. Scrub the timeline to see the animation.
  5. In the Channel Box under INPUTS, click the cMuscleSystem1 node.
  6. Toggle the Enable Sliding option on and off to compare how the mesh looks with Sliding enabled and disabled.
  7. Continue to paint Sliding weights and create vector or radial direction nodes as needed or open the tut_dragonLeg_sliding_END.ma.

Beyond the Lesson

In this lesson you learned how to: