Nobody likes crowds (except for certain types of bugs), but with the Character Studio's Crowd Animation tools, controlling crowds can be lots of fun. The fun comes when you realize that you would spend weeks animating by hand all the actions that are possible with the Crowd animation tools.
Characters included in a crowd simulation are called delegates, and these delegates can have assigned behaviors that tell them to follow a certain object or a certain path and to avoid designated objects. As you begin to simulate crowds, you'll delight in how much it is like taking the whole family shopping together, except the delegates actually do what you say.
Crowd systems are composed of two helper objects called Crowd and Delegate, but the system also can use other scene objects that can be avoided or followed.
Crowd and Delegate helper objects are created using the Create Helper Crowd or Delegate menu commands. The Crowd object looks like a simple dummy object, and the Delegates are simple pyramids. Objects can be linked to a behavior object that travels along with it.
Several of the tools you need to define the crowd system are accessed from the Setup rollout, shown in Figure 1.
If only a single delegate is created, it is not much of a crowd. Multiple delegates can be created using the various cloning methods or using the Scatter button located in the Setup rollout in the Modify panel when the Crowd object is selected.
Cross-Reference
The various cloning methods are covered in Chapter 8, “Cloning Objects and Creating Object Arrays.”
Clicking the Scatter button causes the Scatter Objects dialog box, shown in Figure 2, to open. This dialog box includes several panels used to randomize the Position, Rotation, and Scale of the cloned delegates. In the Clone panel, you can select the Object to Clone and How Many clones to create. After the settings are correct, click the Generate Clones button to create the duplicates.
Each selected delegate has parameters that can be set in the Modify panel, including its dimensions, Speed, Acceleration, and Turning values. With the Crowd object selected, you can click the Multiple Delegate Editing button to open a dialog box, shown in Figure 3, that lets you change the parameters of multiple delegates simultaneously.
In the upper-left corner, you can select the delegate objects to change using the Add button. You can then specify two values for the parameters. If the Random option is specified, the parameter falls somewhere between the two values. You also can save groups of settings using the drop-down list in the lower-left corner of the interface.
Within the Setup rollout of the Crowd object is a New button that lets you add new behaviors that can be used with the crowd system. All behaviors that are added to the crowd system appear in a drop-down list. By typing a new name in the list, you can name each behavior. The available behaviors include the following:
When a behavior is selected from the Setup rollout, a custom rollout of parameters for the selected behavior appears. Using these parameters, you can govern how the behavior acts and select which objects are targets.
After the behavior's parameters are set, you can assign specific delegates or teams of delegates to use certain behaviors in the Behavior Assignments and Teams dialog box, shown in Figure 4. This dialog box is opened using the Behavior Assignment button found in the Setup rollout.
All behavior assignments are listed in the center pane, and each assignment can be given a weight. If the delegate has two conflicting behaviors to follow, then it follows the one with the greatest weight value.
The final step in the process is to solve the simulation. This step creates keyframes for all the motion in the scene. To solve the simulation, click the Solve button in the Solve rollout, or click the Step Solve button to solve for a single frame at a time. By default, the solution saves keyframes for every frame, but you can increase the Positions and Rotations values to compute the simulation faster.
This example uses the delegate primitives linked to rabbit meshes to navigate through a forest. Moving several objects through an array of objects can be time-consuming when done by hand, but the Crowd system makes it easy.
To move a group of rabbit delegates through an array of trees, follow these steps:
The crowd system solves the movement of all delegates as they move toward the goal.
Figure 5 shows the position of the delegates after the simulation has ended. Notice the random position of the various delegates.
The Crowd features of Character Studio are useful for animating the motion of delegates following specified behaviors. The following topics were covered:
18.191.14.93