Crowd Helper Object

Create panel > Helpers > Object Type rollout > Crowd

The Crowd helper object acts as the command center for controlling crowd simulations in character studio. In most cases, you won't need more than one Crowd object per scene.

The Crowd object provides the following rollouts:

Crowd Behaviors

The Crowd object also lets you add behaviors to the scene, choose the current behavior from a list, and provides a rollout for modifying that behavior. Behaviors provided with character studio include:


To add a Crowd helper object

To use Crowd and Delegate helper objects together

This example shows how to create a basic crowd simulation with delegates and behaviors.

  1. Run 3DS MAX or reset the program.

  2. Add a Crowd object and one or more Delegate objects to the scene. In general, add delegates in the Top viewport so that they point forward. The Crowd object's location is immaterial.

  3. Select the Crowd object and open the Modify panel.

  4. On the Setup rollout > Behaviors group, click the New button.

  5. In the Select Behavior Type dialog, click a behavior and then click OK to close the dialog.

    A Behavior rollout appears for the behavior you chose.

  6. If the behavior requires a target object or objects, such as Seek, click the None button and then select an object, or click Multiple Selection and select several objects.

  7. Change other behavior settings as necessary.

  8. Create and modify additional behaviors as necessary.

  9. On the Setup rollout, click the Behavior Assignment button.

  10. In the Assignment Design group, the two upper lists should each contain a single entry: the delegate on the left, and the behavior on the right. Select both items.

  11. Click the New Assignment button to the right of the Assignment Design group. It's a vertical button with five right-pointing arrows.

    This adds the new assignment to the list in the Behavior Assignments group.

  12. Accept the changes and the OK button to close the Behavior Assignments and Teams dialog.

  13. On the Modify panel, scroll down to the Solve rollout and click the Solve button.

    Keys are created as follows: The delegate turns to point toward the sphere, banking as it turns, and then moves directly toward the sphere. When it reaches its target, it moves slightly beyond the sphere, and then repeats the turn-and-move motion until the end of the simulation. To prevent this, try starting with the two objects farther apart, or animating the sphere's position.

    The next procedure builds on this one by assigning a biped to the delegate's motion.

To use bipeds in a crowd simulation

Motion synthesis is an important new feature in character studio 3. In motion synthesis, the software uses a "game engine" that determines procedurally when to apply various motion clips to a biped during solution of a crowd simulation, based on the delegate's activity. For example, when one delegate stops to wait for another to get out of its way, using the Avoid behavior, the biped attached to the stopped delegate could cross its arms and tap its foot impatiently.

This procedure gives the basic steps for creating and saving a motion flow graph, assigning several bipeds to delegates, and then sharing the motion flow graph among the bipeds so that the software automatically creates separate motion flow scripts each biped, based on the behaviors assigned to their delegates.

For tutorials covering crowd/biped methods, see Creating a Crowd of Swimming Bipeds and Advanced Crowd/Bipeds. For an important overview of using bipeds with Crowd, see Using Bipeds with Crowd Delegates.

Note: This procedure assumes you know how to animate bipeds with footsteps and keyframe methods, and save the animations as .bip files. To prepare for using Shared Motion Flow, you should create and save a range of biped motions such as start, walk, turn right, turn left, stop, and wait.

The first step is to create an appropriate graph and save it to disk.

  1. Add a biped, and then open the Motion panel.

  2. Click the General rollout > Motion Flow Mode button.

  3. Click the Motion Flow rollout > Show Graph button.

  4. In the Motion Flow Graph toolbar, click the Create Multiple Clips button.

    This displays an Open dialog that lets you select any number of .bip files from the same directory to add simultaneously to the motion flow graph. Use Click+SHIFT-click to choose several contiguous files, and CTRL-click to choose non-contiguous files.

  5. Choose the .bip files you want the software to use for motion synthesis, and then click the OK button.

    The files are added to the graph as clips. Each clip is automatically named after the file from which it's derived.

    Note: For best results, especially with simulations in which bipeds are to turn at different angles, use as many different turning clips as possible. A minimal setup would include separate left-turn and right-turn walks at angles of 45, 90, 135, and 180 degrees.

    The next step is to add transitions among the clips so character studio knows which actions can proceed to and from other actions. You can do this manually for greater control, but for initial testing, you can save time by letting the software add and optimize transitions automatically.

  6. Click the Synthesize Motion Flow Graph button. This uses the first 30 percent and the last 30 percent of each motion to create transitions.

    The graph now shows arrows to and from each clip, as well as from each clip to itself. If you like, delete transitions that obviously don't belong, such as the ones from the stop and start clips to themselves.

    Alternatively, you can use Create Transition to set up a custom graph.

  7. Optimize the transitions. See Transition Optimization Dialog.

    When you solve the simulation, Crowd automatically generates a motion flow script for the biped, based on this graph. When you have a graph with multiple clips, as in this case, it chooses the starting clip for the script from one or more clips you designate as random start clips.

  8. Click the Select Random Start Clips button, and then click a clip.

    This tells the software to start the script with this clip, and uses the default probability of 100% that the clip will be chosen.

    If you want the various bipeds to start with different clips, select multiple random start clips by pressing and holding the CTRL key as you click. The default Random Start Probability setting of 100 for all clips means that the software will choose randomly among them for a starting clip for each biped's script.

    To change the likelihood of starting with specific clips, right-click a clip and modify its Random Start Probability setting. For example, say you want to start each biped's script with any of three clips: clips A, B, and C. You want clip A to be chosen twice as often as clip B or C. In that case, using the Random Start Clips tool, you'd first click clip A, and then CTRL-click clips B and C. Then you'd right-click each in turn, assigning a Random Start Probability of 60 to clip A, and 30 to both clips B and C.

    Note: The probability values are arbitrary; what counts is their ratios. For example, values of 80/40/40 or 20/10/10 would work the same.

    Note: You can also set and change random starting clips and start probabilities in the Motion Flow graph after loading the .mfe file into the Global Motion Flows dialog, described later in this procedure.

    Note: If a motion flow script already exists for a biped, for example after you've solved a crowd simulation, the software can use the first clip in the script for subsequent solutions.

  9. In the Motion Flow rollout, click the Save File button, and save the graph in the .mfe format.

  10. Reset the software.

  11. Set up a crowd simulation with any number of delegates, using behaviors appropriate to the crowd scene you want to create.

    Tip: When first starting out with motion synthesis, use smaller crowds of eight or so delegates.

  12. Solve the simulation and adjust the settings as necessary to obtain the desired activities.

  13. Add as many bipeds as you have delegates, and link each delegate to a different biped using the delegate's Motion Parameters rollout > Biped group settings.

    You must select the biped's center of mass (COM) object (typically named Bip0#), as indicated by the mouse cursor turning into a crosshairs icon when it's over the COM in the active viewport.

  14. Turn on Use Biped for each delegate.

    Tip: To link up any number of delegates with bipeds, all at the same time, use the Crowd helper object. Click the Setup rollout > Biped/Delegate Associations button, and then use the dialog to connect the pairs and turn on Use Biped.

  15. Set the biped/delegates to use a random start clip as the first clip. You can set this simultaneously for multiple delegates with the Edit Multiple Delegates dialog.

    Next, you use the Shared Motion Flow function to apply the saved motion flow graph to the bipeds.

  16. Select any biped and open the Motion panel.

  17. Click the General rollout > Motion Flow Mode button.

  18. Click the Motion Flow rollout > Shared Motion Flow button.

  19. In the Shared Motion Flow dialog, click the New button.

    This creates a new shared motion flow and assigns it a default name. You can change the name if you like.

    Next, load a motion flow file.

  20. Click the Parameters group > Load .mfe button, and use the Open dialog to load a motion flow file. Typically, this would be the one you saved earlier in the procedure.

    Next, specify the bipeds that will share this motion flow.

  21. In the Parameters group, click the Add button, and use the Select dialog to specify the bipeds that will share the motion flow.

    For your convenience, the Select dialog shows only center of mass objects for the bipeds in the scene.

    After you click the Select button, the bipeds appear in the dialog, in the list under "Bipeds Sharing this Motion Flow."

  22. To correctly share a motion flow, bipeds' legs must be scaled the same. If any of the bipeds are scaled differently than the one you started with, an alert appears, and then, when you click the OK button in the alert box, the wrong-scale bipeds are noted as such in the list. At this point, you can select one of the bipeds in the list, and then click the Set Shared Motion Flow Scale button to match the others' scale to that biped. Or you can click one of the Reset Wrong Scales buttons to rescale the wrong-scale bipeds or just their legs. Be sure to take one of these measures before proceeding.

    One more step in the Shared Motion Flow dialog is necessary: You must activate Motion Flow mode for all the bipeds sharing the motion flow. A special button in the dialog lets you perform that action in one step.

  23. Click the Put Multiple Bipeds in Motion Flow button.

    This activates Motion Flow mode for all the bipeds sharing the motion flow.

  24. Click the OK button to exit the dialog.

    Delegate-controlled bipeds can begin their animation with their motion flow scripts' first clip, if it exists, or with a random motion clip. But when you load a motion flow file into the Shared Motion Flow dialog, any scripts in the file are ignored. Thus, delegate-associated bipeds using motion flow in an unsolved crowd simulation have no existing scripts, and you must specify that they use the random start clip that you set in the motion flow. You do this via the delegates.

  25. Use the Edit Multiple Delegates dialog > Biped group to specify Random Start Clip for all the delegates.

    Solve the simulation.

  26. Select the Crowd object, and go to the Modify panel.

  27. In the Solve rollout, set the desired End Solve frame.

  28. Click Solve to run the simulation.

    Crowd solves the simulation.

  29. Check the solved simulation by dragging the frame slider and/or playing back the animation.

    Chances are adjustments will be required. You can resolve problems in a number of different ways: Change the behavior and/or motion flow setups, change delegate parameters, and so on.

    If you find that bipeds are colliding and interpenetrating, you can take advantage of Crowd's special Priorities and Backtracking features. In fact, it is strongly recommended that you use both options for most Crowd/Biped simulations.

  30. Use the Priority rollout controls for assigning different priorities to your delegates. Typically, delegates at the head of the crowd should have the highest priorities (that is, the lowest Priority settings).

  31. In the Solve rollout > Bipeds group, turn on Biped/Delegates Only, then turn on Use Priorities, and then turn on Backtracking. If you've solved previously, it's a good idea to turn on Delete Keys Before Solve as well.

    Now, when it solves the simulation, Crowd solves for one biped/delegate at a time, starting with the lowest-priority biped/delegate. As it solves for each subsequent biped/delegate, it looks for collisions, and when the occur, it backs up the solution to the end of the previous clip, and if necessary, previous clips, and then tries different paths through the motion flow graph. This method can take longer, which is why Backtracking is off by default, but it's often the best way to resolve problems with colliding bipeds.