Anda di halaman 1dari 86

Tutorials

Special Effects

AUTODESK
®

3DS MAX
®

9
Autodesk® 3ds Max® 9
© 1990-2006 Autodesk, Inc., and/or its licensors
All rights reserved.
All user documentation ("User Documentation") contains proprietary and confidential information of Autodesk, Inc., and/or its licensors. The User
Documentation is protected by national and international intellectual property laws and treaties. All rights reserved. Use of the Documentation is
subject to the terms of the software license agreement that governs the use of the software product to which the User Documentation pertains
("Software").
This publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.
Autodesk, Inc., reserves the right to revise and improve its products as it sees fit. This publication describes the state of this product at the time of its
publication, and may not reflect the product at all times in the future.
AUTODESK, INC., MAKES NO WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS, AND MAKES
SUCH MATERIALS AVAILABLE SOLELY ON AN "AS-IS" BASIS.
IN NO EVENT SHALL AUTODESK, INC., BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE
LIABILITY TO AUTODESK, INC., REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE
MATERIALS DESCRIBED HEREIN.

Autodesk Trademarks
The following are registered trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December, 3December.com, 3ds
Max, ActiveShapes, Actrix, ADI, Alias, Alias (swirl design/logo), Alias|Wavefront (design/logo), ATC, AUGI, AutoCAD, AutoCAD LT, Autodesk,
Autodesk Envision, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSketch, Backdraft, Buzzsaw, Can
You Imagine, Character Studio, Civil 3D, Cleaner, Combustion, Constructware, Create>what’s>Next> (design/logo), DesignStudio, Design|Studio
(design/logo), Design Your World, Design Your World (design/logo), EditDV, Education by Design, FBX, Filmbox, Gmax, Heidi, HOOPS, HumanIK,
i-drop, IntroDV, Kaydara, Kaydara (design/logo), Lustre, Maya, Mechanical Desktop, ObjectARX, Open Reality, PortfolioWall, ProjectPoint, Reactor,
Revit, SketchBook, Visual, Visual Construction, Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Toolbox, Visual
Tugboat, Visual LISP, Voice Reality, Volo.
The following are trademarks of Autodesk, Inc., in the USA and other countries: AliasStudio, AutoCAD Learning Assistance, AutoCAD Simulator,
AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk Insight, Autodesk Intent, AutoSnap, AutoTrack, Built with ObjectARX (logo),
Burn, CAiCE, Cinestream, Cleaner Central, ClearScale, Colour Warper, Communication Specification, Content Explorer, Dancing Baby (image),
DesignCenter, Design Doctor, Designer’s Toolkit, DesignKids, DesignProf, DesignServer, Design Web Format, DWF, DWG, DWG Linking,
DWG (logo), DWG TrueConvert, DWG TrueView, DXF, Extending the Design Team, GDX Driver, Heads-up Design, Incinerator, LocationLogic,
MotionBuilder, ObjectDBX, PolarSnap, Powered with Autodesk Technology, Productstream, RealDWG, Real-time Roto, Render Queue, Showcase,
StudioTools, Topobase, Toxik, Visual Bridge, Visual Syllabus, and Wiretap.

Autodesk Canada Co. Trademarks


The following are registered trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Discreet, Fire, Flame, Flint, Frost,
Inferno, River, Smoke, Sparks, Stone, Wire. The following are trademarks of Autodesk Canada Co., in the USA, Canada, and/or other countries:
Backburner, Multi-Master Editing.

Third-Party Trademarks
clothfx is a trademark of Size8 Software, Inc. mental ray is a registered trademark of mental images GmbH licensed for use by Autodesk, Inc. RE:Flex is
a trademark of RE:Vision Effects, Inc. Intel is a registered trademark and the Intel Optimizer Logo is a trademark of Intel Corporation, used under
license. Havok is a trademark or registered trademark of Havok.com, Inc. or its affiliates in the United States and/or in other countries. All other brand
names, product names, or trademarks belong to their respective holders.

Third-Party Copyright Notices


I. OpenEXR Bitmap I/O Plugin © 2003-2005 SplutterFish, LLC.
OpenEXR © 2003 Industrial Light and Magic a division of Lucas Digital Ltd. LLC.
Zlib © 1995-2003 Jean-loup Gaily and Mark Adler.
II. HDRI Import created 2002 by SplutterFish and Cuncyt Ozdas.
III. Portions Copyrighted © 2000-2005 Size8 Software, Inc.
IV. Portions of this software are Copyright 1998-2004 Hybrid Graphics Limited.
V. This product includes Radiance software (http://radsite.lbl.gov/) developed by the Lawrence Berkeley National Laboratory (http://www.lbl.gov/).
VI. The JPEG software is copyright © 1991-1998, Thomas G. Lane. All Rights Reserved.
VII. Portions Copyrighted mental images GmbH 1989-2002.
VIII. Portions Copyright © IntegrityWare, Inc.; Npower Software LLC. All rights reserved.
IX. Portions Copyright © 1991-1996 Arthur D. Applegate. All rights reserved.
X. Lenzfx and Max R2 Copyright © Digimation, Inc. All rights reserved.

GOVERNMENT USE
Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 12.212 (Commercial Computer Software-Restricted
Rights) and DFAR 227.7202 (Rights in Technical Data and Computer Software), as applicable. Manufacturer is Autodesk, Inc., 10 Duke Street,
Montreal, Quebec, Canada, H3C 2L7.

PATENTS
Protected by one or more of U.S. Patent Nos. 5,287,408, 5,594,856, 5,731,821, 5,751,829, 5,760,716, 5,956,031, 5,986,657, 5,995,107, 6,034,695,
6,061,067, 6,064,394, 6,072,498, 6,081,624, 6,122,391, 6,144,385, 6,184,901, 6,195,098, 6,262,742, 6,313,842, 6,323,879, 6,363,503, 6,366,283, 6,396,420,
6,411,297, 6,463,180, 6,473,081, 6,487,322, 6,525,730, 6,650,339, 6,683,620, 6,714,194, 6,760,022, 6,762,757, 6,768,486, 6,888,542, 6,889,374,
6,947,058; and patents pending.
Special Effects

Files for This Section


Special Effects Tutorials
All the files necessary for this tutorial are provided
This section covers a multitude of effects you on the program disc in the \tutorials directory.
might encounter in your everyday life, such as a Before starting the tutorials, copy the \tutorials
simple cigarette smoke, water from an opened fire folder from the disc to your local program
hydrant, fog effects, and even tumbling down the installation.
stairs! You will learn how to use particle systems
with space warps, add environment and lens
effects, as well as create many simulations using
reactor.
Particle Animation
Features Covered in This Section
Particle systems are useful for a variety of
• Creating particle systems animation tasks. They’re most often employed
• Using forces and space warps when animating a large number of small objects
• Emitting particles from geometry using procedural methods; for instance, creating a
snowstorm, a stream of water, or an explosion. In
• Using materials with particles these tutorials, you learn how to create such effects
• Creating and manipulating a camera viewport with the two different types of particle systems in
• Using different lens effects 3ds Max: event-driven and non-event-driven.

• Setting up a volume light The event-driven particle system, called Particle


Flow, tests particle properties, and, based on the
• Creating fog
test results, sends them to different events. Each
• Creating rigid body collections event assigns various attributes and behaviors
• Creating simulations with reactor to the particles while they’re in the event. In the
non-event-driven systems, particles typically
• Setting physical properties for objects in
exhibit similar properties throughout the
simulation
animation, although they can come under the
• Using Hinge and Rag Doll constraints
790 Chapter 8: Special Effects

influence of external forces such as wind and


gravity.

Files for This Section


All the files necessary for this tutorial are provided
on the program disc in the \tutorials directory.
Before starting the tutorials, copy the \tutorials
folder from the disc to your local program
installation.

Note: For each tutorial, in addition to the standard


tutorial files, we provide a sample scene file with
Non-Event-Driven Particle "_completed" in its name. This shows the tutorial
file with all changes made. The completed scenes
Systems were used to render the sample AVI animations.
Particle systems are a useful tool for animating Skill Level: Intermediate
large amounts of objects procedurally. They can
mimic natural effects such as rain, smoke, and Time to complete: 2+ hours
snow, as well as less natural effects such as laser
blasts. The non-event-driven particle systems Features Covered in This Section
covered in these tutorials are particularly useful In these lessons you will learn:
for applications in which the particles’ properties
• Creating particle systems.
don’t change fundamentally over the course
of the animation. They also serve as a simple • Using space warps.
introduction to procedural animation. • Creating materials to make smoke.
Procedural animation is different than ordinary • Emitting particles from geometry.
keyframe animation. In keyframe animation, an • Using Noise controllers.
object is moved from keyframe to keyframe. In
procedural animation, the animation of objects • Using motion blur to create the illusion of water.
is controlled by a set of parameters. These • Using PArray and PCloud systems.
parameters can be keyframed over time, but for • Using parameter wiring.
the most part, you don’t animate individual objects
or particles in the system. • Adding fog and volume lighting.

Tutorial Files
All the files necessary for this tutorial
are provided on the program disc in the
\tutorials\simple_particle_effects directory.
Before starting the tutorials, copy the \tutorials
folder from the disc to your local program
installation.
Creating Cigarette Smoke 791

adjust, the fan’s geometry (except for the fan


Creating Cigarette Smoke motor) is frozen.
In this tutorial, you use a particle system to create a
Create the particle system:
stream of cigarette smoke trailing from an ashtray.
The animation relies on space warps to affect the 1. Activate the Top viewport.
movement of the smoke. For example, you use a
Wind space warp to model the fan in the scene 2. If you need to, select the ashtray and
blowing the smoke around. click Zoom Extents Selected to fit the ashtray
in the viewport.

3. In the Create panel, make sure


Geometry is active, and choose Particle Systems
from the drop-down list.
4. On the Object Type rollout, click Super Spray.
5. In the Top Viewport, click and drag in the
ashtray near the tip of the cigarette object.

Animation techniques used in this tutorial:


• Creating a particle system.
• Creating space warps that affect the motion of
the particles.
• Choosing appropriate particle geometry.
• Creating a material that models smoke when
applied to particles.
Time to complete: 30 minutes Super spray particle system in the Top viewport

Set up the scene:


• Open cigarette_smoke.max.
All the files necessary for this tutorial
are provided on the program disc in the
\tutorials\simple_particle_effects directory.
Before starting the tutorials, copy the \tutorials
folder from the disc to your local program
installation.
The scene contains a simple table, an ashtray,
and a fan. To make the animation easier to
792 Chapter 8: Special Effects

Slow the particles down and make them easier to


visualize:

1. With the Super Spray particle system


selected, go to the Modify panel.
Tip: Particle systems have a large number
of rollouts. If you like, you can expand the
command panel to see more rollouts and
controls at once. Move your mouse to the
border between the command panel and the
viewports, and drag the command panel to
Super spray particle system in a user view create multiple columns. The command panel
can be widened whether it is floating or docked.
You have now created a Super Spray particle To dock or float a command panel, right-click
system. The icon you see is called the emitter. The to one side of the tabs, and choose Float or
emitter doesn’t render, but it shows the location Dock from the flyout menu.
in the scene where particles will be emitted. The
arrow points up, indicating that initially particles 2. In the Basic Parameters rollout > Viewport
will move upward out of the center of the icon. Display group, change the display type to Dots
rather than Ticks.
When you create a Super Spray system, the
For the purpose of working in viewports,
particles are emitted toward you in the viewport
especially when particles are very close
you click. That is, they move along the Z axis in
together, Dots give a better preview than the
the positive direction. This is why we used the Top
plus-sign Ticks.
viewport to create the system.
3. In the Basic Parameters rollout > Particle
(Different kinds of particle systems have differently Formation group, set the Spread value for Off
shaped emitters, and different emission behavior.) Axis to 2.0.
• Activate the Camera02 viewport, and (This is the Spread spinner immediately below
then click Play. the Off Axis spinner, and not the Spread value
A burst of particles leaves the emitter rapidly, associated with Off Plane.)
moving in a vertical line. Each particle is 4. In the Particle Generation rollout > Particle
displayed as a plus sign or “tick.” By frame 40, Motion group, set Speed to 1.5.
all of the particles have moved out of the frame.
Now if you play the animation, you see the
This doesn’t look much like smoke.
particles stream upward more slowly. The slight
You are seeing the default behavior and settings increase in the Spread value means they don’t
for Super Spray. To get a more smoke-like effect, move in a completely straight line. (Spread is
the first thing to do is adjust the Super Spray measured in degrees. Higher Spread values create
parameters. a more fan-like pattern.)
However, the particles stop emitting at frame 30
and completely disappear from the scene at frame
100. To get a smoke effect, you also need to change
Creating Cigarette Smoke 793

the default values that govern particle generation reminiscent of smoke. But the movement of the
and lifetime. particle system still looks artificial.

Adjust particle generation: Adding Wind, Turbulence, and Drag


1. In the Particle Generation rollout > Particle Particles are not smart. Like sheep, you need
Quantity group, set Use Rate to 30. to herd them. Space warps such as Wind and
This increases the number of particles Gravity add directional fields that affect particle
generated per frame from 10 to 30. motion. In this simulation of cigarette smoke,
you’ll associate the fan with a Wind space warp
Note: When you play the animation in the
that models the breeze from the fan.
Camera02 viewport, you don’t see 30 particles
being emitted per frame. By default, in
Create a wind space warp to simulate a breeze from
viewports, Super Spray displays only 10 percent the fan:
of the particles actually being emitted. This
keeps viewport playback fast. You can adjust 1. Go to the Create Panel and turn on
the preview value in the Viewport Display the Space Warps button.
group of the Basic Parameters rollout, but we
recommend you keep it low. Previewing a large 2. Make sure Forces is the active space warp type.
percentage of particles in a system can seriously 3. In the Object Type rollout, click Wind.
slow down 3ds Max. When you render the 4. Drag in the Left viewport to create the Wind
animation, the rendering uses the full number space warp.
of particles.
Tip: A better way to preview the effect of all
particles is to use the command Rendering >
Make Preview.
2. Also on the Particle Generation rollout, in the
Particle Timing group, set both Emit Stop and
Display Until to 300.
The animation is 300 frames long. Setting Emit
Stop to 300 means that particles continue to
be emitted throughout the animation. Setting Wind space warp created in Left viewport (facing away
from user)
Display Until to the same value means that all
particles that haven’t died remain in the scene
Position the wind space warp:
until the end of the animation.
3. Continuing down, set the Life value to 180.
• Activate the Top viewport. Using
A particle in this system dies 180 frames after Rotate and Move transforms, align the Wind
it is emitted. Not all of the particles will last space warp roughly to that of the fan. The arrow
until frame 300. should point in the direction of the particles.
Now the particles emerge in a denser cloud that
doesn’t move right out of the scene. This is more
794 Chapter 8: Special Effects

2. Click Bind To Space Warp, then click the


Super Spray system, and hold the button down
as you drag to the Wind space warp.
When Bind To Space Warp is active and the
cursor is over a selected object, the cursor
changes to the space warp icon to inform you
that this object can be bound to a space warp.
Then when you drag from the object to the
Wind space warp in Top viewport, before aligning to fan space warp, a line is drawn to show which object
is being bound. Once off the object, the cursor
changes again until it’s over a suitable space
warp. Then it reverts to the space warp icon to
inform you that this binding is legal. When you
release the mouse, the bound space warp briefly
highlights to indicate the binding is complete.

3. Activate the Camera02 viewport, then


play the animation.
The effect of the wind is much too strong. The
Wind space warp in Top viewport, after aligning to fan smoke is whipped around dramatically.
You don’t have to be too accurate about aligning
the Wind icon with the fan motor. The wind Adjust the strength of the wind:
direction, and linking it to the motor’s motion, By default, the Wind space warp’s Strength value is
are the important things. 1.0. Reducing the Strength value makes the effect
of the fan look more realistic.
Link the wind to the fan so their motion is
coordinated:
1. Select the Wind space warp.

• With the Top viewport still active and


2. In the Modify panel, set the Strength
the Wind space warp still selected, click Select
value to 0.03.
And Link, then drag from the Wind space warp
to the FanMotor object. 3. Activate the Camera02 viewport, then
Now if you play the animation, the Wind space play the animation.
warp rotates with the oscillating fan. Nothing The smoke is more gently wafted now. But
has changed the animation of the particles. you can make the smoke’s appearance more
They are unaffected by the Wind space warp realistic still, by giving it a bit of inertia. To do
until you explicitly bind them to it. so, you use another space warp.

Bind the wind space warp to the smoke particles:

1. Select the Super Spray particle system.


Creating Cigarette Smoke 795

Add a drag space warp: Bind the drag space warp to the smoke particles:

1. Go to the Create panel and click 1. Click Bind To Space Warp, then in the
the Space Warps button. Top viewport click the Super Spray system, and
2. Make sure Forces is the active space warp type. hold the button down as you drag to the Drag
space warp.
3. On the Object Type rollout, click Drag.
Now a drag force is applied to the particles. The
4. In the Top viewport, drag to create a Drag space
force is non-uniform: there is more drag along
warp near the Super Spray.
the Z-axis (up and down in the scene) than in
other dimensions.
2. Activate the Camera02 viewport, then
play the animation.
The effect of the Wind space warp is decreased.
The Drag warp slows down the particles.

Add turbulence to the wind:


The smoke looks better, but its motion is still
unnaturally uniform. The solution is to make the
Wind more turbulent.

Drag space warp created in the Top viewport 1. Select the Wind space warp.

Set the drag space warp parameters:


2. On the Modify panel, go to the Wind
The Drag space warp has a large number of group box in the Parameters rollout. Set
parameters. For the purposes of this animation, Turbulence to 0.03, Frequency to 0.12, and
you need to set only a few of them: Time Off, and Scale to 0.1.
the Axis percentages for Linear Damping.
The Turbulence value controls how much the
particles are perturbed from their position.
1. With the Drag space warp selected, go Frequency causes random variation in the
to the Modify panel. Set Time Off to 300. turbulence, and Scale adjusts the size of the
By default, the Time Off value is 100, but you turbulence field.
need Drag to be active for the duration of the Why such low values? Actually, a good rule of
animation. thumb for turbulence settings is to start very
2. With Linear Damping the active damping type, low and work your way up. Turbulence creates
set the X and Y Axis percentages to 1.0, and the a fractal noise field that is localized to the Wind
Z Axis percentage to 2.0. space warp icon. The scale of this field needs to
match the scale of your scene. The easiest way
As with Wind, the Drag space warp doesn’t
affect the particles until you bind them to it. to do this is to start with low values and then
increase them as needed.
796 Chapter 8: Special Effects

Change the particle geometry:


3. Activate the Camera02 viewport, then
play the animation.
The particles move much more like cigarette 1. Select the Super Spray particle system.
smoke, with wispy sways and curls.
Also, the particles are blown in the current 2. Go to the Modify panel.
direction of the Wind space warp on a given 3. If one of the space warp bindings is chosen in
frame. The effect is not conical with attenuation the modifier stack, click the Super Spray entry
as it would be for an actual fan; instead, the so you can see the particle system’s rollouts.
effect of the wind and its turbulence is parallel. 4. In the Particle Type rollout > Standard Particles
group, choose Facing.
Particle Geometry
Facings are square particles that are constantly
While the movement of the smoke is now good, oriented towards the camera. If you rendered
the particle geometry needs some adjusting. them as solid, they wouldn’t appear realistic,
either. But facing particles are meant to have
Preview the particle system:
a material applied to them. When facings are
• Activate the Camera02 viewport, then clumped together and a material gives them a
choose Animation > Make Preview. A Make degree of transparency, you can achieve a fairly
Preview dialog appears. Leave the settings realistic smoke.
at their defaults, and click Create. A Video The size of the particles is uniform. In general,
Compression dialog appears. Use this dialog’s when you want realistically to model natural
default settings as well, and click OK. phenomena, you want to avoid uniformity.
When the preview completes, use Animation >
View Preview to view it as an AVI movie. Make the particle geometry more random:
Ideally, the particles should increase in size after
they are born, and then fade out as they die. The
Grow For and Fade For parameters let you do this.
Also, to break up the unrealistic uniformity of the
particle size, you need to add some variation to
the size.
1. With Super Spray still selected and the Modify
panel still active, go to the Particle Size group
near the bottom of the Particle Generation
rollout.
2. Set the Size to 2.0 and the Variation to 30 %.

The particles still appear as a bunch of 3. Set the Grow For value to 90 and Fade For to 30.
solid-looking dots (by default, they render as 3D In these last steps, you have increased the
triangles). To make them more convincing as overall size of the particles and randomized this
smoke, first you adjust the particle geometry, then size by plus or minus 30 per cent. Each particle
you apply an appropriate material to them. now grows for 90 frames, from an initial size
of zero to the full size it will achieve. Thirty
Creating Cigarette Smoke 797

frames before it dies, it begins to shrink back Assign the material to the smoke particles:
down to a size of zero. (Remember that you
have set each particle to live for 180 frames.) • Click Assign Material To Selection, or drag
from the sample slot to the Super Spray particle
Cigarette Smoke Material system.
Now that you’ve adjusted the particle geometry, A rendering would show that the smoke is now
you can shade the particles to look like smoke. The more smoke-colored, but has hard, jagged
trick to this is to use a soft, partially transparent edges from the square facing particles.
material that allows the particles to blend together
and form a wispy smoke pattern. Because the
particles are rendered as square facing geometry,
a radial gradient with transparent edges can
accomplish this.

Set up the material:

1. Open the Material Editor.


2. Choose an unused sample slot.
3. On the Blinn Basic Parameters rollout, click
the Diffuse color swatch to display the Color Smoke particles without transparency appear too solid
and jaggy.
Selector.
4. Set the Diffuse color to pure white (Value=255). To soften the smoke, you create a radial gradient
with transparency at its edges.
5. Set both the Specular Level and Glossiness
values to 0. Make a radial gradient map for the smoke particles:
6. Turn on the Self-Illumination Color check box. 1. In the Material Editor, open the Maps rollout
The Self-Illumination control changes from a and click the Opacity map button.
spinner to a color swatch. 2. In the Material/Map Browser, choose Browse
7. Click the Self-Illumination color swatch. In the From: New, click Gradient, and then click OK.
Color Selector, set the self-illumination color to 3. On the Gradient Parameters rollout, change the
a medium gray (Value=144). Gradient Type to Radial.
8. On the Shader Basic Parameters rollout, turn
on the Face Map toggle. 4. Click Go To Parent to return to the base
level of the material.
Use Face Map shading with Facing particles, so
that each rendered particle displays the entire 5. On the Maps rollout, change the Opacity
map. Amount value to 5.
You now have a material that is pure white, The Gradient map determines only five per
partially self-illuminated with a medium gray cent of the opacity. Ninety-five percent of the
color, and face mapped for particles. opacity is still controlled by the base Opacity
parameter. For smoke, make the particles as
798 Chapter 8: Special Effects

soft and semi-transparent as possible, especially this tutorial, a slightly different particle system,
with high particle counts. So the Gradient map PArray, emits particles from an object surface.
should be the only thing that sets the Opacity
of the particles, but you also want the overall
Opacity to be very low. For this animation, you
turn off the base Opacity value completely.
6. In the Basic Parameters rollout, set the Opacity
value to 0.
The rendered scene now has very soft smoke
that rises up, grows gradually in size, and is
blown around and perturbed by the wind from
the fan.

Animation techniques used in this tutorial:


• Emitting particles from geometry instead of
from a point in space.
• Using Track View and a Noise controller to
animate particle flow.
• Using motion blur to make the particles appear
more like water.
Time to complete: 45 minutes

The Final Animation Set up the scene:

You are now ready to activate the Camera02 • Open gushing_water.max.


viewport and render the entire animation. All the files necessary for this tutorial
Even at low resolution, this can take about half are provided on the program disc in the
an hour. Alternatively, you can play the file \tutorials\simple_particle_effects directory.
cigarette_smoke.avi, provided on the Tutorial Files Before starting the tutorials, copy the \tutorials
CD. folder from the disc to your local program
installation.
This is a simple street scene with a brick wall,
Creating Gushing Water
sidewalk, street, and fire hydrant.
This tutorial uses particles to simulate gushing
water. The techniques are similar to those in the Creating a Stream of Water
cigarette smoke tutorial (page 791), but include
To simulate water, the particles should be emitted
some new methods. For example, in the cigarette
from the fire hydrant geometry. The PArray
smoke tutorial, the Super Spray particle system
particle system can do this.
emitted particles from a single point in space. In
Creating Gushing Water 799

Make a particle system that will be emitted from the Choose the fire hydrant nozzle as the particle
fire hydrant: emitter:

1. On the Create panel, make sure 1. With the PArray icon selected, go to the
Geometry is active. Choose Particle Systems Modify panel.
from the drop-down list. 2. Click the Pick Object button at the top of the
2. Turn on PArray, then drag in the Right viewport Basic Parameters rollout.
to create a PArray particle system. 3. Press H , and then choose Firehydrant-
nozzle01 in the Select Objects dialog. Click
Pick.
Now if you drag the time slider, you’ll notice
that particles shoot out in all directions. By
default, PArray emits particles from the entire
surface of the selected object, in the direction
of the polygons’ normals. (If the normals
were flipped, the particles would emit inward,
toward the center of the hydrant.)
For this scene, the particles should emit only
from the cap face at the end of the nozzle. To do
PArray in Right viewport
this, create a sub-object selection.

Create a sub-object selection to restrict particle


emission:

1. Select Firehydrant-nozzle01, and


then go to the Modify panel.
2. Choose Modifiers > Selection Modifiers >
Mesh Select.
3. Open the Mesh Select modifier’s hierarchy,
and choose Polygon as the active sub-object
level.
PArray in Camera01 viewport

The placement of the PArray system doesn’t


matter, except for your convenience in selecting it.
If you drag the time slider or play the animation,
you’ll notice that no particles are emitted. PArray
requires you to specify an object from which the
particles are emitted.
800 Chapter 8: Special Effects

4. Select the circular polygon at the end of


the cylinder used to model the nozzle.

Nozzle sub-object polygon selection in Camera01 viewport

Now you have a sub-object selection that the


PArray particle system can use.

Set the PArray to use the sub-object selection:


1. Click the Mesh Select entry in the modifier
stack display to turn off sub-object selection.

2. In a viewport, select the PArray icon.

3. On the Modify panel, go to the


Basic Parameters rollout, and in the Particle
Formation group, turn on Use Selected
SubObjects.
Nozzle sub-object polygon selection in Right viewport
Now particles are emitted from only the end of
the cylinder, as if it were an actual nozzle.

Adjust the particle generation parameters:

1. With the PArray still selected and the


Modify panel still active, go to the Particle
Generation rollout.
2. In the Particle Quantity group, set the Use Rate
value to 50.
Creating Gushing Water 801

Now 50 particles per frame are emitted.


(Viewports preview only 10 percent of the
particles by default, so this change will be more
obvious when you render.)
3. In the Particle Motion group, set the Divergence
angle to 15 degrees.
This parameter controls how much the stream
of particles spreads. At a Divergence of zero,
particles are emitted in a straight line along the
normals of the emitter object.
Gravity in Top viewport
4. In the Particle Timing group, set the Emit Stop
value to 100.
In other words, particles are emitted for as long
as the animation lasts (100 frames).
5. Set the Life value to 100.
Particles should live for the duration of the
animation, too.

Using Space Warps to Control the Stream


To make the stream of particles behave more
effectively like water, you use two space warps:
a Gravity space warp to make the stream fall
realistically, and a Deflector space warp to model
the roadbed.
Gravity in Camera01 viewport

Add gravity to control the stream: The default parameters for the Gravity space
warp are satisfactory, so you don’t need to adjust
1. On the Create Panel, click Space them. Gravity is pretty straightforward: simply a
Warps. directional force with realistic acceleration.
2. With Forces the active space warp category,
Bind the gravity space warp to the particles:
click Gravity. Drag in the Top viewport to create
the space warp near the fire hydrant object.
1. Click Bind To Space Warp.
By default, Gravity is exerted along the negative
Z axis (away from the viewer) in the viewport 2. Drag from the PArray particle system to the
where you create it. So using the Top viewport Gravity space warp. When the cursor changes
to create Gravity makes it pull downward, as to notify you that the binding is legal, release
one usually expects. the mouse button.
The Gravity space warp highlights briefly to let
you know that the operation is complete.
802 Chapter 8: Special Effects

3. Now drag the time slider again. Bind the deflector to the particles:
Particles emitted from the nozzle are now
affected by gravity, and fall downwards. 1. Turn on Bind To Space Warp.
Unfortunately, at this point they also fall 2. Drag from the PArray particle system to the
through the street. Renderable geometry does Deflector space warp. When the cursor changes
not deflect particles. To model the street, to notify you that the binding is legal, release
you’ll create a Deflector space warp to stop the the mouse button.
particles when they reach ground level.
The Deflector space warp highlights briefly to
Add a deflector at street level: let you know that the operation is complete.
3. Drag the time slider.
1. On the Create panel, click Space The PArray particles emit from the nozzle, fall
Warps if necessary. Change the active space downward due to Gravity, and then bounce
warp category to Deflectors, and then click off of the Deflector. At this point, the particles
Deflector. bounce too much. In reality, when an object
2. Drag in the Top viewport to create the Deflector bounces or reflects from an object, a certain
space warp. This space warp’s icon should cover amount of energy is lost. Also, the particles
the area covered by the Street and Curb objects. don’t come to rest but keep moving as if the
It can extend beyond their bounds, as well. street object were a smooth sheet of glass. Both
Creating the Deflector in the Top viewport of these problems can be corrected by adjusting
ensures that it is created at ground level. Deflector parameters.
Unlike some kinds of space warps, the size and
location of the Deflector icon have an effect in 4. Select the Deflector space warp if
the scene. The deflector controls the region necessary and go to the Modify panel.
where particles will be deflected. A deflector
5. In the Parameters rollout, change the Bounce
doesn’t render, but its placement affects particle
value to 0.2, and increase the Friction value to
interaction.
10.0.
6. Drag the time slider.
Now particles reflect from the Deflector with
less velocity, and as they slide across its surface,
the increased friction makes them come to rest
eventually.

Modulating the Rate of Particle Emission


So far, the fire hydrant emits water in a steady
stream. This doesn’t look too realistic, because
gushing water tends to pulse. To simulate this, you
can animate the PArray system’s Speed parameter.
In this tutorial, you combine a Bezier Float
controller with a Noise controller to apply some
Deflector in top viewport
Creating Gushing Water 803

randomness to the Speed, creating a pulsating 5. Locate the Speed parameter for the PArray
motion. Object by expanding Object (PArray).
Tip: If you can’t locate PArray01 in the Track
Assign controllers to the Speed parameter:
View dialog, choose Display > Filters, and
assure that Objects is selected in the Show
1. Select the PArray particle system group of the Filters dialog.
in the viewport.
6. With the Speed parameter chosen, choose
2. On the Modify panel > stack display, click the Controller > Assign. Choose Bezier Float from
PArray system to activate its controls, rather the Assign Float Controller dialog.
than one of the space warp bindings.
The Bezier Float controller inherits a value
of 10 from the original Speed setting. You
can actually keyframe this value, but in this
animation there is no need to do so.
7. Choose Controller > Assign again, and choose
Float List from the Assign Float Controller
dialog.
Float List is a List controller that combines
controller values. If you expand the Speed
hierarchy in Track View, a track labeled
Available appears at the bottom of the Speed
tracks. This is where you add new controllers
Before and after selecting the PArray level
to the list.
3. On the Particle Generation rollout, right-click 8. Click the Available track to highlight it, then
the PArray’s Speed value. choose Controller > Assign once more, and
choose Noise Float from the Assign Float
Warning: Don’t right-click the up/down arrows to
Controller dialog.
the right of the spinner. This resets the Speed to 0.0.
9. The List Controller dialog appears. Dismiss it,
4. In the pop-up menu, choose Show In Track
and select the Noise Float: Noise Float item in
View.
Trackview.
Track View opens to show the various
10. Right-click Noise Float: Noise Float and select
parameters for PArray.
Properties from the quad menu.
The Noise Controller dialog appears.
804 Chapter 8: Special Effects

Combining the Noise controller with Bezier


Float gives you more control over the variation.
Specifically, the Noise value modifies the
Bezier value. With a Bezier value of 10 and a
Noise range of 10, the result of the Float List
potentially will range between 10 and 20, at a
Adjust the Noise parameters: mean of 15. (It actually ranges from less than
The Noise controller can generate a randomly 12 to approximately 18.)
pulsating motion. The default settings for Noise Note: You can achieve a similar effect by using
don’t accomplish this, so you need to adjust them. the PArray Variation parameter for particle
1. On the Noise Controller dialog, change the motion, but the controllers give you more
settings as follows: control and eliminate the need for keyframing.
• Set the Frequency to 0.2. This makes the 4. Close Track View.
noise more undulating and less jittery.
Preview the animation:
• Turn off Fractal Noise. This too makes the
noise smoother by making value changes • Activate the Camera01 viewport, and
less abrupt. then click Play.
• Turn on the toggle labeled > 0. This Now particles are emitted with a more realistic
constrains the value to be greater than pulsing motion, with spurts here and there.
zero. In terms of the Speed parameter, The animation is now ready to render, except that
less-than-zero values would be rounded the water particles need an appropriate material.
to zero, causing particles to have no speed
when they are emitted. Creating a Water Material
• Set the Strength value to 10.0. This For gushing water, you want a material that
constrains the value to be no greater than appears like foamy water. This material is similar
20. The Speed value will range between 10 to the material you created for smoke. Facing
and 20. particles with a soft radial gradient map causes
2. Close the Noise Controller dialog. rendered particles to blend together into a foamy
3. Close the List Controller dialog that appears. stream that approximates the look of water.

Notice that there is still an Available track at the Set up particles to render as facing geometry:
bottom of the Speed hierarchy. You can add as
many controllers to the list as you want. This
1. Select the PArray particle system
can be a powerful technique.
and go to the Modify panel.
Creating Gushing Water 805

2. In the Particle Type rollout, go to the Standard


4. Click Go To Parent to return to the parent
Particles group, and choose Facing.
material. In the Maps rollout, click the Diffuse
3. In the Particle Generation rollout, go to the map button.
Particle Size group. Set the Size value to 4.0,
5. In the Material/Map Browser, choose a Mask
and the Variation value to 25.0 %.
map, and then click OK.
If you render the scene right now you see that
6. In the Mask Parameters rollout, click the Mask
the particles are displayed as square facings. As
button.
with smoke, you need to soften their edges to
make them appear more amorphous. 7. In the Material/Map Browser, choose a Gradient
map, and then click OK.
8. In the Gradient Parameters rollout for the new
gradient map, set the Gradient Type to Radial.

Turn on face mapping to match the particle system:

• Click the Go To Parent button to return


to the parent material. In the Shader Basic
Parameters rollout, turn on Face Map.
If Face Map is turned off, the facing particles
still retain their sharp edges. This is because, by
default, particles read gradient maps over time,
not at once as for other kinds of geometry.
Create the material:
Assign the material:
1. Open the Material Editor and select an
unused sample slot. • Assign this new material to the PArray
2. Click the Diffuse color swatch to display the
particle system.
Color Selector, and change the diffuse color Now when you render the scene, the particles
to blue-gray (for example, R=150, G=181, are blended together quite nicely.
B=205).
3. Make the material very glossy by setting the
Specular Level to 131 and the Glossiness to 63.

Apply maps to control the material’s opacity:


1. Open the Maps rollout and click the Opacity
map button.
2. In the Material/Map Browser, choose a Gradient
map, and then click OK.
3. In the Gradient Parameters rollout, set the
Gradient Type to Radial.
806 Chapter 8: Special Effects

The particles still look a bit "blobby," for water. To an hour. Alternatively, you can play the file
improve this, you can use Image Motion Blur. gushing_water.avi, provided on the program disc.

Adding Motion Blur


There are several ways to generate motion blur in
3ds Max. For the water from the hydrant, you use
the method called Image Motion Blur. Particle Flow
In these tutorials, you’ll learn how to use the
Assign Image Motion Blur to the PArray:
Particle Flow particle system in 3ds Max to create
special effects such as water splashing, mist
1. Select the PArray particle system, and blowing, the explosive impact of an asteroid into a
then right-click it. planet surface, guided missiles trailing smoke and
2. Choose Properties from the quad menu blowing up targets, and more.
(lower-right, Transform quadrant).
Features Covered in This Section
3. In the Motion Blur group of the Object
Properties dialog, set the blur type to Image, Among the 3ds Max features covered in these
and make sure Enabled is turned on. Click OK. tutorials are the following:
• Spawning particles upon collision with a
deflector.
• Changing particle type based on test results.
• Applying forces such as gravity and drag to
particles.
The scene is now complete. • Using scripting with an event-driven particle
system.
The Final Animation • Using materials with particles.

Files for This Section


All the files necessary for this tutorial
are provided on the program disc in the
\tutorials\particle_effects directory. Before
starting the tutorials, copy the \tutorials folder
from the disc to your local program installation.

Tutorials in this Section


Introductory Tutorial (page 807)
Modeling Whipped Cream (page 813)
You are now ready to activate the Camera01
viewport and render the entire animation.
Even at low resolution, this can take about half
Introductory Tutorial 807

Introductory Tutorial
The best way to understand Particle Flow is by
using it. This tutorial will acquaint you with some
of the basic methods of working with Particle Flow.

Create the Particle Flow system:


1. Start 3ds Max or reset the program.
2. On the Create panel > Geometry category, click
the drop-down list and choose Particle Systems.

3. On the Object Type rollout, click PF Source.


4. In the Perspective viewport, drag out a
By default, the icon emits particles downward
rectangle.
from its entire surface. In the viewport, the
particles appear as ticks.
6. Go to frame 10, and press Shift+Q to render
the Perspective viewport.

This is the Particle Flow icon, or source, named


PF Source 01. By default, it acts as an emitter,
but you can also use any other object as an
emitter.
5. Drag the time slider.
808 Chapter 8: Special Effects

The rendered particles appear in a window.


The default particle shape is a tetrahedron, a
four-sided triangular solid. Its geometry is 1. Event display
very simple, so the system can handle many 2. Particle diagram
particles quickly and efficiently, but it gives a 3. Global event
good idea of how particles are behaving. Other 4. Birth event
basic shapes are a low-poly sphere and a cube; 5. Depot
Particle Flow also lets you use any scene object
as particle geometry. Particle View is where you manage and edit
the particle system. The main window, known
Modify the particle system in Particle View: as the event display, contains the particle
1. Press the 6 key to open Particle View. The diagram, which describes the particle system.
particle source icon need not be selected. The default system starts with a global event,
with the same name as the Particle Flow icon,
Tip: You can also open Particle View from the
followed by a birth event, containing a Birth
command panel when a Particle Flow source
operator and several others that define the
icon is selected.
system’s initial properties. Each operator’s
name is followed by its most important setting
or settings in parentheses. Above the event
display is a menu bar, and below is the depot,
containing all operators available for use in the
particle system. For more information about
this dialog, see Particle View.
Introductory Tutorial 809

2. In the global event, PF Source 01, click the


name of the Render 01 (Geometry) operator to
highlight it and access its parameters. Be sure
to click the text area; clicking the icon simply
toggles the operator’s active state.
Because this operator is in the global event, it
affects the entire particle system. Any operator
you place here does likewise. For example, you
can define a global material here, or you can
define different materials locally in each event.
For best results, don’t combine global and local
operators of the same type in a single system;
Now the particles appear as tetrahedrons in the
use one or the other.
viewports.

Wire two events together:


Next, you’ll add a test and use it to wire the birth
event to a new event.
1. In the depot at the bottom of the Particle View
dialog, find Age Test. It’s the first item that uses
a yellow, diamond-shaped icon.

The settings for the Render operator appear in


a rollout on the parameters panel, on the right
side of the Particle View dialog. These include a
drop-down list for how particles are to render,
the percentage of particles that will render, and
how to split up the particles into individual
meshes.
Next, you’ll change the particle display type.
3. In the birth event, Event 01, click the Display 01
(Ticks) operator at the bottom of the list.
The display type is set to Ticks, as noted in the
operator name in the event.
2. Drag an Age Test from the depot into the Event
4. Next to the Type label, click Ticks, and from the
01 list, at the bottom of the list.
drop-down list, choose Geometry.
810 Chapter 8: Special Effects

Before you release the mouse button, make sure The test type is Particle Age, so this means that
you see a solid blue line in Event 01 under the all particles that have existed for more than 15
Display operator. If the line is red and goes frames will test True, and be passed on to the
through an existing operator, the Age Test will next event.
replace that operator. If you drop the Age Test Next, you’ll create a new event and wire it to the
outside of Event 01 it will create a new event. test.
4. From the depot, drag the Shape operator
(“Shape”) to an empty part of the event display,
below Event 01.

Age Test appears in the list, with its test output


sticking out to the left. This is the part you use
to connect the test to the next event.
3. Click the Age Test item in the list, and then
in the Age Test 01 rollout on the right side
of Particle View, set Test Value=15 and
Variation=0.
Introductory Tutorial 811

The actual location of an event in the event


display doesn’t matter; the recommended
placement is for the sake of convenience when
wiring the events. It also helps to make sense of
complex schematics if the events are arranged
logically.
You can move an event by dragging its title bar.
Next, you’ll perform the actual wiring of the
Age Test to the new event.
5. Position the mouse cursor over the blue dot at
the left end of the Age Test’s test output.
The cursor image changes to an icon depicting
three arrows pointing inward toward a circular
connector.
6. Drag from the event output on the Age Test in
Event 01 to the Event 02 input, and then release
the mouse button.

The Shape operator appears in a new event,


named Event 02. Like Event 01, the event has a
circular event input sticking out from the top.
Also, Particle Flow automatically adds a local
Display operator to the event so its particles will
be visible in the viewports. You can disable the
automatic creation of local Display operators
by choosing Options menu > Default Display
> Global.
812 Chapter 8: Special Effects

pressing the Delete key. Feel free to try


this now, but undo any changes when you’re
finished.
7. Click the Shape 02 operator and set
Shape=Cube. Also, click the Display 02
operator and set Type=Geometry.

View the wiring results:


1. Play the animation. Adjust the viewports so you
can see the entire particle stream, if necessary.

As you drag, the cursor image changes from


a three-arrow icon to a circular connector by
itself when it’s over an empty space in the event
display area, and then to a four-arrow icon
when it’s over the Event 02 input.
When you release the mouse button, a blue Starting at frame 16, the particles at the head
“wire” appears connecting the two events. This of the stream change into cubes, indicating
wire indicates that particles that meet the Age that they’ve entered Event 02. As time goes on,
Test conditions will pass “through” this wire to more and more particles pass the age of 15 and
Event 02, to be affected by its actions. become eligible to go to the next event.
Tip: You can delete a wire (and anything else 2. While the animation is playing, try modifying
in the particle diagram) by selecting it and the different operator settings to see what
happens. For instance, click Speed 01 and
Modeling Whipped Cream 813

change the Speed and Direction settings. When Here, you will use an existing particle flow
you change a setting, the change is reflected animation, and add BlobMesh to the particles to
in the viewports in real time, even during make them look like a thick, liquid substance.
playback.
Set up for this lesson:
Try right-clicking actions and events and using
Rename to give them custom names. Even with 1. Open the file tut_blobmesh_start.max from the
a custom name, an action’s tooltip reveals its tutorials\blobmesh folder.
type. This file contains animation of a can of
Another facility of the right-click menu is to whipped cream spraying particles onto a bowl
add comments to actions and events. Once of strawberries.
you do so, a small red triangle indicates the 2. Play the animation.
comment’s presence.
Congratulations! You now have a working
knowledge of Particle Flow. If you’d like to try
some more tutorials, go to the Particle Flow
tutorials.
BlobMesh is a compound object in 3ds Max that
creates a set of spheres from geometry, shapes, or
particles, and connects the resulting mesh together
as if the spheres were made of a soft substance.

The particles are tetrahedrons. There are


deflectors on the strawberries, the bowl, and
the tabletop, and the particles are set up to stop
moving when they hit any deflector.

Create the blobmesh:

1. Choose Create panel > Geometry


When the spheres are animated and come within > Compound Objects.
a certain distance of one another, they connect 2. Click BlobMesh, and click anywhere in the
together. When they move apart, they become scene to create one blobmesh sphere.
spheres again.
BlobMesh is particularly powerful with particle 3. Go to the Modify panel.
systems such as Particle Flow, where you can use it 4. In the Parameters rollout > Blob Objects group,
to make the particles appear thick and viscous. click Add. Select PF Source 01, then click Add
Blobs.
814 Chapter 8: Special Effects

This adds the particles to the blobmesh object.


5. Play the animation.
The particles are replaced by blobs. The blobs
obtain their sizes from the particle sizes.
In the viewport, some of the smaller particles
will appear not to be surrounded by blobs. This
is because BlobMesh uses a different level of
detail for viewports and renderings.
6. Press M to open the Material Editor. Select
the material named Whipped Cream, and drag
it over BlobMesh01 in the scene.
Tip: You can add a Relax modifier to the
BlobMesh01 object to make the blobs look
softer.
You can find a finished version of this scene in
the file tut_blobmesh_finish.max. You can also
see an animation created with this scene in the
file tut_whippedcream.mov.

Summary
The BlobMesh compound object provides an easy
way to make soft, liquid substances, especially
when used in conjunction with a particle system.

The whipped cream changes in the viewport


when the material is assigned to it.
7. Render a frame to see how the blobs look in the
final rendering.
Creating the Sun with a Lens Flare 815

Adding a Camera View


Creating the Sun with a Lens
Set up your scene:
Flare
Files for this tutorial are in the \tutorials\lens_flares
directory.
1. On the File menu choose Open, and then
choose tut_marsandsun.max.
2. Activate the Top viewport and zoom out.

3. On the Create panel, click the Cameras


icon and click Target in the Object Type rollout.
4. Click near the bottom of the Top viewport, drag
toward Mars, and release.

In this tutorial, you’ll create a glowing sun using


Lens Flare, Glow, and Star.
Skill Level: Intermediate
Time to complete: 30 minutes

Features Covered in this Tutorial


• Creating and manipulating a camera viewport
• Using omni lights to light your scene
• Creating and manipulating a Glow lens effect
• Using multiple Glow lens effects to create an
ambient lighting effect
• Creating and manipulating a Ring lens effect
• Creating and manipulating a Star lens effect

Tutorial Files
All the files necessary for this tutorial are provided This creates a target camera pointing at the
on the program disc in the \tutorials\lens_flares center of Mars.
directory. Before starting the tutorials, copy
5. Activate the Perspective viewport. Change it to
the \tutorials folder from the disc to your local
a camera viewport by pressing C .
program installation.
816 Chapter 8: Special Effects

6. Click Truck Camera. In the Camera


viewport, pan the viewport to the left so there
is space for the sun on the right side of Mars.

Adding Lights
There are no lights in the scene. In this step, you’ll
add two Omni lights: one to light Mars, and the
other to be the Sun.

Light your scene:


1. From the Create menu, choose Lights >
Standard Lights > Omni.
4. Select Sun and at the top of the Modify panel,
2. In the Top viewport, click to create an Omni click the color swatch. The Color Selector
light to the right and below Mars. Name it appears. Change the color to a yellow-orange
marslight. and click OK.
3. Create a second omni light to the right and Note: Both lights are adding illumination to
above Mars. Name it Sun. the scene. With the camera in front of Mars,
the lighting of the sun doesn’t really add to the
illumination on the dark side of the planet. If
this becomes a problem later, you can exclude
this light from illuminating any objects in the
scene.
5. Move marslight left or right to create a lighting
effect you like for the dark side of Mars.
Now use contrast to add some drama to your
light.
Adding a Glow to the Sun Using Lens Effects 817

6. In the Modify panel, go to the Advanced Effects 2. Go to the Modify panel and click the
rollout > Affect Surfaces group, and increase Atmospheres & Effects rollout title to open it.
the Contrast setting for marslight to 77.
You won’t see the changes until you render the
scene.

7. Activate the Camera viewport, then on


the toolbar, click the Quick Render button.

3. Click the Add button. The Add Atmosphere Or


Effect dialog appears.

You still don’t see the light that will be your Sun
in the rendered image. It won’t appear until you
add effects in the next topic.
Tip: Try different contrast values and render
each one. The higher the value, the sharper the
edge of the light.

Adding a Glow to the Sun Using


Lens Effects 4. In the list, click Lens Effects, and then click OK.

In this topic, you’ll create a simple glow effect and Lens Effects is now listed in the Atmospherics
add a ring and a star effect to it. This will allow the and Effects window.
Sun to glow in the sky above the planet.
You can add as many different effects as you like
to create the sun’s glow. Try this effect, and then
experiment with others.

Create a glow effect:


1. In the Camera viewport, select the Omni light
named Sun.
818 Chapter 8: Special Effects

5. Click the Lens Effects name in the window and


click Setup.
The Environment and Effects dialog appears.

6. In the Name field, name this lens effect Sun.


The name is changed in the windows in the
rollout and the dialog.
7. In the Preview group, turn on Interactive.
A rendered frame window appears. This lets
you see the lens effect as you make changes.
Adding a Ring Effect 819

Tip: You should turn off Interactive when


working in a complex scene, but it’s useful for
experimentation.
8. On the Lens Effects Parameters rollout, choose
Glow in the list on the left. Click the right arrow
to move the effect into the list on the right.

After a brief delay, the light source appears as a


glowing sphere in the virtual frame buffer.
9. Scroll down to the Glow Element rollout. In the
Name field, enter Main Sun.
To change the look of your Sun, try the
following settings in the Glow Element rollout:
• Set Size to 50.0.
• Set Intensity to 200.0, producing a very
bright glow.
• Set Use Source Color to 50.0.
• In the Circular Color group, set Mix to 50.0,
giving the Sun a soft red glow.

Tip: With Interactive on, you’ll get faster


results by changing numeric settings with
the keyboard, rather than using the spinners.

Adding a Ring Effect


Now you’ll add a ring effect to the Sun’s glow.

Enhance your sun with a ring effect:


1. In the Effects tab of the Environment and
Effects dialog, scroll up to the Lens Effects
820 Chapter 8: Special Effects

Parameters rollout. Choose Ring and move it 1. Increase the intensity of the Ring Element to
to the list on the right. A ring appears around 133.0.
the Main Sun in the Effects Preview window. 2. Lower the size of the ring to 14.0.
3. Increase the thickness of the ring to 65.0.
4. Turn on Glow Behind to place the glow from
the Sun behind the planet.
Now the Sun looks more realistic.

2. Scroll down to the Ring Element rollout and


make the following settings to define the ring:
• Set Size to 22.0.
• Set Thickness to 33.0, giving the ring more
of a glowing perimeter. Adding a Star Effect
• Set Use Source Color to 50.0. Now you will add a star effect to the Sun’s glow.

Add a star effect to your sun:


1. In the Effects tab of the Environment and
Effects dialog, scroll up to the Lens Effects
Parameters rollout. Choose Star from the
effects list and move it to the list on the right.
A Star effect appears over the Main Sun in the
Effects Preview window.

These changes make the ring more


dramatic-looking, but it still needs some
intensity to make it look like a glowing Sun.

Adjust the ring effect:


By increasing the intensity of the main glow and
juggling the size and thickness of the ring, you can
control the size of the white-hot center of the sun.
Adding Another Glow 821

Improve the star effect by adjusting occlusion


settings:
1. In the Camera viewport, move the Sun omni
light so it’s just on the edge of the planet.
Because Interactive is turned on, the rendered
frame window updates automatically.
2. Go to the Lens Effects Parameters rollout and
select main sun from the right-hand window.
3. Scroll down to the Glow Element rollout and
set Occlusion to 0.0.
4. Return to the Lens Effects Parameters rollout
and select Ring from the effects list in the
2. Scroll down to the Star Element rollout, and set
right-hand window.
the following:
5. Scroll down to the Ring Elements rollout and
• Set Qty (the number of points in the star)
set Occlusion to 0.0.
to 8.
• Set Intensity to 50.0
• Set Sharp to 5.0.
• Turn on Glow Behind.
• Experiment with Width and Taper before
setting them to 1.0 and 0.1, respectively.

Adding Another Glow


The effects you’ve added to the Sun have included
the Glow Behind option, so they are not adding a
glow to the planet, which is in front of the light.
Now that your Sun is glowing in the sky, you need
You might find that your effects are incorrect if to add glow to the planet itself.
the Sun moves behind the planet. You can fix
Add a second glow to your scene:
this by adjusting the effect’s Occlusion settings.
1. Select the planet in a viewport. Right-click and
choose Properties in the Transform quadrant
of the quad menu.
822 Chapter 8: Special Effects

2. In the Objects Properties dialog > G-Buffer


group, change Object Channel to 1 and click
OK to close the dialog.

3. In the Environment and Effects dialog > Lens


Effects Parameters rollout, add another Glow to
the list of effects.
Note: If you closed this dialog you need to
select the Sun omni light and click Setup on the Tip: If the planet is still shadowy, move the
Atmospheres & Effects rollout. marslight closer to the planet in the Top
4. In the Glow Element rollout, rename this effect viewport.
Glow on Planet.
Make global adjustments:
5. Click the Options tab and in the Image Sources
group, turn on Object ID. On the Lens Effect Globals rollout, you can make
global adjustments to control the whole effect.
Notice that the number is set to 1 by default.
1. Experiment to see what happens when you
The planet now renders with a bright white
change Size to 11.0, 22.0, and 33.0.
glow. This is too intense.
As an additional exercise, try animating the
effects’ settings.
2. Save the scene as mymarsandsun.max.

Summary
This tutorial has shown how to create Glow, Ring,
and Star lens effects, and how to adjust their
settings. It also showed how multiple Glow effects
can create the effect of ambient lighting, how to
create and navigate a camera viewport, and the use
of omni lights for scene illumination.

6. Click the Parameters tab. Set Occlusion to 0.0


and turn off Glow Behind.
7. Change Intensity to 45.0 and Source Color to
50.0. Creating and Animating a
8. In the Radial Color section, change the white Flying Logo
color swatch to a darker brick red.
In this tutorial, you’ll learn to create a flying
The planet is looking better now. logo for a fictitious company named Worldwide
Creating the Earth Using Textures 823

Designs. Using shapes, modifiers, lighting effects 3. In the Perspective viewport, move your cursor
and Video Post, you produce an animated logo. over the center of the grid, then drag out a
sphere.

Skill Level: Beginner


Time to complete: 15 minutes
4. On the Parameters rollout of the Modify panel,
Features Covered in This Tutorial change Radius to 5.0.
• Creating and rotating a globe. 5. In the Viewport Navigation Controls, click
• Bending 3D text. Zoom Extents Selected.
• Setting up a volume light. 6. On the Name and Color rollout, change the
• Creating fog. name of the sphere to Planet Earth.

Time to complete: 1 hour Create the earth material:

Files for This Tutorial 1. On the toolbar, click the Material Editor
button or press M on the keyboard to open
All the files necessary for this tutorial the Material Editor.
are provided on the program disc in the
The Material Editor opens in a floating window.
\tutorials\worldwide_designs directory. Before
The first material is active, highlighted in white.
starting the tutorials, copy the \tutorials folder
from the disc to your local program installation. 2. Rename the material Planet Earth.

3. Click the Assign Material To Selection


Creating the Earth Using Textures button.
You will create a sphere and apply a texture map to 4. In the Material Editor, open the Maps Rollout,
create the illusion of a globe. then in the Maps column, click the Diffuse Map
labeled None.
Create the earth object:
5. In the Material/Map Browser, on the right hand
1. Start or Reset 3ds Max. column double-click Bitmap. In the Select
2. Open the Create panel and click Sphere.
824 Chapter 8: Special Effects

Bitmap Image dialog, navigate to and open


\tutorials\worldwide_designs\earthmap.bmp. 7. On the Material Editor toolbar, click the
Show Map In Viewport button.
8. Save your scene as wwdesigns.max.

Animating the Rotation of the


Globe
You’ll only have to set one rotational key to create
the illusion of the earth spinning. You build the
animation over a hundred frames and rotate the
sphere a full 360 degrees using a TCB Rotation
controller and the Rotation Windup command.
This creates the effect of an endless looping
animation.

Setup:
Bitmap texture for the planet
• Continue from the previous lesson, or open
The material in the Material Editor now \tutorials\worldwide_designs\tut_wwdesigns_
displays the earth map on a sphere. globe.max.

Keyframe the earth rotation:


1. Select the sphere and open the Motion panel.
In the Assign Controller rollout, select Rotation
: Euler XYZ in the Transform Rotation list.
Note: Euler XYZ rotation controllers are the
default, but here you will switch to a different
rotation controller that lets you use the rotation
windup command.

2. Click the Assign Controller button to open


the Assign Rotation Controller dialog. Select
TCB Rotation from the list
3. At the bottom of the Key Info rollout, turn on
Rotation windup
Texture displayed on material sample
Important: You must turn on Rotation Windup or
else the animation won’t work correctly.
6. Double-click the sample sphere if you want to
see the material in a larger window. 4. Turn on Auto Key.
Adding the Text for the Logo 825

The Auto Key button turns red and the active The next step is to rotate the earth’s axis to give
viewport is outlined in red to remind you that it a realistic tilt.
now you are in Auto Key animation mode. 11. While Select And Rotate is still active, move
5. Move the time slider to frame 100. your cursor over the rotate gizmo in the
6. Press A on the keyboard to turn on Angle viewport. When the Y axis turns yellow, rotate
Snap. the earth approximately –15 degrees about the
Y axis so the earth is tilted.
This will make it easy to rotation an exact
amount. Because Auto Key is off, this rotation affects the
entire animation.
7. On the toolbar, turn on Select And 12. Save your work as mywwdesigns02.max.
Rotate.
The rotate gizmo displays on the sphere in the
viewport.
Tip: To increase the size of the transform gizmo,
press the + key on the keyboard.

Tilted earth

You’ll notice the square selection brackets are tilted


along with the texture, but the transform gizmo
remains the same. That is because it is displaying
the View Coordinate system.
The rotation gizmo displays on the sphere

8. Move your mouse over the blue Z axis ring of


the Rotate gizmo in the viewport. Rotate the
Adding the Text for the Logo
planet about the Z axis, watching the value You’ll now create the flying logo by modeling
change in the coordinate onscreen readout in the three dimensional text using spline objects.
the viewport. Stop when you see 360. Later, you’ll add an extrude modifier and a Bend
modifier to create the desired text effect.
9. Turn off Auto Key.

10. Play the animation.


The sphere rotates smoothly in a
counterclockwise direction.
826 Chapter 8: Special Effects

Setup:
7. Click the Zoom Extents to zoom in the
• Continue from the previous lesson, or open Front viewport.
\tutorials\worldwide_designs\tut_wwdesigns_
glode_rotating.max. Add extrude and bend modifiers:

Create a text object:


Now add Extrude and Bend modifiers.

1. Activate the Front viewport, then right-click


1. With the Text selected, choose Modifiers >
the viewport label and choose Smooth + Object–Space Modifiers > Extrude. In the
Highlights to see the earth in shaded mode. Parameters rollout, set the Extrude amount to
0.5.
2. Zoom back in the viewport so the globe is 2. Click the color swatch next to the name of the
small but visible. text, Text01. In the Color Selector, choose
white.
3. Open the Create panel > Shapes and in the
object type rollout, click Text. Click above the
earth in the viewport to place the default text.
4. In the Parameters rollout, go to the Text field
and type Worldwide Designs.
Tip: You can also copy and paste text into this The text turns white in the viewport.
field.
3. In the Front viewport, move the text down so
5. Click the Font drop-down arrow, and change that it intersects with the sphere (globe). The
the font to something boxy like SansSerif Bold. text still looks too big, so select the Text in the
If you don’t have that font, use anything else modifier stack, and then change Size to 3.0.
that’s not too narrow.
Tip: You can type the first letter of the font to
quickly find it in the list.
6. Change the Text Size from 100 to 5.0.

The text moved to bisect the earth sphere

4. Click Extrude in the modifier stack and apply


a Bend modifier from the Modifier List >
Object-Space Modifiers.
You’ll use this to bend the text around the earth.
Worldwide Designs Text
Adding the Text for the Logo 827

5. In the Parameters rollout, change the Bend Axis


to X, then set the Bend Angle to 180.
6. Activate the Top viewport. Zoom in on the
earth and text if necessary.
7. Move the text down in the Top viewport, as
shown in the illustration.

Pivot point of text object aligned to planet earth object

5. Turn off Affect Pivot Only.


6. In the Front viewport, rotate the text about the
Y axis so that it matches the tilt of the planet.
The text is moved down in the Top viewport As you rotate the text, you can refer to the
onscreen coordinate readout in the viewport.
8. Right-click the Top viewport label and choose
7. On the toolbar, set the Reference Coordinate
Smooth + Highlights.
System to Local.
9. Save the scene as mywwdesigns03.max.

Adjust the pivot point:


1. With the text selected, open the Hierarchy
panel, then in the Adjust Pivot rollout, turn on
Affect Pivot Only.
The pivot point of the text object is displayed
as a tripod.
2. On the Tools menu, choose Align, then click
the earth sphere object in the viewport. This
displays the Align Selection dialog.
3. In the Align Position (Screen) group, turn on
X, Y, and Z.
Rotated text matches the tilt of the earth
4. Set both the Current Object and Target Object
to Pivot Point. Click OK. Now you can finally animate the text rotating
around the planet. You’ll set it going in the
The pivot point is aligned to the center of the
opposite direction from the way the earth spins.
earth sphere object.
828 Chapter 8: Special Effects

Animate the text: 7. On the Key Info rollout, move to key number 1
using the arrows, then set Continuity to 0.
1. Make sure Text01 is still selected,
then open the Motion panel. In the Assign 8. Turn off Auto Key and play the
Controller rollout, choose Rotation in the animation. The rotation of the text and
Transform Position list. earth sphere should be smooth and loop
continuously.
2. Click the Assign Controller button to open
the Assign Rotation Controller dialog. Choose Next, you’ll add a couple of lights for dramatic
TCB Rotation from the list. effect.
3. At the bottom of the Key Info rollout, turn on 9. Activate the Top viewport and Zoom out
Rotation Windup. so you see some empty space around the Earth.

4. At frame 0, turn on the Auto Key 10. In the Create panel, choose Lights
button and rotate the text around the Y axis and click Omni. Then in the Top viewport, set
until the text is behind the sphere. a light in front of and another light behind the
No key will be created, yet. planet.

Rotation for text at frame 0 Add lights for drama.

5. Move the time slider to frame 100, then rotate


11. Save your work as mywwdesign04.max.
the text around the Y axis-360 degrees.
You now have keys at frame 0 and frame 100.
6. On the Key Info rollout, set Continuity to 0. Adding a Background and a
If Continuity is not displayed in the Key Info Material
rollout, click the Rotation button in the PRS You’ll make the scene more interesting by simply
Parameters rollout. adding a background that makes the earth sphere
This allows the text to rotate around the earth appear to be in outer space. You’ll then add a shiny
at a continuous rate of speed. gold material to the logo text for more impact.
Adding a Spotlight 829

Set up the scene: The text is now gold.


• Continue from before, or open 5. Render the scene.
tut_wwdesigns_globe_text_rotating.max.

Add a background:
1. Open the Rendering menu > Environment.
2. Click the Environment Map button. In the
Material/Map Browser, double-click Bitmap.
Navigate to \tutorials\worldwide_designs and
choose stars10.jpg.
This is a large high resolution starfield
background.
3. Move the time slider to frame 50.
Golden text

4. Activate the Perspective viewport and


click the Quick Render button. 6. Save your work to an incremental file
name. Choose File > Save As. Click the
The image renders with the Earth in front of incremental save button.
the stars.
Now, you’ll add a spotlight that will illuminate
Warning: If you’ve set your rendering resolution to
each letter of the logo as it rotates.
something too small you won’t see the stars in the
rendering. You need to render at 640 x 480 to really
see the stars in this background image file.
Adding a Spotlight
The next step is to make the logo text more
interesting. • Continue from before or open
tut_wwdesigns_globe_text_bground.max.
Add a material to the text:
Create a spotlight:
1. On the main toolbar, click the Material You’ll add a target spotlight that casts a focused
Editor button. Click an unused sample sphere. beam of light onto each letter of the logo as it
rotates. The target in this case is the earth so that
2. Click the Get Material button. In the you can easily align the beam of light to the logo
Browse From group, click Mtl Library, then text.
double-click Metal_Dark_Gold [Standard] .
1. In the Top viewport, slide the time slider to
The sample sphere displays a shiny gold frame 50 so that the logo text is rotated around
material. the lower half of the earth sphere.
3. Make sure Text01 is selected, click the Note: The illustrations display the text in white,
Assign Material to Selection button. not gold.

4. Click the Show Map in Viewport button.


830 Chapter 8: Special Effects

Tip: If it’s difficult to select the spotlight target,


type H on the keyboard. In the Select Objects
dialog, select Spot01.Target.
6. Select Tools menu > Align and click the earth
sphere.
7. In the Align Position (Local) group, click X, Y
and Z Positions. For Current Object and Target
Object, click Center. Click OK.
The spotlight target is now aligned to the center
of the sphere so that the light shines on the text
logo.
Spot01. Open
8. Select the spotlight source,
the Modify panel and click Exclude from the
2. Go to the Create panel > Lights and click General parameters rollout.
Target Spot. 9. Select the object Planet Earth from the Scene
3. In the Top viewport, click below the logo text Objects list, and then click the >> button. Click
and drag upwards until the light cone touches OK.
the edge of the sphere. This prevents the spotlight from illuminating
4. Go to the Modify Panel. The Spotlight name the earth sphere.
appears at the top of the panel. On the Spotlight 10. Right-click the Perspective viewport label and
Parameters rollout use the Falloff/Field spinner select Views > ActiveShade to see how the light
to narrow the beam of light. Try changing the illuminates the text.
Field to 7.0.

You’ll probably need to adjust the spotlight


target further so that the light illuminates only
one letter at a time.
11. Right-click in an empty place in the viewport
and select Close from the upper–left quadrant
5. Select the spotlight target.
menu.
Adding a Volume Light and Volume Fog 831

12. With the Modify panel still active, scroll Adding a Volume Light and
the rollouts until you can see the Spotlight Volume Fog
Parameters rollout. In the Light Cone group,
make sure Circle is turned on. You’ll now add a fog effect to the spotlight and
create a light foggy haze around the planet.
13. Experiment with different values for
Volume Light provides light effects based on the
Hotspot/Beam and Falloff/Field until the size of
interaction of lights with atmosphere, such as fog.
the light beam is focused on only one letter.

Target spot illuminating the letter R

14. In the Perspective viewport, play the animation. Set up:

If you prefer that the logo text scroll more • Continue from before or open
slowly, you’ll add an additional 100 frames to tut_wwdesigns_globe_add_vol_lite.max.
the animation.
Create a Camera from View
Add frames to the animation: If you’re continuing from before, you’ll notice that
there is no camera in the scene yet. You can create
1. Click the Time Configuration button. one by doing the following:
2. In the Time Configuration dialog, set Length
1. Activate the Perspective Viewport. Adjust it as
to 200. you like to frame your shot.
2. On the Views menu, click Create Camera from
3. On the toolbar, click the Select by Name
View.
button. In the Select Objects dialog, select
Planet Earth and Text01. The Perspective viewport label changes to
Camera01.
The keys appear in the track bar.
4. On the track bar, select the key at frame 100 Add another spotlight
and slide it to frame 200. Now you’ll create another spotlight shining from
5. Play the animation again. The logo text and the underneath the globe.
earth sphere rotate more slowly. 1. Activate the Front Viewport, and zoom back so
6. Save your work to an incremental file name. you have more room.
Choose File > Save As. Click the + button.
832 Chapter 8: Special Effects

5. In the Volume Light Parameters rollout, click


2. On the Create panel click the Lights Pick Light.
button. Turn on Target Spot and drag out
6. Click on the Spot02 light in the viewport or
a Spotlight below the planet. Set the target
slightly above the planet object in the Front press the H key and pick the Spot02 object
Viewport. from the list.

3. Adjust the hotspot so it is wider than the planet,


Spot02 appears in the field next to the Remove
but not a wide as the ring of text. Light button.
7. Press F10 to do a test render.
Tip: As you repeat the process of entering values
and rendering, you will find that the field
cannot be active for the rendering keyboard
shortcut to work.
After you enter a value in a numeric field, click
on the rollout outside the field to remove the
keyboard focus from the field, and then press
F9 to render the same viewport as before (no
matter which viewport is currently active).

You’ll use this spotlight to creating a halo of


light beams behind the planet. You’ll turn on a
few options for the lights to give a good result
for the effect.
On the Modify panel turn on Shadows > On.
4. On the Intensity/Color/Attenuation rollout,
increase the Multiplier to 4.0.

Add a volume light:


You can assign the volume light directly in the
modify panel, or you can assign it using Rendering By playing individual values you can adjust the
menu > Environment. effect.
1. Activate the camera viewport. 8. In the Volume group change the Density to 20.

2. Go to the Rendering menu > Environment.


Press F9 to Render Last.

The Environment and Effects dialog appears.


3. In the Atmosphere rollout, click Add.
4. In the Add Atmospheric Effect dialog, select
Volume Light and click OK.
Adding a Volume Light and Volume Fog 833

Material Map Browser and then choose


Droplets.tga.

Adding a projector map will dramatically add


detail to the volume effect.
Turn on Exponential and press F9
12. Press F10 to render.

9. You can also see the changes you’ve made, in


13. On the Modify panel turn on Decay, setting it
the Exposure Control rollout, by clicking the
to Inverse.
Render Preview button.
In the Near Attenuation group turn on Use and
Show. Set the Start to 11.0 and the End to 32.0
In the Far Attenuation group turn on Use and
Show. Set the Start to 33.0 and the End to 43.0
Note: These are suggested values, yours may
vary.
14. Press F9 to render again.
10. Press H on the keyboard and select Spot02, if
15. For a more dramatic effect you can exclude
it isn’t selected already. On the Modify panel,
the globe from the Spotlight. On the General
open the Advanced Effects rollout.
Parameters rollout, click Exclude. In the
11. In the Projector Map group click the button Include/Exclude dialog, highlight the Planet
marked None. Double-click Bitmap in the object name and use the right-pointing arrow
to move it to the right window, then click OK.
834 Chapter 8: Special Effects

1. On the Create panel, click Helpers, and select


Atmospheric Apparatus from the drop-down
list.
2. Click SphereGizmo.
3. In the Top viewport, select the center of
the earth and drag outwards to create the
SphereGizmo. Make it a little bit larger that the
size of the earth.

4. With the SphereGizmo still selected, click


the Modify tab. In the Atmospheres and Effects
rollout, click Add. In the Add Atmosphere
16. On the Intensity/Color/Attenuation rollout dialog, highlight Volume Fog and click OK.
adjust the Near and Far Attenuation values so
the effect tapers off within the viewport. Now you need to setup the volume fog
parameters.
5. In the Atmospheres and Effects rollout window,
select Volume Fog. Click Setup.
6. In the Volume Fog Parameters rollout, click
Pick Gizmo. Select the SphereGizmo, if it
doesn’t already appear in the dialog.
SphereGizmo01 appears in the field next to the
Remove Gizmo button.
7. In the Volume group, click the white color
swatch. In the Color Selector, dialog, pick a
light bluish purple color. Drag the whiteness
selector to lighten the color. Click OK.
17. If you’d to hide the effect below the globe,
reposition the Spotlight and Spotlight target.
Move it in small increments and repeatedly
render until you have found a location you
like. By tilting the spotlight slightly, rather
than using it straight up, you can get a more
interesting effect.
18. Save your work as mywwdesign07.max

Add volume fog: The color you selected is now displayed in the
You’ll now create an additional fog effect around Color swatch.
the earth. But first, you need to create a type of 8. In the Volume group turn on Exponential and
helper object called an Atmospheric Apparatus increase the Density to 100.0.
that will serve as a container for the fog.
Adding a Flare Effect 835

9. In the Noise group, select Fractal. This gives the


fog a less uniform appearance.
10. In the Noise group change the High Threshold
to 0.1.
Change the Levels to 6.0.
Change the Size to 1.0.
11. Press F9 to render.
12. Make more adjustments to get the look of a
cloud cover.

Create a dummy object:


You’ll first need to create a dummy object that will
serve as the “placeholder” for the flare effect.
1. Proceed with the file you saved in the last lesson
or open tut_wwdesigns_globe_fog.max from
the \tutorials\worldwide_designs directory.

2. On the Create panel, click Helpers >


Dummy.
3. In the Top viewport, drag out a square above the
13. On the toolbar click Select and Link. Link the earth sphere. Position the dummy so it is visible
SphereGizmo to the globe. Play the animation. behind the globe in the Camera viewport.
The fog spins with the globe. 4. In the Name and Color rollout, name the
dummy Flare Dummy.
14. Save your work as mywwdesigns08.max

Add a flare effect:

Adding a Flare Effect You’ll now use Video Post to easily create an effect
that will add interest to your animation.
Using Video Post, you can add events that occur in
1. Choose Rendering menu > Video Post.
a finished video. In this case, you are using Video
Post to add a flare effect that simulates a bright The Video Post dialog appears.
star behind the earth sphere to give the animation
more of an outer space look. 2. From the Video Post toolbar, click Add
Scene Event. In the View group, name the Label
Camera01. Click OK.
The animation will be created using the
Camera01 viewport.
836 Chapter 8: Special Effects

8. In the Lens Flare Properties group, click Node


3. Click Add Image Filter Event. . Select
Source.
Lens Effects Flare from the drop-down list.
Click OK. 9. In the Select Flare Objects list, choose Flare
Dummy. Click OK.
For the Label, enter Flare Effect
Now that the dummy object is set as the source,
4. Click Add Image Output Event. Enter you can now make changes to some settings.
wwdesigns with flare effect. Click the 10. To better see each effect, go to the Prefs panel
Files button. For the output file name, and in the Render column, turn off all the
enter wwdesigns0000.tga. In the Targa effects. Now turn each one separately and look
Image Control dialog turn on 24 bit in the in the preview to see the effect by itself.
Bits-per-pixel option.
By naming the file with four zeros at the end of
the name, the program knows that you want
to render an ordered sequence. Setting up
your work this way will let you render a high
resolution still image sequence.
The Video Post now lists all the events you just
created in a queue.

11. To create the appearance of a bright star in the


5. In the Video Post Queue, double-click Flare background, turn on Rays and Star.
Effect. In the Edit Filter Event, click Setup. You’ll change a few settings to make the distant
You’ll now set some settings in the Lens Effects star a little more noticeable.
Flare dialog that will create a bright star with 12. Go to the Rays panel. Set these values:
rays behind the earth.
• Size=450
6. Click Preview.
• Angle=45
A generic preview window displays a flare
• Num=300
effect.
Click Update to see the changes.
You can change this to display your scene.
If you cannot see any effects, move the Flare
7. Click VP Queue to see the earth and the logo
dummy object in the viewport and then click
text.
Update in the preview window again until the
Tip: If the logo text is behind the earth, move the rays are in the desired location.
time slider in 3ds Max to a frame where the logo
13. Go to the Stars panel. Set these values:
text is in front of the earth. Click Update in the
Lens Effects Flare dialog to update the preview. • Size=100
Adding a Flare Effect 837

• Sharp=10 18. On the RAM player toolbar, click Open


Turn on Random. Click Update. Channel A. Navigate to the image sequence
you rendered, and select the filename of the 1st
14. Turn on Glow on the Prefs panel.
image. At the bottom of the dialog, turn on
Sequence, then Open.

The files load into the RAM Player.


19. When the files are loaded, play the animation
using the Play controls on the RAM player
toolbar.
You’re now ready to render your animation.
Once the files are loaded into the RAM player,
Click OK to exit the dialog.
you can save them out as a movie file. Choose
15. On the Video Post toolbar, click Execute Save Channel A, and then select the file type
Sequence. and file name you want.

16. In the Time Output group, turn on Range.


Summary
Enter 1 in the first field and 200 in the second
field. In the Nth Frame field enter 2. Click In this tutorial, you have created a flying logo. You
Render. have created a globe using primitive objects and
texture maps. You have created and animated text
Video Post now renders every other frames of
to develop the logo treatment, and added gold
your animation and adds the effects you created
metal material and spotlights for dramatic effect.
in a post-production video. Since you’ve
You have added atmospheric and volume light
selected every second frame, the rendering
effects, as well as a lens flare using Video Post.
will go faster and the animation will play more
Finally you have rendered your animation to a still
quickly.
image sequence and assembled it into a movie
Depending on the speed of your computer, using the RAM player.
the rendering may take some time. While you
wait, you can watch the animation progress in
the frame buffer window and in the Video Post
rendering progress dialog.
17. In 3ds Max, go to Render menu > RAM Player.
The RAM player lets you load high resolution
still image sequences into memory and play
them back.
838 Chapter 8: Special Effects

animation for the toys, taking into account the


Introduction to reactor hand-animated box; the toys will react to the box’s
motion and pour out onto the floor.
Skill Level: Intermediate
Time to Complete: 90 minutes

Features Covered in This Tutorial


In these lessons you will learn:
• Creating rigid body collections.
• Creating simulations with reactor.
• Controlling simulation accuracy.
• Using hand animated objects with reactor.
This tutorial will lead you through the process of • Creating fractures with reactor
creating a physically based animation using the
reactor dynamics functionality built into 3ds Max. Tutorial Files
There are many situations in animation where All the files necessary for this tutorial
hand animating and creating keyframes for are provided on the program disc in the
objects can be completely replaced; or at the very \tutorials\reactor\introduction directory. Before
least, augmented, by using keyframes created starting the tutorials, copy the \tutorials folder
automatically using physical techniques. For from the disc to your local program installation.
instance, imagine trying to hand-animate a
thousand balls being poured out of a bucket; you
would need to make sure that no two objects Rigid Bodies Make the World Go
passed through each other during the simulation, Round
and that they behaved realistically when colliding The objects in a reactor physical simulation; in
with each other and the environment. With this example, the toys, the toy box, and the floor,
reactor, however, you can produce the same are known as rigid bodies. These are the building
animation by just creating a bucket and a thousand blocks of physical scenes, and can be made up
spheres, providing each object with physical of one or more geometries. You can use any
properties such as mass. Once you have set up geometry to create a rigid body.
the objects’ positions, the rest is calculated for you
automatically. In this section, you will create two simple primitive
objects that can be used as rigid bodies, and assign
In this tutorial, you will use the reactor them some physical properties.
functionality to create a toy with a low center of
gravity. You will then create copies of the toy, and Create a rigid body:
use the Preview Window to add them to a toy
1. Start with a new scene.
box and update the objects’ positions in 3ds Max.
Next, you will hand-animate the box turning 2. On the Create panel, click Sphere.
over. The dynamics functionality will solve the
Getting Collective 839

3. In the Perspective viewport, drag to create a


sphere. On the Create panel, set the radius to
25.0.
4. On the Create panel, click Box.
5. Drag in a viewport to create a box beneath the
sphere. On the Create panel, set the Length and
Width values to 200.0 and set Height to 5.0.
Note: Move the box downward to make sure it is
not touching the sphere.
The default value for Mass is 0.0, which means
that the rigid body is fixed in space during
the simulation. However, in this example, the
sphere is going to drop onto the box, which
will act as the floor in your simulation. For
this reason, you need to give the sphere a mass
value.

Now you need to give your sphere some 8. Set the Mass to 50.0.
physical properties. If you do not specify any physical properties
6. Select the sphere, and on the reactor toolbar,
for an object, it automatically uses the default
rigid-body properties when simulated. You
don’t want the box to move in this example,
click Open Property Editor .
so the default properties are sufficient for this
If the reactor toolbar isn’t visible, right-click object. It uses the default Mass value of 0.0, and
an empty area of the main toolbar, and choose is therefore fixed in space.
reactor from the context menu.
You now have two objects with physical properties.
You haven’t assigned any physical properties However, your scene is not yet valid for simulation.
to the sphere yet, so the dialog displays default You must add the objects explicitly to the
values. simulation using a Rigid Body Collection.
Note: If you don’t have an object selected in
the scene, or if you select an item that cannot
be used as a rigid body (such as a rigid body Getting Collective
collection), the dialog controls are unavailable.
If you have a valid rigid body and want to use it
7. Look at the editor’s Physical Properties rollout. in a simulation, you need to add it to a rigid body
collection. At the start of the simulation, reactor
examines the scene for all enabled rigid body
collections. It then takes the rigid bodies from the
collections and adds them to the simulation. In
this example, you will create a collection and add
the sphere and box to it in order to add them to
the simulation.
840 Chapter 8: Special Effects

Continue using your scene from the previous


lesson, or open reactor_intro_1.max from The Basics of Simulation
\tutorials\reactor\introduction. Now that you have a valid scene for simulation,
you can try simulating it. reactor provides two
Create and add objects to a rigid body collection:
methods for simulating animation:
1. Make sure no objects are selected, and then,
• The reactor preview window displays your
on the reactor toolbar, click Create Rigid Body
simulation using OpenGL or DirectX. You can
examine your objects’ physical behavior in the
Collection .
window, see how they interact, and even use
A Rigid Body (RB) Collection is a helper object the mouse to interact with the scene. You can
that reactor uses to keep track of the rigid use this window to update the rigid bodies’
bodies in your scene. It doesn’t show up in states in 3ds Max at any time during simulation,
renderings, and its position has no effect on which means that it acts as an interactive scene
your scene. modeler.
2. Click any viewport to add the collection to your • Alternatively, use keyframe creation. You define
scene. an animation range, and reactor creates and
Note: The icon’s position has no effect on the simulates the physical world across that range,
simulation. passing the rigid bodies’ states back to 3ds Max
as keyframes.
3. On the Modify panel, in the RB Collection
Properties rollout, click Pick, and then select Continue using your scene from the previous
the box in a viewport. lesson, or open reactor_intro_2.max from
This adds the box to the rigid body collection. tutorials\reactor\introduction.

You can also add objects to the collection with Examine your scene in the preview window:
the Add button, as in the following step.
1. Go to the Utilities panel, click the reactor
4. Click Add. This opens a standard selection button, and, on the About rollout, make sure
dialog that contains a list of the remaining Choose Solver is set to Havok 1.
available rigid bodies in the scene.
Tip: To remove a rigid body from the collection, 2. On the reactor toolbar, click Preview
highlight it in the Rigid Bodies list and then Animation.
click Delete. This opens your scene in a preview window. By
5. From the list, choose the sphere, and then click default, your scene is initially displayed from
Select to close the dialog and add the sphere the Perspective view. You can use the left mouse
to the collection. button to rotate the camera, the middle button
Tip: A useful shortcut for creating an RB to pan, and the scroll wheel to zoom.
Collection is to select the objects before you 3. To start your simulation, open the Simulation
create the collection. If you select several menu in the preview window and choose
objects and click Create Rigid Body Collection, Play/Pause, or press P on your keyboard. Your
an RB Collection is created which already simulation start and the sphere will fall onto
contains the selected objects. the box.
Geometry Types 841

You can use your right mouse button to drag reactor creates keyframes for the positions and
the sphere around the scene. However, you orientations of your rigid bodies for each of
cannot move the box, because it has no mass. those 100 frames.
Tip: To reset the simulation, press R . 3. Click Play Animation to watch the
4. When you’re finished exploring your animation in the viewport. You should see your
simulation, return to 3ds Max by closing the sphere falling onto the box and rolling down
preview window. over the edge of it.
4. At frame 0, select the sphere if necessary, and
Create physically-based keyframes:
then Alt +click the sphere and, from the
Next, you will create keyframes for the objects’ quad menu > Set quad, choose Delete Selected
interaction. A sphere falling onto a level surface Animation.
isn’t very interesting, so first you will tilt the box so
The sphere’s keys on the track bar go away.
the sphere will roll along its surface.

1. In the Left viewport, select the box and Geometry Types


rotate it clockwise about 30 degrees, being
Simulation Geometry is the second rollout in the
careful not to let it touch the sphere.
Rigid Body Properties dialog; it deals with how
objects are represented in the physical simulation.
In reactor, a convex object is one that has no
holes or concavities in its surface. For instance, a
ping-pong ball is convex, but a golf ball is concave.
Convex objects are much easier to simulate
than concave objects. For this reason, when you
simulate an object, it is treated as if it was convex
by default, even if the 3ds Max object is concave.
To do this, reactor uses a special algorithm to
create a convex version of the object for simulation;
however, the object does not change in 3ds Max.
This is called creating a convex hull for the object’s
mesh, and is represented by the Mesh Convex Hull
2. On the reactor toolbar, click Create option on the Simulation Geometry rollout of the
Animation. A Reactor dialog appears, asking Rigid Body Properties dialog.
you to confirm the choice. Click OK to However, there are times where you will want to
continue. simulate the exact mesh of an object, concavities
This creates a simulation and runs it for the and all. You specify this using the Concave Mesh
length of time between the Start Frame and End option.
Frame values set on the track bar. The default In this section of the tutorial, you will specify
values for these are 0 and 100, respectively; you
that you want to simulate your sphere as an exact
will change these values later in the tutorial. sphere. This means that the sphere’s geometry is
not simulated; instead, a mathematical sphere is
842 Chapter 8: Special Effects

used for simulation. This is not only faster, but


also more accurate (the object will roll perfectly Geometry Simulation
smoothly) and less memory-intensive than a In this lesson, you’ll continue making a toy. The
simulation based on a geometry-based sphere. existing sphere acts as the toy’s body. The next
Continue using your scene from the previous step is to create a cylinder to act as the toy’s arms.
lesson, or open reactor_intro_3.max from You’ll also create a duplicate of this cylinder and
\tutorials\reactor\introduction. reduce its tessellation. You’ll use this simplified
version, which is easier and faster to simulate,
Change the simulation geometry for the sphere: as the simulation geometry for the first, more
1. Select the sphere. complex cylinder. This technique is known as
using proxy geometry.
Note: If you were to make 20 copies of the first
2. Open the Rigid Body Properties dialog .
cylinder and add them to your simulation, they
3. In the Simulation Geometry rollout, choose would all use the simplified, duplicate cylinder as
Bounding Sphere. their simulation geometry. This means you’d need
only one instance of the cylinder geometry for the
physical simulation, thus reducing memory usage
and increasing simulation speed.
Note: Continue using your scene from the previous
lesson, or open reactor_intro_4.max from
\tutorials\reactor.

Create a simplified version of an object for


simulation:
1. Create a cylinder in the Left viewport, and
position it above your sphere.
Make sure that the cylinder and sphere don’t
4. Click Create Animation to regenerate
touch each other.
the keyframes for the simulation.
2. On the Modify panel, set the following values
The sphere rolls more smoothly, though this
for the cylinder: Radius=6.0, Height=70.0, and
might not be immediately apparent if your
make sure Sides is set to 18 (the default).
sphere is highly tessellated.
5. At frame 0, select the sphere if necessary, and
then Alt +click the sphere and, from the
quad menu > Set quad, choose Delete Selected
Animation.
The sphere’s keys on the track bar go away.
Building Up a Rigid Body 843

right-clicking and choosing Hide Selection


from the Display quadrant of the quad menu.
9. Select the RBCollection helper object in your
scene, and add the original cylinder to it.

10. On the reactor toolbar, click Preview


Animation and then play the animation.
The cylinder doesn’t roll as smoothly as its
display would suggest.
11. In the preview window, choose Display >
Sim Edges to display edges for the objects’
simulation geometries.
3. With the cylinder still selected, choose Edit >
The cylinder’s simulation geometry is coarser
Clone. On the Clone Options dialog, choose than its display body.
Copy and click OK.
You’ll use this copy of the cylinder as the proxy
geometry.
4. On the Modify panel, reduce the number of
sides of the new cylinder to 12 and then move
it away from the other objects.
5. Select the original cylinder and open the Rigid

Body Properties dialog .


6. Set the cylinder’s Mass value to 10.0.
7. Set the cylinder’s Simulation Geometry
property to Proxy Convex Hull.
This means that the cylinder will use the convex
hull created from another object’s geometry as
its physical representation. Building Up a Rigid Body
The Proxy button at the bottom of the rollout
A rigid body can comprise more than one object,
becomes available.
or primitive. A rigid body with more than one
8. On the Simulation Geometry rollout, click primitive is known as a compound rigid body.
the Proxy button, and then select the cloned
cylinder in one of the viewports. As stated previously, concave objects (objects with
holes or dips in the surface or geometry) are more
The button now displays the name of your difficult to simulate than convex objects. For this
chosen proxy object. reason, a compound rigid body made up of several
Tip: You can now hide your proxy cylinder convex objects can be simulated much faster than
to keep it out of the way by selecting it, a single concave object. A good example of this is a
844 Chapter 8: Special Effects

picture frame, where simulating a concave picture 2. Hold down Ctrl and select the sphere, adding
frame would be slow, but simulating a group of it to your selection set.
four convex boxes representing the frame sides The cylinder and sphere should be the only
would not. selected objects.
In this lesson, you will combine the two non-fixed 3. Choose Group menu > Group.
rigid bodies in your scene (the sphere and
Use the Group dialog to name the new group
cylinder) to create a single rigid body. In doing
toy_body. Click OK to continue.
so, you will see the differences between primitive
properties and rigid body properties. Each 4. Select the RB Collection helper object, and add
primitive in a rigid body can have a separate mass your new group to the collection.
and simulation geometry, while friction, elasticity,
and display body properties are applied to the 5. Click Preview Animation to watch the
entire rigid body. simulation.
To create your compound rigid body, you will You should get an error saying that the sphere
need to select the objects and group them using and cylinder can no longer be rigid bodies.
the group functionality in 3ds Max. This group This is because they are being used as part of an
can be added to the rigid body collection as a new active compound rigid body, so you will need
rigid body. to remove them as single objects from the rigid
body collection.
Continue using the scene from the previous
lesson, or open reactor_intro_5.max from 6. On the RB Collection Properties rollout of the
\tutorials\reactor\introduction. Modify panel, hold down Ctrl and select the
sphere and the cylinder, and then click Delete.
Create a compound rigid body:
1. Select the cylinder and move it down into the 7. Click Preview Animation and watch the
sphere, so that it resembles a pair of arms. simulation.
Now you can see that the sphere and cylinder
act as parts of the same object.

Relocated cylinder as seen in the Front viewport


Making It Wobbly 845

Front view of completed toy geometry

Making It Wobbly 2. Select the three spheres used for the eyes and
nose and open the Rigid Body Properties dialog
The toy you are going to make will have a
non-uniform mass distribution, which, in this
.
case, means that most of its mass will be centered
about its base. This will have the effect that the toy 3. Set the simulation geometry to Bounding Box.
will not roll or fall over, but will try to right itself, Since these spheres won’t play a large part in the
and will wobble around. This behavior is possible simulation, you can treat them as very simple
because the primitives in a compound rigid body geometry to speed up the simulation.
can have different masses. All you have to do is 4. Select the head of the toy and set its simulation
add a small, heavy object inside the bottom of the geometry to Bounding Sphere.
toy and most of its mass will reside there.
You can keep the torus’s simulation geometry
Continue using the scene from the previous as Mesh Convex Hull, or you could create a
lesson, or open reactor_intro_6.max from copy and simplify it as a proxy, as you did with
\tutorials\reactor. the cylinder.

Complete the toy: 5. Once you have finished creating and arranging
these objects, add them to the toy_body group.
1. First, complete the toy’s geometry. Create a
For each object, select the object, choose Group
torus for its waistband, a sphere for the head, menu > Attach, and then click toy_body.
two small spheres for eyes, and one for the nose.
Change the mass distribution for a rigid body:
1. Select the toy_body group and choose Group
menu > Open.
846 Chapter 8: Special Effects

This allows you to select the individual


primitives within the group to edit their rigid
body properties.
2. Change the mass of each object in the group
(except the body and arms, which already have
mass values) to 1.0.
Tip: You can do this quickly by selecting all of
the objects in the group, and setting the Mass to
1.0 on the Rigid Body Properties dialog.
You do this because you are going to add a heavy
object to the group, and it is this mass that you
really want to affect the object’s motion.

3. Click Preview Animation and you will


see that all of the new objects have been added
to the compound rigid body.
The toy should fall, though it won’t yet have
the correct behavior. If the object doesn’t fall,
you might not have given a mass to all of the 5. On the Rigid Body Properties dialog,
objects in the rigid body and, as a result, one give the box a mass of 300.0.
of the primitives is fixed. To fix this, close the
preview window and check the mass of each of 6. Select a component of the group and choose
the objects in the group. Group menu > Close to close the group.

4. Add a small box (Height, Width, and 7. Select the small box, choose Group menu >
Length=3.0) inside the body sphere and near Attach, and then click toy_body to add the box
the bottom of the object. to the group.

8. Click Preview Animation and examine


the behavior of the toy.
Looking at Things Differently 847

toy later in the tutorial, your setup and display


speed won’t be adversely affected.
Continue using the scene from the previous
lesson, or open reactor_intro_7.max from
\tutorials\reactor\introduction.

Create a display proxy for a rigid body:


1. Create a copy of the toy by Shift +dragging the
group in the viewport.
Move the copy away from the other objects.
2. A display proxy must be a single mesh. To
create this, first ungroup the toy copy by
selecting the new group and choosing Group
menu > Ungroup. Then select the copy’s main
body sphere.
3. Right-click the sphere. In the Transform
The toy slides down the box and tips over as
quadrant of the quad menu, choose Convert To
before, but it tilts backward as though to right
> Convert To Editable Mesh.
itself. The high mass in the box at the base of
the toy has lowered the group’s center of gravity. 4. In the Edit Geometry rollout of the Modify
panel, click Attach List.
Save your file as my_reactor_intro.max, and
experiment with flattening out the plane and 5. Use the Attach List dialog to select the rest of
scaling it up. the objects that were part of the group, and then
click Attach.
You now have a single mesh representing the
Looking at Things Differently toy that you can use as a display proxy.
reactor allows you to use display proxies for Tip: It is a good idea to label models in your
objects; this means that a rigid body can scene clearly, especially when they look
have a different display body for use in the similar to one another. In this tutorial, for
preview window. This improves the window’s example, you could rename your proxy object
performance, especially when you are simulating toy_body_proxy.
more than one object with the same display body. 6. Select your original toy_body group and
If you have a lot of objects that all look the same, choose Group menu > Open.
then your display only needs to keep track of one
7. Select the group parent, which is the pink box
instance of the display body when display proxies
surrounding the grouped objects.
are used. As a bonus, you increase simulation
setup speed, because you create only one instance You need to select the group parent rather than
of the display body. any of the toy’s constituent objects, because
the group parent represents the rigid body and
In this lesson you’ll create a display proxy for the
display proxies are applied to rigid bodies, not
toy. This is so that when you create copies of the
primitives.
848 Chapter 8: Special Effects

8. Open the Rigid Body Properties dialog,


and on the Display rollout, turn on Proxy.
This activates the display proxy pick button.
9. Click the display proxy pick button and select
the single-mesh version of your toy in one of
the viewports.

The button displays the name of your proxy object, in


this case toy_body_proxy.

You have now assigned an alternative display


body to your compound rigid body.
10. Hide the proxy object: Select the single-mesh
Simulation Accuracy
toy, right-click, and from the Display quadrant
of the quad menu choose Hide Selection. If strange artifacts show up in the objects’ motions,
you probably need to increase the accuracy of your
This will keep it out of your way.
physical simulation. This can be done in one of
two ways. You can change the accuracy externally,
11. Select a component of the group, and which affects the accuracy for both keyframe
choose Group menu > Close, then click Preview creation and the preview window, or you can
Animation. alter it from within the preview window. In both
Your toy will use the new mesh as its display cases, changing the accuracy requires altering a
object. If you make changes to the editable simulation parameter called Substeps/Keyframe.
mesh, these will be displayed whenever you use You can edit this in the reactor rollouts on the
the preview window. Utilities panel or by using the Physics menu in the
preview window.
When the physics are being calculated, reactor
moves the objects forward in small steps. The
smaller the steps, the more accurate the simulation.
However, you should note that the simulation will
also become slower as it becomes more accurate.
The default accuracy value is 10 substeps per
keyframe, which means that reactor divides each
keyframe interval into 10, and steps the simulation
forward in intervals of this size. If you increase the
substeps per keyframe value to 25, then the size
of reactor ’s steps becomes one keyframe interval
divided by 25.
Setting Up the Simulation 849

Note: You can continue using your file or Create the toy box:
you can open reactor_intro_8.max from 1. In your scene (away from the other objects),
\tutorials\reactor\introduction. create five boxes with Length and Width=400.0,
and Height=25.0.
Change the accuracy of your simulation:
2. Arrange the boxes to form a larger, hollow box.

1. On the Utilities panel, click the reactor


button and expand the Preview & Animation
rollout.
2. Change the Substeps/Key value from 10 to 25.

3. Click Preview Animation.


The simulation may run more slowly but will be
less likely to be affected by sudden slowdowns.
3. In the Left viewport, rotate the sloping box
20 degrees counterclockwise to flatten it out
Setting Up the Simulation somewhat. With the sloping box selected,
increase both its Length and Width parameters
In this section you will create a toy box and 39
to 600, and move it downward 240 units.
copies of your toy. Using the preview window,
you will drop the toy copies into your box, let
them settle, and then pass their positions back to
3ds Max. As you will see, the preview window acts
as an interactive modeling tool, allowing you to
rearrange objects physically and then use changes
made in the preview window to update 3ds Max.
Note: You can continue using your file or
you can open reactor_intro_9.max from
\tutorials\reactor\introduction.
850 Chapter 8: Special Effects

4. Select and right-click the box used as the base of


3. In a side viewport, Shift +Move the toy, and
the toy box, and in the Transform quadrant of
position the first copy above the original.
the quad menu, choose Convert To > Convert
To Editable Mesh. Note: Make sure that the copy is not touching
the original toy.
5. In the Edit Geometry rollout of the Modify
panel, click Attach List.
6. In the Attach List dialog, select the other four
boxes, which make up the sides of the toy box,
and click Attach.
You now have a single mesh representing the
toy box.

7. Open the Rigid Body Properties dialog


and set the Simulation Geometry property to
Concave Mesh.

Update your scene from the preview window:

1. On the toolbar, click Select and Move.


2. Move the toy inside the box. 4. In the Clone Options dialog, set Number Of
Note: Make sure that the toy is not touching the Copies=39 and click OK.
box.
Using Hand-Animated Rigid Bodies 851

8. When the toys have settled in the box, from the


Preview Window menu bar choose MAX menu
> Update MAX.
9. Close the preview window and click in one of
the viewports to update the display. The toys
will have been updated so that they have the
positions and rotations you updated in the
preview window.

5. Select the RB Collection helper object and in


the Modify panel > RB Collection Properties
rollout, click Add.
6. Select all of the new toy objects and the toy box
and click Select to add them to the rigid body
collection.

7. Click Preview Animation and let the toys


fall into the box and settle. Using Hand-Animated Rigid
Bodies
Something that you will often want to do is to
use hand-animated rigid bodies in a physical
simulation. These rigid bodies are referred to as
unyielding rigid bodies and have the Unyielding
property turned on in the Rigid Body Properties
dialog. They behave as their keyframes dictate
and other rigid bodies react to them. You do not
need to give them a mass. In this example, you will
hand-animate your toy box so that it tips over and
spills the toys out onto the floor.
Note: You can continue using your file or
you can open reactor_intro_10.max from
\tutorials\reactor\introduction.
852 Chapter 8: Special Effects

Add hand-animated rigid bodies to a physical


simulation:
1. Select the toy box.

2. Open the Rigid Body Properties dialog.


On the Physical Properties rollout, turn on
Unyielding.

5. At this stage, you may want to tweak the physical


properties of your objects. For instance, if your
objects are piling up as they fall out of the box,
you can reduce their friction and the friction
of the floor, so that they spread further after
colliding with the floor and the other toys.
3. Turn on Auto Key and move the time
Note: Remember that to change the physical
slider to frame 60. Rotate the box clockwise
properties, you must open the group and
by about 125 degrees so that the objects will
change the properties of the group helper
pour out when physically active. Turn off Auto
object. You can change the properties of more
Key. Be careful to move your floor below the
than one object at a time.
final position of the toy box so that the two are
not interpenetrating. This would not generate
errors in simulation, but would look strange.
Preparing Output
Note: Your toys may exhibit some strange
behavior when you are hand-animating the Now that you have your simulation behaving
box, but don’t be alarmed. This is because the correctly, you need to create keyframes for the
objects have not been keyframed yet. They objects’ motions. This can be done as before using
will, however, behave correctly in the preview the Create Animation button on the Toolbox.
window. In this example, you will create keyframes for
the first 100 frames of the motion, and then
4. Click Preview Animation. simulate from frame 100 on. This shows how the
Your box tips over and the toys pour out onto reactor dynamics functionality can extract initial
the floor. You may want to increase the size of velocities from the scene so that simulating from
your floor so that the toys don’t all wobble over frame 0 to 100 in one step is the same as simulating
the edge. from frames 0 to 20, then from 20 to 40, 40 to 60,
60 to 80, and finally 80 to 100.
Note: You can continue using your file or
you can open reactor_intro_11.max from
\tutorials\reactor\introduction.
Reducing File Size 853

Extract initial velocities for rigid bodies: factor of their original value. In this section, you
will reduce the keyframes for your rigid bodies.
1. On the reactor toolbar, click Create Note: You can continue using your file or
Animation. you can open reactor_intro_12.max from
Keyframes are created between frame 0 and 100 \tutorials\reactor\introduction.
for your rigid bodies’ motions.
Remove redundant keyframes after simulation:
2. On the Utilities panel click reactor, then on
1. On the Utilities panel > click reactor and
the Preview & Animation rollout, set Start
expand the Preview and Animation rollout.
Frame=100 and End Frame=500.
2. In the Preview and Animation rollout, set Start

3. Click Preview Animation. Frame to 0 and End Frame to 100.


3. On the Utilities panel, expand the Utils rollout.
You will see that the objects start simulation
with initial linear and angular velocities. In the Key Management group, click Reduce
Now.
4. In the Time Controls, click Time This reduces the keyframes for all active rigid
Configuration. bodies in the simulation. For this example, use
5. In the Time Configuration dialog, set End Time the default threshold value of 0.5.
to 500. 4. Look at the animation again. As you can see,
the behavior of the rigid bodies in your scene is
6. Click Create Animation again. almost exactly the same as before the reduction
Keyframes will be created from frame 100 to process, but the number of keyframes for each
500. If you examine the keyframes behavior toy is greatly reduced. The motion of the toys
in the viewport, you will see that the objects’ is still quite complex, but the file size has been
motion is smooth as it passes over frame reduced about 30%.
100, since the objects’ initial velocities were 5. Save your scene as my_reactor_intro_final.max.
extracted and used for simulation. If you like, you can compare your results with
the saved file reactor_intro_final.max. About
midway through your animation, your scene
Reducing File Size should look something like the following
illustration.
You now have keyframes for your objects’ motion
that can be used for creating animations or still
renderings. However, each object currently has a
keyframe for every frame. This means that your
file size is quite large; it will also be quite difficult
to tweak an object’s behavior after the simulation.
reactor provides access to a reduction process that
attempts to remove redundant keyframes for the
rigid bodies. You can provide a threshold value for
the algorithm that guarantees that the motion of
the objects after this reduction will be within that
854 Chapter 8: Special Effects

on which it’ll come to rest. The focus of this


tutorial is rag doll character creation, so we’ve
provided the completed scene with one catch: The
character lacks any physical properties, and, most
importantly, it has no constraints! Without these
features the character has no physical presence in
the scene, and will not react with the other objects.
As you proceed through this tutorial you will learn
what constraints are, how to use them and how
to tweak their parameters to adjust the rag doll’s
reactions. After this it is up to you to decide how to
best use all those rag dolls, whether it be for falling
down staircases, tumbling over banisters or simply
being caught in explosions. It’s up to you!
Summary
In this tutorial, you have learned the basics of
using reactor to create complex animations:
1. Using the Rigid Body Properties dialog to set
properties for objects in your animation.
2. Using an RB Collection object to control the
animation.
3. Previewing the animation, and converting the
animation into 3ds Max keyframes.

Skill Level: Intermediate


Time to complete: 2–3 hours

Rag Doll Tutorial Features Covered in this Tutorial


In these lessons you will learn:
Rag Doll Tutorial • Setting physical properties for the bones.
In this tutorial, you will add constraints to a • Viewing gravity and other simulation
predesigned character model to create a fully parameters.
simulated rag doll using reactor. The tutorial uses • Creating a Rigid Body Collection.
two different constraint types to achieve realistic • Previewing the animation.
rag doll motion: Hinge and Ragdoll constraints.
Each type is presented individually, with the • Using constraints to hold the character together.
workflow and typical use case for each constraint. • Using Hinge constraints for knees, elbows and
wrists.
The scene is a simplified room, containing a set
of stairs for your rag doll to fall down, and a floor • Disabling collisions.
Setting Up the Rag-Doll Scene 855

• Using Ragdoll constraints for hips and create a simulation that mirrors your everyday
shoulders, back and neck. experiences, or if you’d prefer, an alien world
with gravity pointing to the right!
Tutorial Files
All the files necessary for this tutorial
are provided on the program disc in the
Making Objects Physical
\tutorials\reactor\ragdoll directory. Before The character model you are working with may be
starting the tutorials, copy the \tutorials folder thought of as 18 individual pieces: 17 which are
from the disc to your local program installation. bones and an eighteenth, which is the skin that
envelopes them. As far as reactor is concerned,
the skin plays no part in the physical simulation
Setting Up the Rag-Doll Scene of the scene; it is simply an aesthetic feature in
that it presents a more realistic human look than
In this lesson, you set up the scene by opening a
the underlying bones. Only the bones themselves
3ds Max file.
are simulated and they feedback new coordinate
Open the sample file: information to the skin so that it may properly
deform to keep the bones wrapped up.
• Choose File menu > Open and open
character.max from \tutorials\reactor\ragdoll. With this in mind the first thing you must do is
give each of the bones a value for its mass.
You are presented with a simple scene
containing some stairs, a floor and a character
Set physical properties for the bones:
model.

1. On the toolbar, click Select By Name, or


alternatively, press H .
You will now be presented with a complete list
of all the objects in the scene.
2. In the Select Objects dialog, turn on Display
Subtree.

At the moment none of the objects in this scene


have any physical properties associated with
them; this is what you’ll be adding over the
course of the tutorial. reactor essentially adds
physicality to scenes. To properly simulate
dynamics, objects must have real-world
properties such as mass and friction assigned.
By adding these things to your scene, you can
856 Chapter 8: Special Effects

As you can see, all of the bones are named so nice final result, if you’d like to add greater
that their position in the body is apparent; realism to the simulation you should try to give
LCalf, RFoot, Head, etc. the different components a comparable value
3. Select all the bones and click Select. to their real life equivalents, keeping the ratio
of masses relative. For example, your forearm
4. On the Utilities panel, click reactor and should not have the same mass as your thigh!
open the Properties rollout. For this tutorial, accept the default values of 0.3
for Friction and Elasticity. However, feel free to
tweak their values and see the results. Elasticity
controls how bouncy the object appears to be; a
greater value leads to a bouncier feel. Friction
controls how easy it is to slide the object across
a given surface in the scene; larger values lead
to increased resistance.
Next, you will give the background objects (the
steps of the staircase and the floor) a physical
presence in the scene.
6. Select the steps and the floor in the scene.

7. On the Utilities panel > Properties


rollout, set Mass to 0.0.
This seems like a strange mass for these
objects. However, reactor treats all objects
with a mass of zero as fixed in place; under
no circumstances are they allowed to move.
Since you don’t want the steps or the floor to
suddenly drop into the void under the influence
of gravity, you give them a mass of zero to tell
reactor that they are immovable.
As you may have noticed, the default mass
assigned by reactor to an object is zero (fixed),
so this last step can be ignored, in general.

View gravity and other simulation parameters:

1. On the Utilities panel, click reactor and


open the Havok 1 World rollout

5. Assign a value of 10.0 kilograms to the


selection, meaning that, in total, the character
weighs 170 kg. Although doing this yields a
Making Objects Physical 857

The three values in the World rollout > Gravity


area control the gravity in your world (scene).
The X, Y and Z components together form the
direction vector that represents gravity. Since
gravity usually points downward, only the Z
component has a non-zero value, by default.
But where does the rather strange looking
value of -386.22 come from? The minus sign
simply indicates that the gravity should be Notice that the values in the Havok 1 World
applied downwards, and the value is arrived at rollout are updated accordingly:
as follows: In the real word, gravity accelerates
objects towards the earth at around 9.8 m/s
every second. If you look down at the next
value in the World rollout, you’ll see that 1m
is equal to 39.37 3ds Max units (inches), so
if you roughly convert gravity from meters to
3ds Max units, you get the 386.22 3ds Max units
you see above.
2. Choose Customize menu > Units Setup and
switch the Display Unit Scale to Metric.

If you give values to the X and Y components


of Gravity, you can create bizarre scenes where
characters fly towards the walls or even the
ceiling! In this lesson, you will be simulating a
’normal’ environment, so there is no need to
change it.
858 Chapter 8: Special Effects

The final step before you can simulate your scene


is to add your objects to a rigid body collection.

Add the objects to a rigid body collection:

1. In the Create panel, click Helpers and


select reactor from the dropdown list.
The Object Type rollout should now contain
reactor object types.

At the moment, there are no objects in the


collection.

3. On the Modify panel > RB Collection


Properties rollout, click Add.
4. In the Select Rigid Bodies dialog, select all of
the scene objects except skin and click Select.
The RB Collection Properties list should now
look something like this:

2. On the Create panel > Object Type rollout, click


RBCollection, then click in one of the viewports
to create a rigid body collection helper object.
The position of the helper object is of no
significance to the scene. You should see
something similar to the following image in the
viewport:
Attaching Limbs Together 859

You’re now ready to simulate the rag doll


scene. Before you do, save your work as
my_character01.max.

Preview the animation:


1. Continue from your previous section,
or open character01.max from the
\tutorials\reactor\ragdoll directory.

2. On the Utilities panel, click reactor and


expand the Preview & Animation rollout, then
click Preview in Window.
3. Press P to start the simulation.
The bones are not yet connected, and thus,
fall apart when they hit the stairs. In the next
lesson, you will attach the limbs.

Attaching Limbs Together


In the previous lesson, the character literally fell to
pieces once he hit the stairs. In the current scene,
each bone is essentially an independent object and
is in no way linked with the other bones in the
body. There is nothing to stop the individual bones
from going their own way. In this lesson, you will
use Constraints to hold the character together.
Constraints are used to connect one object to
another. All constraints are represented in 3ds Max
by helper objects.

View all available reactor helpers:

• On the Create panel, click Helpers, and


select reactor from the drop-down list.

You are informed that several of the bodies


are interpenetrating, however you may
safely ignore this for the moment by clicking
Continue. The reactor preview window pops
up and you are be presented with the following
scene:
860 Chapter 8: Special Effects

This means that although it can rotate around the


hinge axis, it can do so only until it bumps in the
wall of the car. In reality, it cannot swing a full
360 degrees: The constraint’s range of motion is
limited (to 120 degrees, for example).
Furthermore, the hinges that connect the door
to the frame can take only a measured amount
of stress before giving way (think of hitting the
door with a rather large sledge hammer). Since
you can break the constraint, you would call this
a breakable hinge constraint, or more precisely a
breakable limited hinge constraint. The good news
is that reactor can simulate all of these features,
giving you free rein over the movement and the
stresses and strains that the constraints in you
scene can undergo.

Add a hinge constraint

Among the reactor objects you’ll see some of


1. On the Create panel, click Helpers, and
the available constraint types; from Hinge
choose reactor from the dropdown list.
constraints to Prismatic constraints, there are
constraint types to reproduce pretty much any 2. On the Create panel > Object Type rollout,
behavior you would like to see in your scene. click Hinge.
In the next lesson, you will concentrate on the The Properties rollout displays.
Hinge and Rag Doll constraints, as these are
the two you will be using to piece together the
character.

Using Hinge Constraints


The first constraint you’ll be using is known as a
hinge constraint which, as you might guess from
the name, behaves like a hinge. A simple, everyday
example of this kind of constraint is a door. A door
can only swing around the points at which it is
attached to the frame; you can think of this as the
axis around which the door rotates. It can’t rotate
around the other two axes, because the connection
points to the frame prevent it from doing so.
In fact, the door is actually a special type of hinge
constraint in that it is a limited hinge constraint.
Setting Up Knees, Elbows, Ankles and Wrists 861

forearm. The Limited group parameters let you


control the extents of the hinge’s motion.

Setting Up Knees, Elbows, Ankles


and Wrists
Open the sample file:
• You can continue from where you left
off, or choose File menu > Open and
load the character01.max from the
\tutorials\reactor\ragdoll directory.
Using a constraint is similar to the Rigid Body
Collection, but this time you add a Constraint
Solver to the scene. Next you can begin to add
various constraint types to your objects and then
add them to this solver. The solver, in essence,
figures out how best to keep all of your objects
happy under the conditions they’ve been given
(body A connected to body B, body B connected
to body C, etc.).

Add a Constraint Solver to the scene:

1. On the Create panel, click Helpers and


choose reactor from the drop-down list.
2. On the Create panel > Object Type rollout,
click CSolver.
3. Click in one of the viewports to create a
Constraint Solver.
Note: The location of the helper object is not
important.

As you can see, Hinge has quite a few


parameters, but the only ones that you will be
concerned with for this tutorial are the Parent,
Child, and Limited settings. You use the Parent
and Child controls to specify the objects in
your scene that serve as the two components of
the constraint; for example: the upper arm and
862 Chapter 8: Special Effects

Note: The Constraint Solver works only if all the Next you’ll choose the objects to which to
constraints act upon rigid bodies that belong to assign to this constraint.
the same Rigid Body Collection. 3. In the Modify panel > Properties rollout, click
Next, you’ll specify the collection to which to the button labeled None, next to Child.
apply the Constraint Solver.
4. With the solver selected, open the Modify 4. Press H and choose RFoot in the Pick
panel > Properties rollout, and click the button Object dialog, then click Pick
labeled None, below RB Collection. The Child button should now read RFoot.
5. On the Modify panel > Properties rollout, turn
5. Press H and choose RBCollection01 on the Parent check box.
from the Pick Object dialog.
This indicates that you want to constrain two
Now you’re ready to start connecting bones objects together, rather than one object to the
together, and soon will have your rag doll tumbling world.
down the stairs. You’ll use the Hinge constraint to
6. Click the button labeled None, next to Parent.
connect the various bones in the character, first
joining the right foot and calf bones to simulate
an ankle. 7. Press H , choose RCalf from the Pick
Objects dialog, and then click Pick
Create Hinge constraints for the ankles: The button beside Parent should now read
1. On the Create panel > Object Type rollout, RCalf and the scene should look like this:
click Hinge.
2. Click anywhere in a viewport to create a Hinge
constraint.
Setting Up Knees, Elbows, Ankles and Wrists 863

Create Hinge constraints for the knees, elbows and


wrists:
In its current state, the character’s foot is free to
rotate 360 degrees around the hinge constraint, • The process for setting up the hinge constraint
which as you can imagine would be pretty for each of the other bone pairs is identical,
painful! You need to use the Limited property with only the constraint limits differing. With
for this hinge constraint. this in mind use this list to set the constraint
8. On the Properties rollout, turn on Limited.
parameters for each joint:

9. In the Limited group, set Min Angle to -20.0


When you’re done, the scene should look like
and Max Angle to 30.0 this:

10. Repeat this process for the left foot and calf
bones.

Constraint Name Child Parent Min Angle Max Angle


RAnkleJoint RFoot RCalf -20.0 30.0

LAnkleJoint LFoot LCalf -20.0 30.0

RKneeJoint RCalf RThigh -85.0 0.0

LKneeJoint LCalf LThigh -85.0 0.0

RWristJoint RHand RForeArm -35.0 35.0

LWristJoint LHand LForeArm -35.0 35.0

RElbowJoint RForeArm RUpperArm -85.0 0.0

LElbowJoint LForeArm LUpperArm -85.0 0.0


864 Chapter 8: Special Effects

You’ll simulate the other bones using Rag Doll


Constraints, as their motion is more sophisticated.
The last thing you have to do is to add all of the
constraints to the Constraint Solver.

Add the Hinge constraints to the Constraint Solver:

1. Press H , and on the Object Select


dialog, choose CSolver01 and click Select.

2. On the Modify panel > Properties rollout,


click Add. Next you’ll preview the scene again to see just how
3. On the dialog, highlight all of the hinges and these alterations have affected the character.
click Select
The CSolver Properties rollout should now • On the Utility panel, click reactor, and
look like this: then on the Preview & Animation rollout, click
the Preview in Window.
You might have noticed during the last preview that
reactor complained that some of the rigid bodies
in the scene were interpenetrating. Although you
ignored this warning on that occasion, it’s not a
good idea to do in general. Later in this tutorial,
you will take care of this issue, but for now click
Continue and view the preview.
The first thing that stands out is that the bones
connected with hinge constraints stay together.
This is exactly as planned, but notice that they
continue bouncing and dancing about once they
Setting Up Knees, Elbows, Ankles and Wrists 865

hit the floor. This is because reactor notices that


the bones are interpenetrating with one another
and tries to separate them. However, at the same
time, the Constraint Solver is trying to keep them
together. Since they are essentially battling with
one another over the position of the various bones
they continue to bounce about erratically. The
solution to this is to tell reactor not to worry about
interpenetrations between the bones that you’ve
connected. There are three columns: one for all the
entities (objects) in the scene, one for enabled
Disable collisions between the limbs: collisions, and one for disabled collisions. By
default, all collisions are enabled between all
1. On the Utility panel > reactor > objects so you need to tell reactor to ignore the
Collisions rollout > Global Collisions group, collisions between the bones in your character.
click Define Collision Pairs. You want to ignore only bone-to-bone
collisions, though. If, for example, you chose
to ignore the collision between the character’s
foot bone and the floor object, the character’s
foot would pass straight through the floor
unimpeded.
2. Select all of (and only) the bone objects in the
first column.
This displays a list of enabled collisions in the
second column.
3. Click the >> button

All of the collision pairs between the selected


You are presented with the following dialog: bodies move to the third column (disabled
collision pairs).
4. Click OK to accept the changes.
Note: Instead of disabling all collisions between
all limbs, you could instead disable collisions
between adjoining limbs. In order to do so, you
866 Chapter 8: Special Effects

would start with all collisions enabled, select


each adjoining pair (LHand and LForeArm,
Spine3 and Head, etc..) and click ">>" to
disable just those pairs.

Preview the animation with collisions disabled:

1. On the Utilities panel > reactor >


Preview & Animation rollout, click Preview in
Window.
The Preview window should open this time A. Twist Axis
without any warnings and everything should B. Plane Axis
behave as expected (no bouncing limbs). C. Twist x Plane Axis (outward)
2. Save your work again, this time as 1. Parent Body
my_character02.max 2. Child Body

The Rag Doll constraint provides three axes of


importance: the Twist Axis, the Plane Axis, and
Using Rag Doll Constraints
the Twist x Plane Axis. The twist axis is probably
In the previous lesson, you finished joining up the the easiest to visualize and you can do so by simply
simpler bones in the body. Now it’s time to think stretching out your arm and rotating it so that
about how to simulate joints such as the hips or your thumb changes from pointing upwards to
shoulders. These joints are more complex than the downwards. Your movement is just a series of
knees or elbow, as they need to allow for rotation rotations along the twist axis of the shoulder and
and they have a range of motion of greater freedom elbow. In general, the twist axis should follow the
than the hinge constraint provides. To tackle these length of the child body in a joint. In reactor you
types of joints you will use Rag Doll constraints. can specify how far on either side of neutral the
These are fairly complex, so this lesson will serve constraint can twist; this need not be symmetric.
as a brief overview. The following is a picture of
two objects connected by a Rag Doll constraint:
Using Rag Doll Constraints 867

A. Twist Axis
B. Plane Axis
C. Twist x Plane Axis (outward)
1. Twist Min.
2. Twist Max. A. Twist Axis
3. Twist Range B. Plane Axis
C. Twist x Plane Axis (outward)
1. Cone Min.
2. Cone Max.

A. Twist Axis
B. Plane Axis
C. Twist x Plane Axis (outward)
1. Twist Range
A. Twist Axis
The other two axes are interlinked and together
B. Plane Axis
the control the allowed volume that the child body
C. Twist x Plane Axis (outward)
can occupy. So first you’ll have a look at the cone
angles that allow you to specify the volume that the If you imagine the constraint representing your
child may move through: shoulder, the green volume is the range of allowed
positions that your upper arm may occupy.
However, you can refine the allowed volume
further by using the plane axis to enforce plane
868 Chapter 8: Special Effects

limits. These limits are used to generate two


further cones:

A. Twist Axis
A. Twist Axis C. Twist x Plane Axis
B. Plane Axis 1. Plane Min. Cone
C. Twist x Plane Axis (outward) 2. Plane Max. Cone
1. Plane
2. Plane Min. Cone
3. Plane Max. Cone
4. Plane Min.
5. Plane Max.

A. Twist Axis
C. Twist x Plane Axis
1. Plane Min. Cone
2. Plane Max. Cone
A. Twist Axis If the volumes do not intersect, the plane limits do
B. Plane Axis not have any effect in the constraint; however, by
C. Twist x Plane Axis (outward) allowing the cones to intersect, and deeming the
1. Plane overlapping volume as invalid body positions, you
2. Plane Min. Cone can limit the allowed positions for the child body
3. Plane Max. Cone further still.
This allows you to create two different scenarios;
one where the cones generated by the plane limits
intersect with cone produced by the cone angles
and the one where they do not:
Setting Up Hips, Back, Neck and Shoulders 869

Create Rag Doll constraints for the hips:

1. On the Create panel, click Helpers and


choose reactor from the drop-down list.
2. On the Create panel > Object Type rollout,
click Ragdoll.
3. Click in a viewport to create a Ragdoll helper
object.

A. Twist Axis
B. Plane Axis
C. Twist x Plane Axis

These are the parameters that you will be adjusting


in reactor to tweak the behavior of the character.
Hopefully this brief overview will help clarify Rag
Doll constraints a little for you.
Next, you choose which objects to associate
with this constraint.
Setting Up Hips, Back, Neck and
4. On the Modify panel > Properties rollout, click
Shoulders
the button labeled None, next to Child.
Open the sample file:
• You can either continue from where 5. Press H and from the Object Select
you left off or you choose File menu > dialog, choose RThigh and click Pick.
Open and load character02.max from the
The button beside Child should now read
\tutorials\reactor\ragdoll directory.
RThigh.
You will approach this lesson in a similar manner 6. Turn on Parent.
to the hinge constraint lesson in that you’ll go
This tells reactor to constrain two bodies
through one of the joints in detail and then
together.
use a table of parameters to construct the other
constraints. The setup for each Rag Doll constraint 7. Click the button labeled None, next to Parent.
is identical, so once you’ve mastered the first one
you should have no trouble setting up the rest of 8. Press H and from the Pick Object
the character. You start with the hips. dialog, choose Pelvis, then click Pick
The button beside Parent should now read
Pelvis and the scene should look like this:
870 Chapter 8: Special Effects

parameters. Use this table to set up the


remaining Rag Doll constraints in your scene.
Once you’ve created all of the above constraints
your Rag Doll constraints should look like this:

Next, you need to adjust the Rag Doll constraint


limits so that it behaves like a real hip joint:
9. In the Modify panel > Properties rollout >
Limits group, set Twist Min to -5.0 and Twist
Max to 5.0.
The only thing left to do is to add these new Rag
10. Set Cone Min to -25.0 and Cone Max to 55.0.
Doll constraints to your Constraint Solver.
11. Set Plane Min to -45.0 and Plane Max to 2.5.
Add the Rag Doll constraints to the Constraint Solver:
You have completed your first Rag Doll
constraint. Once you have successfully finished
with that constraint, you can move on to 1. Press H and select the CSolver01
completing the rest in a similar fashion. object.

Create Ragdoll constraints for the back, neck, and 2. On the Modify panel > Properties rollout,
shoulders: click Add.
• The table below gives a list of the constrained
bodies, the constraint name and the constraint
Cone Cone Plane Plane
Constraint Name Child Parent Twist Min Twist Max
Min Max Min Max
RHipJoint RThigh Pelvis -5.0 5.0 -25.0 55.0 -45.0 2.5

LHipJoint LThigh Pelvis -5.0 5.0 -55.0 25.0 -45.0 2.5

BackJoint1 Spine1 Pelvis -1.0 1.0 -30.0 30.0 -50.0 5.0

BackJoint2 Spine2 Spine1 -1.0 1.0 -8.0 8.0 -6.0 3.0

BackJoint3 Spine3 Spine2 -1.0 1.0 -8.0 8.0 -6.0 3.0

RShoulderJoint RUpperArm Spine3 -5.0 5.0 -75.0 85.0 -5.0 65.0

LShoulderJoint LUpperArm Spine3 -5.0 5.0 -85.0 75.0 -5.0 65.0

NeckJoint Head Spine3 -5.0 5.0 -45.0 45.0 -15.0 15.0


Creating the Animation 871

3. Select all the objects (Rag Doll constraints) and


click Select.
Now the Constraint Solver has all of the
constraints in it and the scene is ready to
preview once again. First, save your scene.
4. Choose File menu > Save As and save the file as
my_character03.max

Preview your character:

• On the Utility panel > reactor > Preview


& Animation rollout, click Preview In Window.
Now your character should tumble down the
stairs properly.

Create and play the animation:


Creating the Animation
1. On the Utility panel > reactor > Preview
Now that the simulation is working correctly, it’s
& Animation rollout, click Create Animation.
time to create the animation. Since you don’t want
to see the bone objects and the constraints in your 2. Once the animation calculations have
animation, the first thing you’ll do is hide them. completed, click on the viewport of your choice
and click Play.
Open the sample file:
And that’s a wrap! It’s up to you now to tweak
• Continue from the previous lesson or choose
the various parameters on the rag doll to alter its
File menu > Open and choose character03.max
behavior as it tumbles down the stairs. You may
from the \tutorials\reactor\ragdoll directory.
find some joints are too loose or tight: reduce
Hide the bones of the character: or increase the limits accordingly. You can give
both halves of the rag doll’s body different settings
1. Press H and on the Select Objects to encourage it to fall in a given direction. Try
dialog, choose the skin, the floor, and all 16 changing its initial position and orientation or add
steps, and then click Select. some obstacles on the stairs.
You can see the final result of this tutorial
2. On the Display panel > Hide rollout, by opening characterEnd.max from the
click Hide Unselected. \tutorials\reactor\ragdoll directory.
Now you should only be able to see the skin of
Summary
your rag doll.
You can use the reactor constraints to hold a
character together, and control how it behaves
during falls, collisions, and other physical
encounters.
872 Chapter 8: Special Effects

Anda mungkin juga menyukai