9
820 Chapter 13: reactor
Create R BCollection—
When on, the tool creates a
Rig id Body Collection (page 2–723) and places all
the parts of the newly created rag doll character
into it.
Cr e ate CS o lve r—When on, the script adds a
Constraint Solver (page 2–736) to the scene,
which is then associated with the freshly created
Rigid Body Collection. All the hinges and rag
doll constraints that are created for the selected
humanoid are added to this. This option is
available only if you have chosen to create a Rigid
Body Collection.
Add Hand s—When on, if the selected humanoid
has hands, the script creates constraints to connect
the humanoid’s hands to the rest of the body.
Add Feet—When on, if the selected humanoid has
feet, the script creates constraints to connect the
humanoid’s feet to the rest of t he bo dy.
Snapshot Par ts—When on, the script creates a
separate geometry object for each object to be
attached to a constraint. It is the newly created
snapshot that is then used in the constraint and
added to the collection (if a collection is being
created).
Link To Original—When on, the newly created
snapshot geometries are link ed to the original
geometries. Available only when Snapshot Parts
is on.
Chang e N ame —When on, each geometric
component of the new rag doll is prefixed with the
text in the New Name field. Available on ly when
Snapshot Parts is on.
New Name—When on, each geometric component
of the new rag doll is prefixed with the text in the
New Name field.
Constrain Humanoid—Click to create the Rag Doll
constraints and, depending on the active options,
also create a copy of the s ource objects, a Rigid
Body Collection, and a Constraint Solver.
How It Works
The script works by assuming that you’ve used
the following naming conventions for the rag doll
parts. This naming convention follows that used
by the character s tudio Biped object to name
thelimbs.However,aslongastheyarenamed
as following, you can use any geometry created
in 3ds Max. The script scans the select ion for
geometry with names that include one of the
following:
•_R_UpperArm
•_R_ForeArm
•_L_UpperArm
•_L_ForeArm
•_R_Thigh
•_R_Calf
•_L_Thigh
•_L_Calf
•_Pelvis
•_Spine
•_Head
The script assumes that there is only one of each
type of part, except in the case of the spine, which
canhaveuptofiveparts.
At this point the adjoining parts are connected,
using mostly Rag Doll constraints (page 2–737).
However, the script also uses Hinges (page 2–747)
for the elbow and knee joints, as using Rag Doll
constraints would be overkill to achieve the simple
constrained motion found in an elbo w joint. The
script also sets suitable limits for e ach constraint.
In addition, the script sets the mass of each rigid
body in the character to 10.0 kilograms, and the
simulation geometry to be a bounding bo x. It also
disables collisions between constrained pairs of
bodies.