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:
Create a terrain for the crowd simulation - see Terrains for Crowds.
In the simulation point cloud's Define Animation node of the Animation_Blending ICE tree, get a Crowd Legs on Ground Constraint compound.
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.
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.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License