The Crowd system uses the Priority rollout settings when solving a simulation involving bipeds associated with delegates.
The Priority parameter is a positive integer assigned by the user to a delegate. When priorities are used, the Crowd simulation computes one biped at a time, based on its priority setting from lowest to highest; that is, a lower Priority setting means a higher priority. If the priorities of two biped/delegates are the same, the computation order of those two biped/delegates is randomly determined.
This topic describes the six different ways of setting a delegate's priority, and how priorities might be put to use in different situations.
Using Priorities
If you have a large crowd all going in one direction, you would typically want the delegates in front to solve first. In that case, using Proximity To An Object or Proximity To A Grid would be useful in setting priorities.
In a case where you start with a circle of bipeds, and you want them all to wander and mingle, you might not care about the bipeds' priorities. You could let them all have the same priority and let the system decide which goes first. However, it might be better to assign random priorities or make priorities unique, so that you are guaranteed the same order each time, and you can read the priority numbers to know what will happen next. This also lets you change the order if you need to.
Suppose you have two groups of bipeds, all of which are assigned random priorities. If you wanted to keep the priority relationships within each group, but make one group start after or before the other, you could use Increment Priorities to increment or decrement all the priorities in one group.
If none of the algorithms applies to your situation, you need some way to set the priorities by hand. It's useful to be able to set them visually. That's what the Assign By Picking method is for.
Interface
- Start Priority
- Sets the initial priority value. Applies to the first four methods of setting priorities: Assign By Picking, Proximity To An Object, Proximity To A Grid, and Assign Random Priorities. Default=0.
Note: Priority is assigned in increasing order. Thus, a delegate with Priority value 0 goes before a delegate with Priority 1, 1 goes before 2, and so on.
Assign by Picking group
- Pick/Assign
- Lets you assign successively higher Priority values to any number of delegates by selecting each in turn in the viewport. The first delegate you select is assigned the Start Priority value. The Priority value assigned to each succeeding delegate you select is incremented by one.
To stop assigning priorities, right-click in a viewport or click the Pick/Assign button again.
Delegate priorities appear in viewports as black numerals attached to each delegate; they're usually most easily seen in Wireframe views.
Note: You can undo and/or redo assignments during the process.
Tip: It's possible to assign two or more delegates the same priority value using this method. In such a case, for more predictable behavior, use Make Priorities Unique so that delegates don't share priorities.
Assign by Computation group
This group provides five different methods for assigning priorities to delegates, plus a button for selecting delegates to be affected by these methods.
- Delegates to Prioritize
- Lets you use the Select dialog to specify delegates to be affected by subsequent use of other controls within this group. Select the delegates with the Select dialog, and then click Select to exit the dialog. This selection applies only to Proximity assignments (that is, Proximity To An Object and Proximity To A Grid).
- Proximity to an Object
- Lets you assign priorities based on delegates' distance from a specific object. To specify the object, click the None button, and then select the object on which priorities are to be based. Lastly, click the Assign button to compute and assign priorities. The delegate closest to the object is assigned the Start Priority value, and each successively farther delegate is assigned the next highest priority.
For any delegates that are equidistant from the object, character studio assigns priorities randomly.
- Proximity to a Grid
- Lets you assign priorities based on delegates' distance from an infinite plane defined by a specific grid object. To specify the grid object, click the None button, and then select the grid object on which priorities are to be based. Lastly, click the Assign button to compute and assign priorities. The delegate closest to the grid object is assigned the Start Priority value, and each successively farther delegate is assigned the next highest priority.
For any delegates that are equidistant from the plane, character studio assigns priorities randomly.
- Assign Random Priorities
- Assigns random priorities to the selected delegates. The range of priority values assigned lies between the Start Priority value and that value plus the number of selected delegates.
- Make Priorities Unique
- Ensures that all delegates have unique priority values. If two delegates share the same priority, one of them will be given a new priority value that differs from the rest.
- Increment Priorities
- Increments the priorities of all selected delegates by the Increment value.
- Increment
- Sets the value by which the Increment Priorities button adjusts delegate priorities. Use a negative Increment value to decrement priorities. Default=0.
- Set Start Frames
- Opens the Set Start Frames dialog, for setting start frames based on assigned priorities.
- Display Priorities
- Enables the display of assigned priority values as black numerals attached to the delegates. Default=off.
- Display Start Frames
- Enables the display of assigned start frame values as black numerals attached to the delegates. Default=off.
When both Display Priorities and Display Start Frames are on, the two values are displayed side by side, separated by a slash symbol (/). The priority appears to the left of the slash and the start frame appears to the right.