Character Animation with 3DSMAX
[10 mn de lecture - paru le 9/9/2004 11:15:25 AM - Public : Confirmé]
|
   
|
Auteur
6. Crowd simulation
The crowd system animation of Character Studio allows simulation of crowds
behavior. Just specify behavior which apply to delegates (helpers which
act as representatives) and the simulation calculates their movement. Behavior
can
be the movement towards an object in the scene, avoidement of
obstacles, after a road or a surface, etc... It's possible to
combine several behavior to create a rich and complex simulation.
Then you can link objects with delegates to finish the animation.
6.1. Bipeds and Motion Flow
Import a Biped. Click on File > Merge, and select a file containing a
Biped.
Select the biped and the associated mesh, then in keeping pushed the shift
touch (allows to clone) move selection to the right.
Set number of of clones at 20 and keep clone type on Copy.

Here are your 20 characters.

Select any biped, then go in the Animation panel, Activate the Mode Sequence.
This mode allows to create a motion flow with some motion file (.bip ) by
creating scripts of movement

In the Motion flow roll out, click on Show Graph.

Then click on Open Multiclips, Select walk motion clips.
With the move tools, place clips like this

Select all clips, then click on Create All Transitions .
Transitions are automatically generated.

Click on Select Starts Clips and select some of them. So there is 4 potential
start for the motion flow.

In the Motion Flow roll out, click on Random Script , a
random script is generated.
Then click on Save Motion Flow.

Save as Flow.mfe for example.

Now, one of the 20 biped has a motion script. We're going to share it with
others Bipeds. This is for taht reason we have choosen 4 different start clip
to avoid all biped start their move by the same move.
Click on Share Motion Flow to share the script.

Click on New to define a new sharing motion flow. Add all bipeds wiht the Add
button. Click on the Load.mfe button and select the previously saved script
(Flow.mfe).
Finally Click on ... to affect the script to all bipeds.

You should remark that the Share Motion Flow button appearance changed. It's now
white , this means that Sharing is active.
6.2. Delegates
We're going to create delegates. Go to the Create panel, then in Helpers
select Delegate

Create it in any view.
Still in Helpers, click on Crowd.

You should have this :

Set the delegate size to be a little bit wider than the shoulder with of the
character.
To simulate a crowd, we must duplicate delegates.
In top view, Create a box which will help us for scatter delegates.
Select the Crowd system, go in the Modification panel and click on Scatter.

In the Clone tab, click on the button just below Object to Clone and
choose Delegate01. Set the number of clone at 20 and click on Generate
Clones.

On the Position tab, select On Surface and pick the box.
Delegates wil be scattered on the box surface.
On the All Ops tab, check Clones, Positions and Rotations,
then click on Scatter.

You have now 20 delegates on the box surface.
Select the crowd system, in the Setup roll out, click on Associate Bipeds.

Add all bipeds and all delegates. Check Set Delegates to Use Biped then
click on Associate.

6.3. Behaviors
Now, Bipeds are associated to delegates, we're going to set behaviors.
In the Setup roll out click on Behavior.

We're going to create 2 teams with each a different behavior.
On the Team part, click on New Team.

Select the 10 first delegates then click on OK.

Create an other team with others delegates.
In the Assignement Design part, Click on New Behavior and choose Wander. Create
an other Behavior and choose this time Seek.
Select the first team and the first behavior, then click on the Assign button
(the big one in the middle)

Assign the second Behavior with the second team and then click on OK.

It's necessary to select a target for the Seek behavior. In the Seek Behavior
roll out, click on None and select a biped which is in the other team. So there
will be a team which seek a member of the other team.

6.4. Simulation
Click on ... to edit delegates, select Random Start Clip and Use Biped, then
click on Apply Edit.

In the Solve roll out, set the during parameters and then click on Solve to
solve the simulation.

Here is a basic crowd simulation :

|