Making an ants crowd
Posted by admin on January 24, 2008 “Crowd” is an excellent tool that has come with Character Studion in 3dsmax.
Today we will make a simple crowd animation where some ants are wandering while following a surface.
You have to have an Ant model for this tutorial. So, model one or use from your
library. Since this is not a Modeling Tutorial I am not telling you the modeling
process for the ant. I myself am using the model made by my friend the other
day.
However, this model will not be necessary before the last portion of this
tutorial. So, select it > right-click on viewport > choose “Hide Selection”.
Choose “Plane” primitive. Create a Plane in the Top or Perspective viewport as
per the parameters shown in below image.
Add a “Noise” modifier and set its Z Strength = 50.
Click Create Panel > Helper > Crowd. Then Drag in a viewport to create a Crowd.
Its position and size is not factor here. But keep a reasonable size for your
convenience.
Now click “Delegate” which is also in the same list (Standard Helper objects
list). Then click and drag in the viewport to create a Delegate (maximize
Perspective Viewport and use it, because you need not other viewports for
following this tutorial).
We have to first define the place for the ants from where they will start their
wandering. For that, we will use a portion of out ground (Plane01) we created
earlier. Select Plane01 and Right-Click > Convert to Editable Poly.
Go to its Editable Poly > Polygon sub-object level at the Modifier Stack at the
Modifier panel. Select 6 polygons as shown below. Then Click “Detach”. In the
Detach options box, Check “Detach as Clone” option (make sure “Detach to
Element” is Un-Checked i.e. Off). Click OK.
Select the newly created Object (Object01). Go to Hierarchy panel > Affect Pivot
Only > Center to Object > Affect Pivot Only (again). If you want you can change
its colour.
Now select the Crowd object (Crowd01) and then go to Modify panel. Click
“Scatter” button under Setup roll-out.
In the Scatter Objects dialogue box, set “How Many” = 15. Then click “None”
button undee “Object to Clone”. In the Selection box, select Delegate01 and then
click “Select”.
Now go to “Position” tab of the Scatter Objects box and choose “On Surface”
option. Then under “Grid/Box/Sphere/Surface/Shape:”, click “None” button.
In the Select box, select Object01 which was cloned and detached from Plane01
earlier. Click “Select”.
Now go to “All Ops” tab. Under “Operations” group, check Compute “Clones” and
“Positions” options. Then click “Scatter” button.
A total of 16 (i.e. 15 new +1 original) delegates will take their place in
the surface of Object01. Click OK button of the Scatter Objects dialogue box.
Make sure Crowd01 is still selected in the viewport. Then click “Mutiple Object
Editing” button under Setup group. We have to edit the properties for the
delegates so that they act as ants.
Click “Add” below “Delegates to Edit” list and then select all the delegates and
click “Select” to include them to the list for editing.
Set the parameters and Check the options (under Speed and Turning group) as
shown below.
We want these delegates not to remain constrained to XY plane only, rather to go
up and down (at Z axis also) to match with the landscape geometry of the
Plane01. So, under General group, Uncheck the button next to “Constrain to XY
Plane” and Check “SET” button to the right of it. Then click “Apply Edit” button
to apply all the newly edited criteria to the delegates.
Crowd01 should be still selected. Click Behaviors > New under Setup roll-out.
Choose “Wander Behavior” and then Click OK.
Now click “Behavior Assignments” button. In the Behavior Assignments and Teams
box, under the “Teams” group, click “New Team”. Then select all the delegates
and click OK.
Go to left area of the dialogue box > Assignment Design group. Select the newly
formed “Team0″ under the “Teams” list, then select “Wander” under “Behaviors”
group. Then click the “New Assignment” button (that is marked with 5 arrow
signs) to assign the Wander behavior to the delegates which are included in
Team0. Click OK button.
We want a longer animation for this tutorial. So, click “Time Configuration”
button. Then set the End Time = 1000 and click OK.
While Crowd01 is still selected go to Solve roll-out and set the End Solve value
as 1000 and then click “Solve” button.
Wait until the simulation is finished and the keys are stored for the delegates
motions. Then play the animation. The delegates are not in the right track. Some
of them are below the landscape and some are above (in the air). We did not want
it for the ants. They are not birds. They should follow the surface. Flying
isn’t their business.
We will correct the behavior of the delegates. For that, make sure Crowd01 is
still selected. Scroll up and under Setup roll-out > Behaviors group, click New.
Choose “Surface Follow Behavior” and then click OK.
In the “Surface Follow Behavior” roll-out choose “-None-” button and then pick
Plane01 as our Surface to be followed for the delegates.
Again assign this behavior to Team0 (Click “Behavior Assignments” > select
“Team0″ > select “Surface Follow” > click “New Behavior” button > click OK).
Solve the simulation again. Animation is now ready.
Right-click in the viewport and choose “Unhide All”.
Select and zoom to the Ant. Then press SHIFT + Drag (with move tool) and release
the mouse button.
Choose “Instance” option. Set the Number of Copies = 15 and click OK.
Now select Crowd01 again. Click “Object/Delegate Associations” button in the
Setup roll-out.
Under the “Objects” list click “Add”. Select all the 16 ants (15 New + 1
original) and click “Select”.
Under the “Delegates” list click “Add”. Select all the 16 delegates and click
“Select”.
Click “Align Objects with Delegates” and then click “Link Objects to Delegates”.
Click OK.
Select all the Delegates using “Select by Name” button in the main toolbar.
Right-click in the viewport and click “Hide Selection”. We don’t need the
delegates for rendering. These are not renderable by default anyway.
Now, zoom to any of the ants and scrub the time-line to see if they (ants) are
moving properly. Oh! What is this? May be, the pivot/direction etc. wasn’t setup
for crowd animation when modeling the ant. This is why, the moving-direction and
orientation do not match with each other. We will correct this in the next step.
Since we cloned the ants with “Instance” option enabled, we will be able to make
the corrections for all Ants at the same time by only correcting the geometry
for one ants. So select the ant (on which you zoomed-in and noticed its
behavior) and go to its “Element” sub-object level. Press “CTRL +A” or
region-select to all the elements for this Ant. Then enable “Rotate” tool and
“Angle Snap” in the main toolbar. Also make sure “Use Selection Center” is
chosen as the Transform Center.
Rotate the selected all elements 90 Degree anti-click wise at Y axis and 90
Degree anti-clock wise at Z axis.
Possibly, you will see that the ant is partially (or fully) covered by the
geometry of Plan01. In that case, with the move tool, move the selected all
elements up to place the whole body of the ant just above the plane. If
necessary, please adjust other transform also (such as by slightly rotating
around the appropriate axis). Exit the Element sub-object level.
Go to Hierarchy panel > Affect Pivot Only > Center to Object. Also you could
play with different Pivot position to see exactly in which Pivot position the
ant’s movement is perfect. Click Affect Pivot Only again. That’s all for today.
Of course, there are other ways to correct this orientation problem. Hope to
discuss that in a future tutorial.

Add A Comment