Constraining the Legs to the Ground

 
 
 

You can constrain the actor's legs to solve some problems related to terrains. When you create a terrain, the position of each particle (actor) is automatically updated so that it moves along this surface. Because only the particle's position is updated, the actor's envelope size and shape is not taken into account with this position update, which means that feet and legs may penetrate the terrain.

The camera is usually far away from the actors in a typical crowd scene, so the penetration may not be noticeable. However, there may be particular scenes or shots where the penetration is more noticeable, and need a constraint to solve the problem.

In the image below, the legs go through the hill because they're not constrained to the terrain.

In the image below, the legs stay above the terrain because they're constrained. Notice that there is still some foot penetration into the hill, but this wouldn't be noticeable if the camera was farther from the crowd. You can also increase the offset of the leg from the terrain to reduce some of the penetration.

To constrain the legs to the terrain:

  1. Make sure that the deformers are parented correctly in the rig proxy for constraining the legs — see Modifying the Actor's Rig.
  2. Create a terrain for the crowd simulation - see Terrains for Crowds.

  3. In the simulation point cloud's Define Animation node of the Animation_Blending ICE tree, get a Crowd Legs on Ground Constraint compound.

  4. In the Crowd Legs on Ground Constraint compound's property editor, specify the rig proxy deformers to use for the Left and Right legs in any of these ways. The constraint compound uses the bone lengths of the legs to figure out where they need to be constrained to the terrain.

    • Click the Pick button and select the rig proxy deformer in a view (object view or viewport) or the explorer. You can display the rig proxy as described in Modifying the Actor's Rig.
    • Click the Explorer button and select the deformer from the actor proxy's Rig_Proxies folder in the explorer that appears.
    • Enter the deformer's name in the text box, making sure to include the actor proxy's name, such as Pedestrian_Mesh.LThigh.

    NoteRemember that left and right refer to the actor's left and right sides, not left and right according to your view of the actor.
  5. Set the Root Direction and Knee Direction to the deformer's local axis that is pointing toward its children.

    You can check to see which vector is axis forward this by selecting the root and knee deformer in the rig proxy in a 3D view and activating the Translate tool in Local mode. In this rig, the -Y direction points to the knee deformer's children.

  6. If the feet are penetrating the terrain, you can increase the Offset value.

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