Справка Houdini на русском Crowd simulations

Foot planting workflow

How to set up agents to adapt their animation to terrain and prevent skating.

On this page

Overview

Terrain adaption adapts the animated foot placement of agents to the terrain they're moving over. Foot locking ensures agent feet stay planted in the same place while on the ground, preventing "skating".

Houdini uses two extra channels alongside an agent’s animation channels to indicate when a foot is "on the ground" in the animation cycle. (A value of 1 in the channel means the foot is planted. Values from 0 to 1 blend between planted and the original animation.) The solver locks the ankles and toes in place on the terrain for the duration of the foot plant.

Houdini can automatically generate these channels for you based on when the ankle joints are at their lowest points in the animation cycle.

Set up

How you associate the "foot planted" channels with the agent is different depending on how you are generating the agent:

  • If you get the agent from an FBX file, or from a character in the scene, use the controls on the Agent Prep SOP's Additional channels tab.

    • Specify your agent’s channel names for each ankle/toe on the Agent Prep SOP.

    • Click Create Foot Plant CHOP Network to automatically generate the foot-plant channels for the agent’s animation.

  • If you are baking the agent to disk, the Bake Agent shelf tool sets up the CHOP for you after asking you to select ankle and toe joints from the rig.

    You can use the controls on the Agent ROP's Additional channels tab to change the settings.

Both methods automatically create a Foot Plant CHOP in a CHOP network to generate the foot plant channels from the character’s animation. However, you could manually create the channels or generate using your own CHOPs and specify the channels in the settings instead.

When terrain adaptation is on in the crowd solver and the Enable Foot Locking parameter is enabled, the solver will automatically use the foot planting channels.

Tips and notes

  • For advanced users, the hou.AgentClip HOM class has methods for querying and sampling non-transform channels in a clip, or you can use the agentclipsample VEX function to sample in VEX.

  • The foot planting functionality is implemented in the lower-level Agent Terrain Adapation DOP inside the solver. This node may be useful if you implement your own low-level crowd solution.

  • The Agent Clip SOP is the low-level node that adds channels to an agent. This node may be useful if you are implement your own low-level crowd solution.

See also

Crowd simulations

Getting started

The moving parts

  • Agents

    About agents, the moving "actors" that make up a crowd simulation.

  • States

    About agent states, the virtual "mood" of each agent which controls the agent’s animation and which behaviors it runs.

  • Clips

    How to associate animation with agents in certain states.

  • Triggers

    How to specify conditions that cause agents to change from one state to another.

Next steps

  • Foot planting

    How to set up agents to adapt their animation to terrain and prevent skating.

  • Transition graphs

  • Attributes

    Useful attributes for reading in triggers, or that you can set to affect behavior.

  • Sensors

    How to make agents behave differently based on their virtual senses.

  • Diversity

    How to create a more realistic crowd by making agents look and act differently.

  • Weights

    How the Houdini crowd solver decides which behaviors to apply to an agent at each time step.

  • Terrain

    How to specify terrain geometry for agents to walk across.

  • Obstacles

    How to set up obstacles for agents to avoid.

  • Dynamics interaction

    Tips on setting up interaction between agents and other types of dynamics.

  • Ragdoll simulation

  • Adding direction

    How to assert manual control over different aspects of the crowd simulation.

  • Fuzzy Logic

  • Caches

    Tips for efficiently caching and loading crowd sims.