3Ds Max 2009 Special Effects

86
Tutorials AUTODESK ® 3 9 DS MAX ® Special Effects

description

Autodesk 3Ds Max 2009 Special Effects tutorial.

Transcript of 3Ds Max 2009 Special Effects

Page 1: 3Ds Max 2009 Special Effects

Tutorials

AUTODESK ®

39

DS MAX®

Special E�ects

Page 2: 3Ds Max 2009 Special Effects

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 UserDocumentation is protected by national and international intellectual property laws and treaties. All rights reserved. Use of the Documentation issubject 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 itspublication, 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 IMPLIEDWARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS, AND MAKESSUCH MATERIALS AVAILABLE SOLELY ON AN "AS-IS" BASIS.IN NO EVENT SHALL AUTODESK, INC., BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIALDAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVELIABILITY TO AUTODESK, INC., REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THEMATERIALS DESCRIBED HEREIN.

Autodesk TrademarksThe following are registered trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December, 3December.com, 3dsMax, 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, CanYou 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, VisualTugboat, 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. TrademarksThe 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 Trademarksclothfx 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 isa trademark of RE:Vision Effects, Inc. Intel is a registered trademark and the Intel Optimizer Logo is a trademark of Intel Corporation, used underlicense. 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 brandnames, product names, or trademarks belong to their respective holders.

Third-Party Copyright NoticesI. 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 USEUse, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 12.212 (Commercial Computer Software-RestrictedRights) 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.

PATENTSProtected 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.

Page 3: 3Ds Max 2009 Special Effects

Special Effects Tutorials

This section covers a multitude of effects youmight encounter in your everyday life, such as asimple cigarette smoke, water from an opened firehydrant, fog effects, and even tumbling down thestairs! You will learn how to use particle systemswith space warps, add environment and lenseffects, as well as create many simulations usingreactor.

Features Covered in This Section

• Creating particle systems

• Using forces and space warps

• Emitting particles from geometry

• Using materials with particles

• Creating and manipulating a camera viewport

• Using different lens effects

• Setting up a volume light

• Creating fog

• Creating rigid body collections

• Creating simulations with reactor

• Setting physical properties for objects insimulation

• Using Hinge and Rag Doll constraints

Files for This Section

All the files necessary for this tutorial are providedon the program disc in the \tutorials directory.Before starting the tutorials, copy the \tutorialsfolder from the disc to your local programinstallation.

Particle AnimationParticle systems are useful for a variety ofanimation tasks. They’re most often employedwhen animating a large number of small objectsusing procedural methods; for instance, creating asnowstorm, a stream of water, or an explosion. Inthese tutorials, you learn how to create such effectswith the two different types of particle systems in3ds Max: event-driven and non-event-driven.

The event-driven particle system, called ParticleFlow, tests particle properties, and, based on thetest results, sends them to different events. Eachevent assigns various attributes and behaviorsto the particles while they’re in the event. In thenon-event-driven systems, particles typicallyexhibit similar properties throughout theanimation, although they can come under the

Special Effects

Page 4: 3Ds Max 2009 Special Effects

790 Chapter 8: Special Effects

influence of external forces such as wind andgravity.

Files for This Section

All the files necessary for this tutorial are providedon the program disc in the \tutorials directory.Before starting the tutorials, copy the \tutorialsfolder from the disc to your local programinstallation.

Non-Event-Driven ParticleSystemsParticle systems are a useful tool for animatinglarge amounts of objects procedurally. They canmimic natural effects such as rain, smoke, andsnow, as well as less natural effects such as laserblasts. The non-event-driven particle systemscovered in these tutorials are particularly usefulfor applications in which the particles’ propertiesdon’t change fundamentally over the courseof the animation. They also serve as a simpleintroduction to procedural animation.

Procedural animation is different than ordinarykeyframe animation. In keyframe animation, anobject is moved from keyframe to keyframe. Inprocedural animation, the animation of objectsis controlled by a set of parameters. Theseparameters can be keyframed over time, but forthe most part, you don’t animate individual objectsor particles in the system.

Note: For each tutorial, in addition to the standardtutorial files, we provide a sample scene file with"_completed" in its name. This shows the tutorialfile with all changes made. The completed sceneswere used to render the sample AVI animations.

Skill Level: Intermediate

Time to complete: 2+ hours

Features Covered in This Section

In these lessons you will learn:

• Creating particle systems.

• Using space warps.

• Creating materials to make smoke.

• Emitting particles from geometry.

• Using Noise controllers.

• Using motion blur to create the illusion of water.

• Using PArray and PCloud systems.

• Using parameter wiring.

• Adding fog and volume lighting.

Tutorial Files

All the files necessary for this tutorialare provided on the program disc in the\tutorials\simple_particle_effects directory.Before starting the tutorials, copy the \tutorialsfolder from the disc to your local programinstallation.

Page 5: 3Ds Max 2009 Special Effects

Creating Cigarette Smoke 791

Creating Cigarette Smoke

In this tutorial, you use a particle system to create astream of cigarette smoke trailing from an ashtray.The animation relies on space warps to affect themovement of the smoke. For example, you use aWind space warp to model the fan in the sceneblowing the smoke around.

Animation techniques used in this tutorial:

• Creating a particle system.

• Creating space warps that affect the motion ofthe particles.

• Choosing appropriate particle geometry.

• Creating a material that models smoke whenapplied to particles.

Time to complete: 30 minutes

Set up the scene:

• Open cigarette_smoke.max.

All the files necessary for this tutorialare provided on the program disc in the\tutorials\simple_particle_effects directory.Before starting the tutorials, copy the \tutorialsfolder from the disc to your local programinstallation.

The scene contains a simple table, an ashtray,and a fan. To make the animation easier to

adjust, the fan’s geometry (except for the fanmotor) is frozen.

Create the particle system:

1. Activate the Top viewport.

2. If you need to, select the ashtray andclick Zoom Extents Selected to fit the ashtrayin the viewport.

3. In the Create panel, make sureGeometry is active, and choose Particle Systemsfrom the drop-down list.

4. On the Object Type rollout, click Super Spray.

5. In the Top Viewport, click and drag in theashtray near the tip of the cigarette object.

Super spray particle system in the Top viewport

Page 6: 3Ds Max 2009 Special Effects

792 Chapter 8: Special Effects

Super spray particle system in a user view

You have now created a Super Spray particlesystem. The icon you see is called the emitter. Theemitter doesn’t render, but it shows the locationin the scene where particles will be emitted. Thearrow points up, indicating that initially particleswill move upward out of the center of the icon.

When you create a Super Spray system, theparticles are emitted toward you in the viewportyou click. That is, they move along the Z axis inthe positive direction. This is why we used the Topviewport to create the system.

(Different kinds of particle systems have differentlyshaped emitters, and different emission behavior.)

• Activate the Camera02 viewport, andthen click Play.

A burst of particles leaves the emitter rapidly,moving in a vertical line. Each particle isdisplayed as a plus sign or “tick.” By frame 40,all of the particles have moved out of the frame.This doesn’t look much like smoke.

You are seeing the default behavior and settingsfor Super Spray. To get a more smoke-like effect,the first thing to do is adjust the Super Sprayparameters.

Slow the particles down and make them easier tovisualize:

1. With the Super Spray particle systemselected, go to the Modify panel.

Tip: Particle systems have a large numberof rollouts. If you like, you can expand thecommand panel to see more rollouts andcontrols at once. Move your mouse to theborder between the command panel and theviewports, and drag the command panel tocreate multiple columns. The command panelcan be widened whether it is floating or docked.To dock or float a command panel, right-clickto one side of the tabs, and choose Float orDock from the flyout menu.

2. In the Basic Parameters rollout > ViewportDisplay group, change the display type to Dotsrather than Ticks.

For the purpose of working in viewports,especially when particles are very closetogether, Dots give a better preview than theplus-sign Ticks.

3. In the Basic Parameters rollout > ParticleFormation group, set the Spread value for OffAxis to 2.0.

(This is the Spread spinner immediately belowthe Off Axis spinner, and not the Spread valueassociated with Off Plane.)

4. In the Particle Generation rollout > ParticleMotion group, set Speed to 1.5.

Now if you play the animation, you see theparticles stream upward more slowly. The slightincrease in the Spread value means they don’tmove in a completely straight line. (Spread ismeasured in degrees. Higher Spread values createa more fan-like pattern.)

However, the particles stop emitting at frame 30and completely disappear from the scene at frame100. To get a smoke effect, you also need to change

Page 7: 3Ds Max 2009 Special Effects

Creating Cigarette Smoke 793

the default values that govern particle generationand lifetime.

Adjust particle generation:

1. In the Particle Generation rollout > ParticleQuantity group, set Use Rate to 30.

This increases the number of particlesgenerated per frame from 10 to 30.

Note: When you play the animation in theCamera02 viewport, you don’t see 30 particlesbeing emitted per frame. By default, inviewports, Super Spray displays only 10 percentof the particles actually being emitted. Thiskeeps viewport playback fast. You can adjustthe preview value in the Viewport Displaygroup of the Basic Parameters rollout, but werecommend you keep it low. Previewing a largepercentage of particles in a system can seriouslyslow down 3ds Max. When you render theanimation, the rendering uses the full numberof particles.

Tip: A better way to preview the effect of allparticles is to use the command Rendering >Make Preview.

2. Also on the Particle Generation rollout, in theParticle Timing group, set both Emit Stop andDisplay Until to 300.

The animation is 300 frames long. Setting EmitStop to 300 means that particles continue tobe emitted throughout the animation. SettingDisplay Until to the same value means that allparticles that haven’t died remain in the sceneuntil the end of the animation.

3. Continuing down, set the Life value to 180.

A particle in this system dies 180 frames afterit is emitted. Not all of the particles will lastuntil frame 300.

Now the particles emerge in a denser cloud thatdoesn’t move right out of the scene. This is more

reminiscent of smoke. But the movement of theparticle system still looks artificial.

Adding Wind, Turbulence, and Drag

Particles are not smart. Like sheep, you needto herd them. Space warps such as Wind andGravity add directional fields that affect particlemotion. In this simulation of cigarette smoke,you’ll associate the fan with a Wind space warpthat models the breeze from the fan.

Create a wind space warp to simulate a breeze fromthe fan:

1. Go to the Create Panel and turn onthe Space Warps button.

2. Make sure Forces is the active space warp type.

3. In the Object Type rollout, click Wind.

4. Drag in the Left viewport to create the Windspace warp.

Wind space warp created in Left viewport (facing awayfrom user)

Position the wind space warp:

• Activate the Top viewport. UsingRotate and Move transforms, align the Windspace warp roughly to that of the fan. The arrowshould point in the direction of the particles.

Page 8: 3Ds Max 2009 Special Effects

794 Chapter 8: Special Effects

Wind space warp in Top viewport, before aligning to fan

Wind space warp in Top viewport, after aligning to fan

You don’t have to be too accurate about aligningthe Wind icon with the fan motor. The winddirection, and linking it to the motor’s motion,are the important things.

Link the wind to the fan so their motion iscoordinated:

• With the Top viewport still active andthe Wind space warp still selected, click SelectAnd Link, then drag from the Wind space warpto the FanMotor object.

Now if you play the animation, the Wind spacewarp rotates with the oscillating fan. Nothinghas changed the animation of the particles.They are unaffected by the Wind space warpuntil you explicitly bind them to it.

Bind the wind space warp to the smoke particles:

1. Select the Super Spray particle system.

2. Click Bind To Space Warp, then click theSuper Spray system, and hold the button downas you drag to the Wind space warp.

When Bind To Space Warp is active and thecursor is over a selected object, the cursorchanges to the space warp icon to inform youthat this object can be bound to a space warp.Then when you drag from the object to thespace warp, a line is drawn to show which objectis being bound. Once off the object, the cursorchanges again until it’s over a suitable spacewarp. Then it reverts to the space warp icon toinform you that this binding is legal. When yourelease the mouse, the bound space warp brieflyhighlights to indicate the binding is complete.

3. Activate the Camera02 viewport, thenplay the animation.

The effect of the wind is much too strong. Thesmoke is whipped around dramatically.

Adjust the strength of the wind:

By default, the Wind space warp’s Strength value is1.0. Reducing the Strength value makes the effectof the fan look more realistic.

1. Select the Wind space warp.

2. In the Modify panel, set the Strengthvalue to 0.03.

3. Activate the Camera02 viewport, thenplay the animation.

The smoke is more gently wafted now. Butyou can make the smoke’s appearance morerealistic still, by giving it a bit of inertia. To doso, you use another space warp.

Page 9: 3Ds Max 2009 Special Effects

Creating Cigarette Smoke 795

Add a drag space warp:

1. Go to the Create panel and clickthe Space Warps button.

2. Make sure Forces is the active space warp type.

3. On the Object Type rollout, click Drag.

4. In the Top viewport, drag to create a Drag spacewarp near the Super Spray.

Drag space warp created in the Top viewport

Set the drag space warp parameters:

The Drag space warp has a large number ofparameters. For the purposes of this animation,you need to set only a few of them: Time Off, andthe Axis percentages for Linear Damping.

1. With the Drag space warp selected, goto the Modify panel. Set Time Off to 300.

By default, the Time Off value is 100, but youneed Drag to be active for the duration of theanimation.

2. With Linear Damping the active damping type,set the X and Y Axis percentages to 1.0, and theZ Axis percentage to 2.0.

As with Wind, the Drag space warp doesn’taffect the particles until you bind them to it.

Bind the drag space warp to the smoke particles:

1. Click Bind To Space Warp, then in theTop viewport click the Super Spray system, andhold the button down as you drag to the Dragspace warp.

Now a drag force is applied to the particles. Theforce is non-uniform: there is more drag alongthe Z-axis (up and down in the scene) than inother dimensions.

2. Activate the Camera02 viewport, thenplay 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 stillunnaturally uniform. The solution is to make theWind more turbulent.

1. Select the Wind space warp.

2. On the Modify panel, go to the Windgroup box in the Parameters rollout. SetTurbulence to 0.03, Frequency to 0.12, andScale to 0.1.

The Turbulence value controls how much theparticles are perturbed from their position.Frequency causes random variation in theturbulence, and Scale adjusts the size of theturbulence field.

Why such low values? Actually, a good rule ofthumb for turbulence settings is to start verylow and work your way up. Turbulence createsa fractal noise field that is localized to the Windspace warp icon. The scale of this field needs tomatch the scale of your scene. The easiest wayto do this is to start with low values and thenincrease them as needed.

Page 10: 3Ds Max 2009 Special Effects

796 Chapter 8: Special Effects

3. Activate the Camera02 viewport, thenplay the animation.

The particles move much more like cigarettesmoke, with wispy sways and curls.

Also, the particles are blown in the currentdirection of the Wind space warp on a givenframe. The effect is not conical with attenuationas it would be for an actual fan; instead, theeffect of the wind and its turbulence is parallel.

Particle Geometry

While the movement of the smoke is now good,the particle geometry needs some adjusting.

Preview the particle system:

• Activate the Camera02 viewport, thenchoose Animation > Make Preview. A MakePreview dialog appears. Leave the settingsat their defaults, and click Create. A VideoCompression dialog appears. Use this dialog’sdefault settings as well, and click OK.

When the preview completes, use Animation >View Preview to view it as an AVI movie.

The particles still appear as a bunch ofsolid-looking dots (by default, they render as 3Dtriangles). To make them more convincing assmoke, first you adjust the particle geometry, thenyou apply an appropriate material to them.

Change the particle geometry:

1. Select the Super Spray particle system.

2. Go to the Modify panel.

3. If one of the space warp bindings is chosen inthe modifier stack, click the Super Spray entryso you can see the particle system’s rollouts.

4. In the Particle Type rollout > Standard Particlesgroup, choose Facing.

Facings are square particles that are constantlyoriented towards the camera. If you renderedthem as solid, they wouldn’t appear realistic,either. But facing particles are meant to havea material applied to them. When facings areclumped together and a material gives them adegree of transparency, you can achieve a fairlyrealistic smoke.

The size of the particles is uniform. In general,when you want realistically to model naturalphenomena, you want to avoid uniformity.

Make the particle geometry more random:

Ideally, the particles should increase in size afterthey are born, and then fade out as they die. TheGrow For and Fade For parameters let you do this.Also, to break up the unrealistic uniformity of theparticle size, you need to add some variation tothe size.

1. With Super Spray still selected and the Modifypanel still active, go to the Particle Size groupnear the bottom of the Particle Generationrollout.

2. Set the Size to 2.0 and the Variation to 30 %.

3. Set the Grow For value to 90 and Fade For to 30.

In these last steps, you have increased theoverall size of the particles and randomized thissize by plus or minus 30 per cent. Each particlenow grows for 90 frames, from an initial sizeof zero to the full size it will achieve. Thirty

Page 11: 3Ds Max 2009 Special Effects

Creating Cigarette Smoke 797

frames before it dies, it begins to shrink backdown to a size of zero. (Remember that youhave set each particle to live for 180 frames.)

Cigarette Smoke Material

Now that you’ve adjusted the particle geometry,you can shade the particles to look like smoke. Thetrick to this is to use a soft, partially transparentmaterial that allows the particles to blend togetherand form a wispy smoke pattern. Because theparticles are rendered as square facing geometry,a radial gradient with transparent edges canaccomplish this.

Set up the material:

1. Open the Material Editor.

2. Choose an unused sample slot.

3. On the Blinn Basic Parameters rollout, clickthe Diffuse color swatch to display the ColorSelector.

4. Set the Diffuse color to pure white (Value=255).

5. Set both the Specular Level and Glossinessvalues to 0.

6. Turn on the Self-Illumination Color check box.

The Self-Illumination control changes from aspinner to a color swatch.

7. Click the Self-Illumination color swatch. In theColor Selector, set the self-illumination color toa medium gray (Value=144).

8. On the Shader Basic Parameters rollout, turnon the Face Map toggle.

Use Face Map shading with Facing particles, sothat each rendered particle displays the entiremap.

You now have a material that is pure white,partially self-illuminated with a medium graycolor, and face mapped for particles.

Assign the material to the smoke particles:

• Click Assign Material To Selection, or dragfrom the sample slot to the Super Spray particlesystem.

A rendering would show that the smoke is nowmore smoke-colored, but has hard, jaggededges from the square facing particles.

Smoke particles without transparency appear too solidand jaggy.

To soften the smoke, you create a radial gradientwith transparency at its edges.

Make a radial gradient map for the smoke particles:

1. In the Material Editor, open the Maps rolloutand click the Opacity map button.

2. In the Material/Map Browser, choose BrowseFrom: New, click Gradient, and then click OK.

3. On the Gradient Parameters rollout, change theGradient Type to Radial.

4. Click Go To Parent to return to the baselevel of the material.

5. On the Maps rollout, change the OpacityAmount value to 5.

The Gradient map determines only five percent of the opacity. Ninety-five percent of theopacity is still controlled by the base Opacityparameter. For smoke, make the particles as

Page 12: 3Ds Max 2009 Special Effects

798 Chapter 8: Special Effects

soft and semi-transparent as possible, especiallywith high particle counts. So the Gradient mapshould be the only thing that sets the Opacityof the particles, but you also want the overallOpacity to be very low. For this animation, youturn off the base Opacity value completely.

6. In the Basic Parameters rollout, set the Opacityvalue to 0.

The rendered scene now has very soft smokethat rises up, grows gradually in size, and isblown around and perturbed by the wind fromthe fan.

The Final Animation

You are now ready to activate the Camera02viewport and render the entire animation.Even at low resolution, this can take about halfan hour. Alternatively, you can play the filecigarette_smoke.avi, provided on the Tutorial FilesCD.

Creating Gushing Water

This tutorial uses particles to simulate gushingwater. The techniques are similar to those in thecigarette smoke tutorial (page 791), but includesome new methods. For example, in the cigarettesmoke tutorial, the Super Spray particle systememitted particles from a single point in space. In

this tutorial, a slightly different particle system,PArray, emits particles from an object surface.

Animation techniques used in this tutorial:

• Emitting particles from geometry instead offrom a point in space.

• Using Track View and a Noise controller toanimate particle flow.

• Using motion blur to make the particles appearmore like water.

Time to complete: 45 minutes

Set up the scene:

• Open gushing_water.max.

All the files necessary for this tutorialare provided on the program disc in the\tutorials\simple_particle_effects directory.Before starting the tutorials, copy the \tutorialsfolder from the disc to your local programinstallation.

This is a simple street scene with a brick wall,sidewalk, street, and fire hydrant.

Creating a Stream of Water

To simulate water, the particles should be emittedfrom the fire hydrant geometry. The PArrayparticle system can do this.

Page 13: 3Ds Max 2009 Special Effects

Creating Gushing Water 799

Make a particle system that will be emitted from thefire hydrant:

1. On the Create panel, make sureGeometry is active. Choose Particle Systemsfrom the drop-down list.

2. Turn on PArray, then drag in the Right viewportto create a PArray particle system.

PArray in Right viewport

PArray in Camera01 viewport

The placement of the PArray system doesn’tmatter, 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. PArrayrequires you to specify an object from which theparticles are emitted.

Choose the fire hydrant nozzle as the particleemitter:

1. With the PArray icon selected, go to theModify panel.

2. Click the Pick Object button at the top of theBasic Parameters rollout.

3. Press H , and then choose Firehydrant-nozzle01 in the Select Objects dialog. ClickPick.

Now if you drag the time slider, you’ll noticethat particles shoot out in all directions. Bydefault, PArray emits particles from the entiresurface of the selected object, in the directionof the polygons’ normals. (If the normalswere flipped, the particles would emit inward,toward the center of the hydrant.)

For this scene, the particles should emit onlyfrom the cap face at the end of the nozzle. To dothis, create a sub-object selection.

Create a sub-object selection to restrict particleemission:

1. Select Firehydrant-nozzle01, andthen 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-objectlevel.

Page 14: 3Ds Max 2009 Special Effects

800 Chapter 8: Special Effects

4. Select the circular polygon at the end ofthe cylinder used to model the nozzle.

Nozzle sub-object polygon selection in Right viewport

Nozzle sub-object polygon selection in Camera01 viewport

Now you have a sub-object selection that thePArray particle system can use.

Set the PArray to use the sub-object selection:

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

2. In a viewport, select the PArray icon.

3. On the Modify panel, go to theBasic Parameters rollout, and in the ParticleFormation group, turn on Use SelectedSubObjects.

Now particles are emitted from only the end ofthe cylinder, as if it were an actual nozzle.

Adjust the particle generation parameters:

1. With the PArray still selected and theModify panel still active, go to the ParticleGeneration rollout.

2. In the Particle Quantity group, set the Use Ratevalue to 50.

Page 15: 3Ds Max 2009 Special Effects

Creating Gushing Water 801

Now 50 particles per frame are emitted.(Viewports preview only 10 percent of theparticles by default, so this change will be moreobvious when you render.)

3. In the Particle Motion group, set the Divergenceangle to 15 degrees.

This parameter controls how much the streamof particles spreads. At a Divergence of zero,particles are emitted in a straight line along thenormals of the emitter object.

4. In the Particle Timing group, set the Emit Stopvalue to 100.

In other words, particles are emitted for as longas the animation lasts (100 frames).

5. Set the Life value to 100.

Particles should live for the duration of theanimation, too.

Using Space Warps to Control the Stream

To make the stream of particles behave moreeffectively like water, you use two space warps:a Gravity space warp to make the stream fallrealistically, and a Deflector space warp to modelthe roadbed.

Add gravity to control the stream:

1. On the Create Panel, click SpaceWarps.

2. With Forces the active space warp category,click Gravity. Drag in the Top viewport to createthe space warp near the fire hydrant object.

By default, Gravity is exerted along the negativeZ axis (away from the viewer) in the viewportwhere you create it. So using the Top viewportto create Gravity makes it pull downward, asone usually expects.

Gravity in Top viewport

Gravity in Camera01 viewport

The default parameters for the Gravity spacewarp are satisfactory, so you don’t need to adjustthem. Gravity is pretty straightforward: simply adirectional force with realistic acceleration.

Bind the gravity space warp to the particles:

1. Click Bind To Space Warp.

2. Drag from the PArray particle system to theGravity space warp. When the cursor changesto notify you that the binding is legal, releasethe mouse button.

The Gravity space warp highlights briefly to letyou know that the operation is complete.

Page 16: 3Ds Max 2009 Special Effects

802 Chapter 8: Special Effects

3. Now drag the time slider again.

Particles emitted from the nozzle are nowaffected by gravity, and fall downwards.Unfortunately, at this point they also fallthrough the street. Renderable geometry doesnot deflect particles. To model the street,you’ll create a Deflector space warp to stop theparticles when they reach ground level.

Add a deflector at street level:

1. On the Create panel, click SpaceWarps if necessary. Change the active spacewarp category to Deflectors, and then clickDeflector.

2. Drag in the Top viewport to create the Deflectorspace warp. This space warp’s icon should coverthe area covered by the Street and Curb objects.It can extend beyond their bounds, as well.

Creating the Deflector in the Top viewportensures that it is created at ground level.Unlike some kinds of space warps, the size andlocation of the Deflector icon have an effect inthe scene. The deflector controls the regionwhere particles will be deflected. A deflectordoesn’t render, but its placement affects particleinteraction.

Deflector in top viewport

Bind the deflector to the particles:

1. Turn on Bind To Space Warp.

2. Drag from the PArray particle system to theDeflector space warp. When the cursor changesto notify you that the binding is legal, releasethe mouse button.

The Deflector space warp highlights briefly tolet you know that the operation is complete.

3. Drag the time slider.

The PArray particles emit from the nozzle, falldownward due to Gravity, and then bounceoff of the Deflector. At this point, the particlesbounce too much. In reality, when an objectbounces or reflects from an object, a certainamount of energy is lost. Also, the particlesdon’t come to rest but keep moving as if thestreet object were a smooth sheet of glass. Bothof these problems can be corrected by adjustingDeflector parameters.

4. Select the Deflector space warp ifnecessary and go to the Modify panel.

5. In the Parameters rollout, change the Bouncevalue to 0.2, and increase the Friction value to10.0.

6. Drag the time slider.

Now particles reflect from the Deflector withless velocity, and as they slide across its surface,the increased friction makes them come to resteventually.

Modulating the Rate of Particle Emission

So far, the fire hydrant emits water in a steadystream. This doesn’t look too realistic, becausegushing water tends to pulse. To simulate this, youcan animate the PArray system’s Speed parameter.In this tutorial, you combine a Bezier Floatcontroller with a Noise controller to apply some

Page 17: 3Ds Max 2009 Special Effects

Creating Gushing Water 803

randomness to the Speed, creating a pulsatingmotion.

Assign controllers to the Speed parameter:

1. Select the PArray particle systemin the viewport.

2. On the Modify panel > stack display, click thePArray system to activate its controls, ratherthan one of the space warp bindings.

Before and after selecting the PArray level

3. On the Particle Generation rollout, right-clickthe PArray’s Speed value.

Warning: Don’t right-click the up/down arrows to

the right of the spinner. This resets the Speed to 0.0.

4. In the pop-up menu, choose Show In TrackView.

Track View opens to show the variousparameters for PArray.

5. Locate the Speed parameter for the PArrayObject by expanding Object (PArray).

Tip: If you can’t locate PArray01 in the TrackView dialog, choose Display > Filters, andassure that Objects is selected in the Showgroup of the Filters dialog.

6. With the Speed parameter chosen, chooseController > Assign. Choose Bezier Float fromthe Assign Float Controller dialog.

The Bezier Float controller inherits a valueof 10 from the original Speed setting. Youcan actually keyframe this value, but in thisanimation there is no need to do so.

7. Choose Controller > Assign again, and chooseFloat List from the Assign Float Controllerdialog.

Float List is a List controller that combinescontroller values. If you expand the Speedhierarchy in Track View, a track labeledAvailable appears at the bottom of the Speedtracks. This is where you add new controllersto the list.

8. Click the Available track to highlight it, thenchoose Controller > Assign once more, andchoose Noise Float from the Assign FloatController dialog.

9. The List Controller dialog appears. Dismiss it,and select the Noise Float: Noise Float item inTrackview.

10.Right-click Noise Float: Noise Float and selectProperties from the quad menu.

The Noise Controller dialog appears.

Page 18: 3Ds Max 2009 Special Effects

804 Chapter 8: Special Effects

Adjust the Noise parameters:

The Noise controller can generate a randomlypulsating motion. The default settings for Noisedon’t accomplish this, so you need to adjust them.

1. On the Noise Controller dialog, change thesettings as follows:

• Set the Frequency to 0.2. This makes thenoise more undulating and less jittery.

• Turn off Fractal Noise. This too makes thenoise smoother by making value changesless abrupt.

• Turn on the toggle labeled > 0. Thisconstrains the value to be greater thanzero. In terms of the Speed parameter,less-than-zero values would be roundedto zero, causing particles to have no speedwhen they are emitted.

• Set the Strength value to 10.0. Thisconstrains the value to be no greater than20. The Speed value will range between 10and 20.

2. Close the Noise Controller dialog.

3. Close the List Controller dialog that appears.

Notice that there is still an Available track at thebottom of the Speed hierarchy. You can add asmany controllers to the list as you want. Thiscan be a powerful technique.

Combining the Noise controller with BezierFloat gives you more control over the variation.Specifically, the Noise value modifies theBezier value. With a Bezier value of 10 and aNoise range of 10, the result of the Float Listpotentially will range between 10 and 20, at amean of 15. (It actually ranges from less than12 to approximately 18.)

Note: You can achieve a similar effect by usingthe PArray Variation parameter for particlemotion, but the controllers give you morecontrol and eliminate the need for keyframing.

4. Close Track View.

Preview the animation:

• Activate the Camera01 viewport, andthen click Play.

Now particles are emitted with a more realisticpulsing motion, with spurts here and there.

The animation is now ready to render, except thatthe water particles need an appropriate material.

Creating a Water Material

For gushing water, you want a material thatappears like foamy water. This material is similarto the material you created for smoke. Facingparticles with a soft radial gradient map causesrendered particles to blend together into a foamystream that approximates the look of water.

Set up particles to render as facing geometry:

1. Select the PArray particle systemand go to the Modify panel.

Page 19: 3Ds Max 2009 Special Effects

Creating Gushing Water 805

2. In the Particle Type rollout, go to the StandardParticles group, and choose Facing.

3. In the Particle Generation rollout, go to theParticle Size group. Set the Size value to 4.0,and the Variation value to 25.0 %.

If you render the scene right now you see thatthe particles are displayed as square facings. Aswith smoke, you need to soften their edges tomake them appear more amorphous.

Create the material:

1. Open the Material Editor and select anunused sample slot.

2. Click the Diffuse color swatch to display theColor Selector, and change the diffuse colorto blue-gray (for example, R=150, G=181,B=205).

3. Make the material very glossy by setting theSpecular Level to 131 and the Glossiness to 63.

Apply maps to control the material’s opacity:

1. Open the Maps rollout and click the Opacitymap button.

2. In the Material/Map Browser, choose a Gradientmap, and then click OK.

3. In the Gradient Parameters rollout, set theGradient Type to Radial.

4. Click Go To Parent to return to the parentmaterial. In the Maps rollout, click the Diffusemap button.

5. In the Material/Map Browser, choose a Maskmap, and then click OK.

6. In the Mask Parameters rollout, click the Maskbutton.

7. In the Material/Map Browser, choose a Gradientmap, and then click OK.

8. In the Gradient Parameters rollout for the newgradient map, set the Gradient Type to Radial.

Turn on face mapping to match the particle system:

• Click the Go To Parent button to returnto the parent material. In the Shader BasicParameters rollout, turn on Face Map.

If Face Map is turned off, the facing particlesstill retain their sharp edges. This is because, bydefault, particles read gradient maps over time,not at once as for other kinds of geometry.

Assign the material:

• Assign this new material to the PArrayparticle system.

Now when you render the scene, the particlesare blended together quite nicely.

Page 20: 3Ds Max 2009 Special Effects

806 Chapter 8: Special Effects

The particles still look a bit "blobby," for water. Toimprove this, you can use Image Motion Blur.

Adding Motion Blur

There are several ways to generate motion blur in3ds Max. For the water from the hydrant, you usethe method called Image Motion Blur.

Assign Image Motion Blur to the PArray:

1. Select the PArray particle system, andthen right-click it.

2. Choose Properties from the quad menu(lower-right, Transform quadrant).

3. In the Motion Blur group of the ObjectProperties dialog, set the blur type to Image,and make sure Enabled is turned on. Click OK.

The scene is now complete.

The Final Animation

You are now ready to activate the Camera01viewport and render the entire animation.Even at low resolution, this can take about half

an hour. Alternatively, you can play the filegushing_water.avi, provided on the program disc.

Particle FlowIn these tutorials, you’ll learn how to use theParticle Flow particle system in 3ds Max to createspecial effects such as water splashing, mistblowing, the explosive impact of an asteroid into aplanet surface, guided missiles trailing smoke andblowing up targets, and more.

Features Covered in This Section

Among the 3ds Max features covered in thesetutorials are the following:

• Spawning particles upon collision with adeflector.

• Changing particle type based on test results.

• Applying forces such as gravity and drag toparticles.

• Using scripting with an event-driven particlesystem.

• Using materials with particles.

Files for This Section

All the files necessary for this tutorialare provided on the program disc in the\tutorials\particle_effects directory. Beforestarting the tutorials, copy the \tutorials folderfrom the disc to your local program installation.

Tutorials in this Section

Introductory Tutorial (page 807)

Modeling Whipped Cream (page 813)

Page 21: 3Ds Max 2009 Special Effects

Introductory Tutorial 807

Introductory Tutorial

The best way to understand Particle Flow is byusing it. This tutorial will acquaint you with someof 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, clickthe drop-down list and choose Particle Systems.

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

4. In the Perspective viewport, drag out arectangle.

This is the Particle Flow icon, or source, namedPF Source 01. By default, it acts as an emitter,but you can also use any other object as anemitter.

5. Drag the time slider.

By default, the icon emits particles downwardfrom its entire surface. In the viewport, theparticles appear as ticks.

6. Go to frame 10, and press Shift+Q to renderthe Perspective viewport.

Page 22: 3Ds Max 2009 Special Effects

808 Chapter 8: Special Effects

The rendered particles appear in a window.The default particle shape is a tetrahedron, afour-sided triangular solid. Its geometry isvery simple, so the system can handle manyparticles quickly and efficiently, but it gives agood idea of how particles are behaving. Otherbasic shapes are a low-poly sphere and a cube;Particle Flow also lets you use any scene objectas particle geometry.

Modify the particle system in Particle View:

1. Press the 6 key to open Particle View. Theparticle source icon need not be selected.

Tip: You can also open Particle View from thecommand panel when a Particle Flow sourceicon is selected.

1. Event display

2. Particle diagram

3. Global event

4. Birth event

5. Depot

Particle View is where you manage and editthe particle system. The main window, knownas the event display, contains the particlediagram, which describes the particle system.The default system starts with a global event,with the same name as the Particle Flow icon,followed by a birth event, containing a Birthoperator and several others that define thesystem’s initial properties. Each operator’sname is followed by its most important settingor settings in parentheses. Above the eventdisplay is a menu bar, and below is the depot,containing all operators available for use in theparticle system. For more information aboutthis dialog, see Particle View.

Page 23: 3Ds Max 2009 Special Effects

Introductory Tutorial 809

2. In the global event, PF Source 01, click thename of the Render 01 (Geometry) operator tohighlight it and access its parameters. Be sureto click the text area; clicking the icon simplytoggles the operator’s active state.

Because this operator is in the global event, itaffects the entire particle system. Any operatoryou place here does likewise. For example, youcan define a global material here, or you candefine different materials locally in each event.For best results, don’t combine global and localoperators of the same type in a single system;use one or the other.

The settings for the Render operator appear ina rollout on the parameters panel, on the rightside of the Particle View dialog. These include adrop-down list for how particles are to render,the percentage of particles that will render, andhow to split up the particles into individualmeshes.

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 theoperator name in the event.

4. Next to the Type label, click Ticks, and from thedrop-down list, choose Geometry.

Now the particles appear as tetrahedrons in theviewports.

Wire two events together:

Next, you’ll add a test and use it to wire the birthevent to a new event.

1. In the depot at the bottom of the Particle Viewdialog, find Age Test. It’s the first item that usesa yellow, diamond-shaped icon.

2. Drag an Age Test from the depot into the Event01 list, at the bottom of the list.

Page 24: 3Ds Max 2009 Special Effects

810 Chapter 8: Special Effects

Before you release the mouse button, make sureyou see a solid blue line in Event 01 under theDisplay operator. If the line is red and goesthrough an existing operator, the Age Test willreplace that operator. If you drop the Age Testoutside of Event 01 it will create a new event.

Age Test appears in the list, with its test outputsticking out to the left. This is the part you useto connect the test to the next event.

3. Click the Age Test item in the list, and thenin the Age Test 01 rollout on the right sideof Particle View, set Test Value=15 andVariation=0.

The test type is Particle Age, so this means thatall particles that have existed for more than 15frames will test True, and be passed on to thenext event.

Next, you’ll create a new event and wire it to thetest.

4. From the depot, drag the Shape operator(“Shape”) to an empty part of the event display,below Event 01.

Page 25: 3Ds Max 2009 Special Effects

Introductory Tutorial 811

The Shape operator appears in a new event,named Event 02. Like Event 01, the event has acircular event input sticking out from the top.Also, Particle Flow automatically adds a localDisplay operator to the event so its particles willbe visible in the viewports. You can disable theautomatic creation of local Display operatorsby choosing Options menu > Default Display> Global.

The actual location of an event in the eventdisplay doesn’t matter; the recommendedplacement is for the sake of convenience whenwiring the events. It also helps to make sense ofcomplex schematics if the events are arrangedlogically.

You can move an event by dragging its title bar.

Next, you’ll perform the actual wiring of theAge Test to the new event.

5. Position the mouse cursor over the blue dot atthe left end of the Age Test’s test output.

The cursor image changes to an icon depictingthree arrows pointing inward toward a circularconnector.

6. Drag from the event output on the Age Test inEvent 01 to the Event 02 input, and then releasethe mouse button.

Page 26: 3Ds Max 2009 Special Effects

812 Chapter 8: Special Effects

As you drag, the cursor image changes froma three-arrow icon to a circular connector byitself when it’s over an empty space in the eventdisplay area, and then to a four-arrow iconwhen it’s over the Event 02 input.

When you release the mouse button, a blue“wire” appears connecting the two events. Thiswire indicates that particles that meet the AgeTest conditions will pass “through” this wire toEvent 02, to be affected by its actions.

Tip: You can delete a wire (and anything elsein the particle diagram) by selecting it and

pressing the Delete key. Feel free to trythis now, but undo any changes when you’refinished.

7. Click the Shape 02 operator and setShape=Cube. Also, click the Display 02operator and set Type=Geometry.

View the wiring results:

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

Starting at frame 16, the particles at the headof the stream change into cubes, indicatingthat they’ve entered Event 02. As time goes on,more and more particles pass the age of 15 andbecome eligible to go to the next event.

2. While the animation is playing, try modifyingthe different operator settings to see whathappens. For instance, click Speed 01 and

Page 27: 3Ds Max 2009 Special Effects

Modeling Whipped Cream 813

change the Speed and Direction settings. Whenyou change a setting, the change is reflectedin the viewports in real time, even duringplayback.

Try right-clicking actions and events and usingRename to give them custom names. Even witha custom name, an action’s tooltip reveals itstype.

Another facility of the right-click menu is toadd comments to actions and events. Onceyou do so, a small red triangle indicates thecomment’s presence.

Congratulations! You now have a workingknowledge of Particle Flow. If you’d like to trysome more tutorials, go to the Particle Flowtutorials.

BlobMesh is a compound object in 3ds Max thatcreates a set of spheres from geometry, shapes, orparticles, and connects the resulting mesh togetheras if the spheres were made of a soft substance.

When the spheres are animated and come withina certain distance of one another, they connecttogether. When they move apart, they becomespheres again.

BlobMesh is particularly powerful with particlesystems such as Particle Flow, where you can use itto make the particles appear thick and viscous.

Here, you will use an existing particle flowanimation, and add BlobMesh to the particles tomake them look like a thick, liquid substance.

Set up for this lesson:

1. Open the file tut_blobmesh_start.max from thetutorials\blobmesh folder.

This file contains animation of a can ofwhipped cream spraying particles onto a bowlof strawberries.

2. Play the animation.

The particles are tetrahedrons. There aredeflectors on the strawberries, the bowl, andthe tabletop, and the particles are set up to stopmoving when they hit any deflector.

Create the blobmesh:

1. Choose Create panel > Geometry> Compound Objects.

2. Click BlobMesh, and click anywhere in thescene to create one blobmesh sphere.

3. Go to the Modify panel.

4. In the Parameters rollout > Blob Objects group,click Add. Select PF Source 01, then click AddBlobs.

Page 28: 3Ds Max 2009 Special Effects

814 Chapter 8: Special Effects

This adds the particles to the blobmesh object.

5. Play the animation.

The particles are replaced by blobs. The blobsobtain their sizes from the particle sizes.

In the viewport, some of the smaller particleswill appear not to be surrounded by blobs. Thisis because BlobMesh uses a different level ofdetail for viewports and renderings.

6. Press M to open the Material Editor. Selectthe material named Whipped Cream, and dragit over BlobMesh01 in the scene.

The whipped cream changes in the viewportwhen the material is assigned to it.

7. Render a frame to see how the blobs look in thefinal rendering.

Tip: You can add a Relax modifier to theBlobMesh01 object to make the blobs looksofter.

You can find a finished version of this scene inthe file tut_blobmesh_finish.max. You can alsosee an animation created with this scene in thefile tut_whippedcream.mov.

Summary

The BlobMesh compound object provides an easyway to make soft, liquid substances, especiallywhen used in conjunction with a particle system.

Page 29: 3Ds Max 2009 Special Effects

Creating the Sun with a Lens Flare 815

Creating the Sun with a LensFlare

In this tutorial, you’ll create a glowing sun usingLens 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 anambient 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 providedon the program disc in the \tutorials\lens_flaresdirectory. Before starting the tutorials, copythe \tutorials folder from the disc to your localprogram installation.

Adding a Camera ViewSet up your scene:

Files for this tutorial are in the \tutorials\lens_flaresdirectory.

1. On the File menu choose Open, and thenchoose tut_marsandsun.max.

2. Activate the Top viewport and zoom out.

3. On the Create panel, click the Camerasicon and click Target in the Object Type rollout.

4. Click near the bottom of the Top viewport, dragtoward Mars, and release.

This creates a target camera pointing at thecenter of Mars.

5. Activate the Perspective viewport. Change it toa camera viewport by pressing C .

Page 30: 3Ds Max 2009 Special Effects

816 Chapter 8: Special Effects

6. Click Truck Camera. In the Cameraviewport, pan the viewport to the left so thereis space for the sun on the right side of Mars.

Adding Lights

There are no lights in the scene. In this step, you’lladd two Omni lights: one to light Mars, and theother to be the Sun.

Light your scene:

1. From the Create menu, choose Lights >Standard Lights > Omni.

2. In the Top viewport, click to create an Omnilight to the right and below Mars. Name itmarslight.

3. Create a second omni light to the right andabove Mars. Name it Sun.

4. Select Sun and at the top of the Modify panel,click the color swatch. The Color Selectorappears. Change the color to a yellow-orangeand click OK.

Note: Both lights are adding illumination tothe scene. With the camera in front of Mars,the lighting of the sun doesn’t really add to theillumination on the dark side of the planet. Ifthis becomes a problem later, you can excludethis light from illuminating any objects in thescene.

5. Move marslight left or right to create a lightingeffect you like for the dark side of Mars.

Now use contrast to add some drama to yourlight.

Page 31: 3Ds Max 2009 Special Effects

Adding a Glow to the Sun Using Lens Effects 817

6. In the Modify panel, go to the Advanced Effectsrollout > Affect Surfaces group, and increasethe Contrast setting for marslight to 77.

You won’t see the changes until you render thescene.

7. Activate the Camera viewport, then onthe toolbar, click the Quick Render button.

You still don’t see the light that will be your Sunin the rendered image. It won’t appear until youadd effects in the next topic.

Tip: Try different contrast values and rendereach one. The higher the value, the sharper theedge of the light.

Adding a Glow to the Sun UsingLens Effects

In this topic, you’ll create a simple glow effect andadd a ring and a star effect to it. This will allow theSun to glow in the sky above the planet.

You can add as many different effects as you liketo create the sun’s glow. Try this effect, and thenexperiment with others.

Create a glow effect:

1. In the Camera viewport, select the Omni lightnamed Sun.

2. Go to the Modify panel and click theAtmospheres & Effects rollout title to open it.

3. Click the Add button. The Add Atmosphere OrEffect dialog appears.

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

Lens Effects is now listed in the Atmosphericsand Effects window.

Page 32: 3Ds Max 2009 Special Effects

818 Chapter 8: Special Effects

5. Click the Lens Effects name in the window andclick 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 therollout and the dialog.

7. In the Preview group, turn on Interactive.

A rendered frame window appears. This letsyou see the lens effect as you make changes.

Page 33: 3Ds Max 2009 Special Effects

Adding a Ring Effect 819

Tip: You should turn off Interactive whenworking in a complex scene, but it’s useful forexperimentation.

8. On the Lens Effects Parameters rollout, chooseGlow in the list on the left. Click the right arrowto move the effect into the list on the right.

After a brief delay, the light source appears as aglowing sphere in the virtual frame buffer.

9. Scroll down to the Glow Element rollout. In theName field, enter Main Sun.

To change the look of your Sun, try thefollowing settings in the Glow Element rollout:

• Set Size to 50.0.

• Set Intensity to 200.0, producing a verybright 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 fasterresults by changing numeric settings withthe 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 andEffects dialog, scroll up to the Lens Effects

Page 34: 3Ds Max 2009 Special Effects

820 Chapter 8: Special Effects

Parameters rollout. Choose Ring and move itto the list on the right. A ring appears aroundthe Main Sun in the Effects Preview window.

2. Scroll down to the Ring Element rollout andmake the following settings to define the ring:

• Set Size to 22.0.

• Set Thickness to 33.0, giving the ring moreof a glowing perimeter.

• Set Use Source Color to 50.0.

These changes make the ring moredramatic-looking, but it still needs someintensity to make it look like a glowing Sun.

Adjust the ring effect:

By increasing the intensity of the main glow andjuggling the size and thickness of the ring, you cancontrol the size of the white-hot center of the sun.

1. Increase the intensity of the Ring Element to133.0.

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 fromthe Sun behind the planet.

Now the Sun looks more realistic.

Adding a Star Effect

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 andEffects dialog, scroll up to the Lens EffectsParameters rollout. Choose Star from theeffects list and move it to the list on the right.A Star effect appears over the Main Sun in theEffects Preview window.

Page 35: 3Ds Max 2009 Special Effects

Adding Another Glow 821

2. Scroll down to the Star Element rollout, and setthe following:

• Set Qty (the number of points in the star)to 8.

• Set Intensity to 50.0

• Set Sharp to 5.0.

• Turn on Glow Behind.

• Experiment with Width and Taper beforesetting them to 1.0 and 0.1, respectively.

You might find that your effects are incorrect ifthe Sun moves behind the planet. You can fixthis by adjusting the effect’s Occlusion settings.

Improve the star effect by adjusting occlusionsettings:

1. In the Camera viewport, move the Sun omnilight so it’s just on the edge of the planet.

Because Interactive is turned on, the renderedframe window updates automatically.

2. Go to the Lens Effects Parameters rollout andselect main sun from the right-hand window.

3. Scroll down to the Glow Element rollout andset Occlusion to 0.0.

4. Return to the Lens Effects Parameters rolloutand select Ring from the effects list in theright-hand window.

5. Scroll down to the Ring Elements rollout andset Occlusion to 0.0.

Adding Another Glow

The effects you’ve added to the Sun have includedthe Glow Behind option, so they are not adding aglow to the planet, which is in front of the light.Now that your Sun is glowing in the sky, you needto add glow to the planet itself.

Add a second glow to your scene:

1. Select the planet in a viewport. Right-click andchoose Properties in the Transform quadrantof the quad menu.

Page 36: 3Ds Max 2009 Special Effects

822 Chapter 8: Special Effects

2. In the Objects Properties dialog > G-Buffergroup, change Object Channel to 1 and clickOK to close the dialog.

3. In the Environment and Effects dialog > LensEffects Parameters rollout, add another Glow tothe list of effects.

Note: If you closed this dialog you need toselect the Sun omni light and click Setup on theAtmospheres & Effects rollout.

4. In the Glow Element rollout, rename this effectGlow on Planet.

5. Click the Options tab and in the Image Sourcesgroup, turn on Object ID.

Notice that the number is set to 1 by default.

The planet now renders with a bright whiteglow. This is too intense.

6. Click the Parameters tab. Set Occlusion to 0.0and turn off Glow Behind.

7. Change Intensity to 45.0 and Source Color to50.0.

8. In the Radial Color section, change the whitecolor swatch to a darker brick red.

The planet is looking better now.

Tip: If the planet is still shadowy, move themarslight closer to the planet in the Topviewport.

Make global adjustments:

On the Lens Effect Globals rollout, you can makeglobal adjustments to control the whole effect.

1. Experiment to see what happens when youchange Size to 11.0, 22.0, and 33.0.

As an additional exercise, try animating theeffects’ 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 theirsettings. It also showed how multiple Glow effectscan create the effect of ambient lighting, how tocreate and navigate a camera viewport, and the useof omni lights for scene illumination.

Creating and Animating aFlying LogoIn this tutorial, you’ll learn to create a flyinglogo for a fictitious company named Worldwide

Page 37: 3Ds Max 2009 Special Effects

Creating the Earth Using Textures 823

Designs. Using shapes, modifiers, lighting effectsand Video Post, you produce an animated logo.

Skill Level: Beginner

Time to complete: 15 minutes

Features Covered in This Tutorial

• Creating and rotating a globe.

• Bending 3D text.

• Setting up a volume light.

• Creating fog.

Time to complete: 1 hour

Files for This Tutorial

All the files necessary for this tutorialare provided on the program disc in the\tutorials\worldwide_designs directory. Beforestarting the tutorials, copy the \tutorials folderfrom the disc to your local program installation.

Creating the Earth Using Textures

You will create a sphere and apply a texture map tocreate the illusion of a globe.

Create the earth object:

1. Start or Reset 3ds Max.

2. Open the Create panel and click Sphere.

3. In the Perspective viewport, move your cursorover the center of the grid, then drag out asphere.

4. On the Parameters rollout of the Modify panel,change Radius to 5.0.

5. In the Viewport Navigation Controls, clickZoom Extents Selected.

6. On the Name and Color rollout, change thename of the sphere to Planet Earth.

Create the earth material:

1. On the toolbar, click the Material Editorbutton or press M on the keyboard to openthe Material Editor.

The Material Editor opens in a floating window.The first material is active, highlighted in white.

2. Rename the material Planet Earth.

3. Click the Assign Material To Selectionbutton.

4. In the Material Editor, open the Maps Rollout,then in the Maps column, click the Diffuse Maplabeled None.

5. In the Material/Map Browser, on the right handcolumn double-click Bitmap. In the Select

Page 38: 3Ds Max 2009 Special Effects

824 Chapter 8: Special Effects

Bitmap Image dialog, navigate to and open\tutorials\worldwide_designs\earthmap.bmp.

Bitmap texture for the planet

The material in the Material Editor nowdisplays the earth map on a sphere.

Texture displayed on material sample

6. Double-click the sample sphere if you want tosee the material in a larger window.

7. On the Material Editor toolbar, click theShow Map In Viewport button.

8. Save your scene as wwdesigns.max.

Animating the Rotation of theGlobe

You’ll only have to set one rotational key to createthe illusion of the earth spinning. You build theanimation over a hundred frames and rotate thesphere a full 360 degrees using a TCB Rotationcontroller and the Rotation Windup command.This creates the effect of an endless loopinganimation.

Setup:

• Continue from the previous lesson, or open\tutorials\worldwide_designs\tut_wwdesigns_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 thedefault, but here you will switch to a differentrotation controller that lets you use the rotationwindup command.

2. Click the Assign Controller button to openthe Assign Rotation Controller dialog. SelectTCB Rotation from the list

3. At the bottom of the Key Info rollout, turn onRotation windup

Important: You must turn on Rotation Windup or

else the animation won’t work correctly.

4. Turn on Auto Key.

Page 39: 3Ds Max 2009 Special Effects

Adding the Text for the Logo 825

The Auto Key button turns red and the activeviewport is outlined in red to remind you thatnow you are in Auto Key animation mode.

5. Move the time slider to frame 100.

6. Press A on the keyboard to turn on AngleSnap.

This will make it easy to rotation an exactamount.

7. On the toolbar, turn on Select AndRotate.

The rotate gizmo displays on the sphere in theviewport.

Tip: To increase the size of the transform gizmo,press the + key on the keyboard.

The rotation gizmo displays on the sphere

8. Move your mouse over the blue Z axis ring ofthe Rotate gizmo in the viewport. Rotate theplanet about the Z axis, watching the valuechange in the coordinate onscreen readout inthe viewport. Stop when you see 360.

9. Turn off Auto Key.

10. Play the animation.

The sphere rotates smoothly in acounterclockwise direction.

The next step is to rotate the earth’s axis to giveit a realistic tilt.

11.While Select And Rotate is still active, moveyour cursor over the rotate gizmo in theviewport. When the Y axis turns yellow, rotatethe earth approximately –15 degrees about theY axis so the earth is tilted.

Because Auto Key is off, this rotation affects theentire animation.

12.Save your work as mywwdesigns02.max.

Tilted earth

You’ll notice the square selection brackets are tiltedalong with the texture, but the transform gizmoremains the same. That is because it is displayingthe View Coordinate system.

Adding the Text for the Logo

You’ll now create the flying logo by modelingthe three dimensional text using spline objects.Later, you’ll add an extrude modifier and a Bendmodifier to create the desired text effect.

Page 40: 3Ds Max 2009 Special Effects

826 Chapter 8: Special Effects

Setup:

• Continue from the previous lesson, or open\tutorials\worldwide_designs\tut_wwdesigns_glode_rotating.max.

Create a text object:

1. Activate the Front viewport, then right-clickthe viewport label and choose Smooth +Highlights to see the earth in shaded mode.

2. Zoom back in the viewport so the globe issmall but visible.

3. Open the Create panel > Shapes and in theobject type rollout, click Text. Click above theearth in the viewport to place the default text.

4. In the Parameters rollout, go to the Text fieldand type Worldwide Designs.

Tip: You can also copy and paste text into thisfield.

5. Click the Font drop-down arrow, and changethe font to something boxy like SansSerif Bold.If you don’t have that font, use anything elsethat’s not too narrow.

Tip: You can type the first letter of the font toquickly find it in the list.

6. Change the Text Size from 100 to 5.0.

Worldwide Designs Text

7. Click the Zoom Extents to zoom in theFront viewport.

Add extrude and bend modifiers:

Now add Extrude and Bend modifiers.

1. With the Text selected, choose Modifiers >Object–Space Modifiers > Extrude. In theParameters rollout, set the Extrude amount to0.5.

2. Click the color swatch next to the name of thetext, Text01. In the Color Selector, choosewhite.

The text turns white in the viewport.

3. In the Front viewport, move the text down sothat it intersects with the sphere (globe). Thetext still looks too big, so select the Text in themodifier stack, and then change Size to 3.0.

The text moved to bisect the earth sphere

4. Click Extrude in the modifier stack and applya Bend modifier from the Modifier List >Object-Space Modifiers.

You’ll use this to bend the text around the earth.

Page 41: 3Ds Max 2009 Special Effects

Adding the Text for the Logo 827

5. In the Parameters rollout, change the Bend Axisto X, then set the Bend Angle to 180.

6. Activate the Top viewport. Zoom in on theearth and text if necessary.

7. Move the text down in the Top viewport, asshown in the illustration.

The text is moved down in the Top viewport

8. Right-click the Top viewport label and chooseSmooth + Highlights.

9. Save the scene as mywwdesigns03.max.

Adjust the pivot point:

1. With the text selected, open the Hierarchypanel, then in the Adjust Pivot rollout, turn onAffect Pivot Only.

The pivot point of the text object is displayedas a tripod.

2. On the Tools menu, choose Align, then clickthe earth sphere object in the viewport. Thisdisplays the Align Selection dialog.

3. In the Align Position (Screen) group, turn onX, Y, and Z.

4. Set both the Current Object and Target Objectto Pivot Point. Click OK.

The pivot point is aligned to the center of theearth sphere object.

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 theY axis so that it matches the tilt of the planet.

As you rotate the text, you can refer to theonscreen coordinate readout in the viewport.

7. On the toolbar, set the Reference CoordinateSystem to Local.

Rotated text matches the tilt of the earth

Now you can finally animate the text rotatingaround the planet. You’ll set it going in theopposite direction from the way the earth spins.

Page 42: 3Ds Max 2009 Special Effects

828 Chapter 8: Special Effects

Animate the text:

1. Make sure Text01 is still selected,then open the Motion panel. In the AssignController rollout, choose Rotation in theTransform Position list.

2. Click the Assign Controller button to openthe Assign Rotation Controller dialog. ChooseTCB Rotation from the list.

3. At the bottom of the Key Info rollout, turn onRotation Windup.

4. At frame 0, turn on the Auto Keybutton and rotate the text around the Y axisuntil the text is behind the sphere.

No key will be created, yet.

Rotation for text at frame 0

5. Move the time slider to frame 100, then rotatethe 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.

If Continuity is not displayed in the Key Inforollout, click the Rotation button in the PRSParameters rollout.

This allows the text to rotate around the earthat a continuous rate of speed.

7. On the Key Info rollout, move to key number 1using the arrows, then set Continuity to 0.

8. Turn off Auto Key and play theanimation. The rotation of the text andearth sphere should be smooth and loopcontinuously.

Next, you’ll add a couple of lights for dramaticeffect.

9. Activate the Top viewport and Zoom outso you see some empty space around the Earth.

10. In the Create panel, choose Lightsand click Omni. Then in the Top viewport, seta light in front of and another light behind theplanet.

Add lights for drama.

11. Save your work as mywwdesign04.max.

Adding a Background and aMaterial

You’ll make the scene more interesting by simplyadding a background that makes the earth sphereappear to be in outer space. You’ll then add a shinygold material to the logo text for more impact.

Page 43: 3Ds Max 2009 Special Effects

Adding a Spotlight 829

Set up the scene:

• Continue from before, or opentut_wwdesigns_globe_text_rotating.max.

Add a background:

1. Open the Rendering menu > Environment.

2. Click the Environment Map button. In theMaterial/Map Browser, double-click Bitmap.Navigate to \tutorials\worldwide_designs andchoose stars10.jpg.

This is a large high resolution starfieldbackground.

3. Move the time slider to frame 50.

4. Activate the Perspective viewport andclick the Quick Render button.

The image renders with the Earth in front ofthe stars.

Warning: If you’ve set your rendering resolution to

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.

The next step is to make the logo text moreinteresting.

Add a material to the text:

1. On the main toolbar, click the MaterialEditor button. Click an unused sample sphere.

2. Click the Get Material button. In theBrowse From group, click Mtl Library, thendouble-click Metal_Dark_Gold [Standard] .

The sample sphere displays a shiny goldmaterial.

3. Make sure Text01 is selected, click theAssign Material to Selection button.

4. Click the Show Map in Viewport button.

The text is now gold.

5. Render the scene.

Golden text

6. Save your work to an incremental filename. Choose File > Save As. Click theincremental save button.

Now, you’ll add a spotlight that will illuminateeach letter of the logo as it rotates.

Adding a Spotlight

• Continue from before or opentut_wwdesigns_globe_text_bground.max.

Create a spotlight:

You’ll add a target spotlight that casts a focusedbeam of light onto each letter of the logo as itrotates. The target in this case is the earth so thatyou can easily align the beam of light to the logotext.

1. In the Top viewport, slide the time slider toframe 50 so that the logo text is rotated aroundthe lower half of the earth sphere.

Note: The illustrations display the text in white,not gold.

Page 44: 3Ds Max 2009 Special Effects

830 Chapter 8: Special Effects

2. Go to the Create panel > Lights and clickTarget Spot.

3. In the Top viewport, click below the logo textand drag upwards until the light cone touchesthe edge of the sphere.

4. Go to the Modify Panel. The Spotlight nameappears at the top of the panel. On the SpotlightParameters rollout use the Falloff/Field spinnerto narrow the beam of light. Try changing theField to 7.0.

5. Select the spotlight target.

Tip: If it’s difficult to select the spotlight target,type H on the keyboard. In the Select Objectsdialog, select Spot01.Target.

6. Select Tools menu > Align and click the earthsphere.

7. In the Align Position (Local) group, click X, Yand Z Positions. For Current Object and TargetObject, click Center. Click OK.

The spotlight target is now aligned to the centerof the sphere so that the light shines on the textlogo.

8. Select the spotlight source, Spot01. Openthe Modify panel and click Exclude from theGeneral parameters rollout.

9. Select the object Planet Earth from the SceneObjects list, and then click the >> button. ClickOK.

This prevents the spotlight from illuminatingthe earth sphere.

10.Right-click the Perspective viewport label andselect Views > ActiveShade to see how the lightilluminates the text.

You’ll probably need to adjust the spotlighttarget further so that the light illuminates onlyone letter at a time.

11.Right-click in an empty place in the viewportand select Close from the upper–left quadrantmenu.

Page 45: 3Ds Max 2009 Special Effects

Adding a Volume Light and Volume Fog 831

12. With the Modify panel still active, scrollthe rollouts until you can see the SpotlightParameters rollout. In the Light Cone group,make sure Circle is turned on.

13.Experiment with different values forHotspot/Beam and Falloff/Field until the size ofthe light beam is focused on only one letter.

Target spot illuminating the letter R

14.In the Perspective viewport, play the animation.

If you prefer that the logo text scroll moreslowly, you’ll add an additional 100 frames tothe animation.

Add frames to the animation:

1. Click the Time Configuration button.

2. In the Time Configuration dialog, set Lengthto 200.

3. On the toolbar, click the Select by Namebutton. In the Select Objects dialog, selectPlanet Earth and Text01.

The keys appear in the track bar.

4. On the track bar, select the key at frame 100and slide it to frame 200.

5. Play the animation again. The logo text and theearth sphere rotate more slowly.

6. Save your work to an incremental file name.Choose File > Save As. Click the + button.

Adding a Volume Light andVolume Fog

You’ll now add a fog effect to the spotlight andcreate a light foggy haze around the planet.Volume Light provides light effects based on theinteraction of lights with atmosphere, such as fog.

Set up:

• Continue from before or opentut_wwdesigns_globe_add_vol_lite.max.

Create a Camera from View

If you’re continuing from before, you’ll notice thatthere is no camera in the scene yet. You can createone by doing the following:

1. Activate the Perspective Viewport. Adjust it asyou like to frame your shot.

2. On the Views menu, click Create Camera fromView.

The Perspective viewport label changes toCamera01.

Add another spotlight

Now you’ll create another spotlight shining fromunderneath the globe.

1. Activate the Front Viewport, and zoom back soyou have more room.

Page 46: 3Ds Max 2009 Special Effects

832 Chapter 8: Special Effects

2. On the Create panel click the Lightsbutton. Turn on Target Spot and drag outa Spotlight below the planet. Set the targetslightly above the planet object in the FrontViewport.

3. Adjust the hotspot so it is wider than the planet,but not a wide as the ring of text.

You’ll use this spotlight to creating a halo oflight beams behind the planet. You’ll turn on afew options for the lights to give a good resultfor 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 themodify panel, or you can assign it using Renderingmenu > Environment.

1. Activate the camera viewport.

2. Go to the Rendering menu > Environment.

The Environment and Effects dialog appears.

3. In the Atmosphere rollout, click Add.

4. In the Add Atmospheric Effect dialog, selectVolume Light and click OK.

5. In the Volume Light Parameters rollout, clickPick Light.

6. Click on the Spot02 light in the viewport orpress the H key and pick the Spot02 objectfrom the list.

Spot02 appears in the field next to the RemoveLight button.

7. Press F10 to do a test render.

Tip: As you repeat the process of entering valuesand rendering, you will find that the fieldcannot be active for the rendering keyboardshortcut to work.

After you enter a value in a numeric field, clickon the rollout outside the field to remove thekeyboard focus from the field, and then pressF9 to render the same viewport as before (no

matter which viewport is currently active).

By playing individual values you can adjust theeffect.

8. In the Volume group change the Density to 20.Press F9 to Render Last.

Page 47: 3Ds Max 2009 Special Effects

Adding a Volume Light and Volume Fog 833

Turn on Exponential and press F9

9. You can also see the changes you’ve made, inthe Exposure Control rollout, by clicking theRender Preview button.

10.Press H on the keyboard and select Spot02, ifit isn’t selected already. On the Modify panel,open the Advanced Effects rollout.

11.In the Projector Map group click the buttonmarked None. Double-click Bitmap in the

Material Map Browser and then chooseDroplets.tga.

Adding a projector map will dramatically adddetail to the volume effect.

12.Press F10 to render.

13.On the Modify panel turn on Decay, setting itto Inverse.

In the Near Attenuation group turn on Use andShow. Set the Start to 11.0 and the End to 32.0

In the Far Attenuation group turn on Use andShow. Set the Start to 33.0 and the End to 43.0

Note: These are suggested values, yours mayvary.

14.Press F9 to render again.

15.For a more dramatic effect you can excludethe globe from the Spotlight. On the GeneralParameters rollout, click Exclude. In theInclude/Exclude dialog, highlight the Planetobject name and use the right-pointing arrowto move it to the right window, then click OK.

Page 48: 3Ds Max 2009 Special Effects

834 Chapter 8: Special Effects

16.On the Intensity/Color/Attenuation rolloutadjust the Near and Far Attenuation values sothe effect tapers off within the viewport.

17.If you’d to hide the effect below the globe,reposition the Spotlight and Spotlight target.Move it in small increments and repeatedlyrender until you have found a location youlike. By tilting the spotlight slightly, ratherthan using it straight up, you can get a moreinteresting effect.

18.Save your work as mywwdesign07.max

Add volume fog:

You’ll now create an additional fog effect aroundthe earth. But first, you need to create a type ofhelper object called an Atmospheric Apparatusthat will serve as a container for the fog.

1. On the Create panel, click Helpers, and selectAtmospheric Apparatus from the drop-downlist.

2. Click SphereGizmo.

3. In the Top viewport, select the center ofthe earth and drag outwards to create theSphereGizmo. Make it a little bit larger that thesize of the earth.

4. With the SphereGizmo still selected, clickthe Modify tab. In the Atmospheres and Effectsrollout, click Add. In the Add Atmospheredialog, highlight Volume Fog and click OK.

Now you need to setup the volume fogparameters.

5. In the Atmospheres and Effects rollout window,select Volume Fog. Click Setup.

6. In the Volume Fog Parameters rollout, clickPick Gizmo. Select the SphereGizmo, if itdoesn’t already appear in the dialog.

SphereGizmo01 appears in the field next to theRemove Gizmo button.

7. In the Volume group, click the white colorswatch. In the Color Selector, dialog, pick alight bluish purple color. Drag the whitenessselector to lighten the color. Click OK.

The color you selected is now displayed in theColor swatch.

8. In the Volume group turn on Exponential andincrease the Density to 100.0.

Page 49: 3Ds Max 2009 Special Effects

Adding a Flare Effect 835

9. In the Noise group, select Fractal. This gives thefog a less uniform appearance.

10.In the Noise group change the High Thresholdto 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 acloud cover.

13.On the toolbar click Select and Link. Link theSphereGizmo to the globe. Play the animation.

The fog spins with the globe.

14.Save your work as mywwdesigns08.max

Adding a Flare Effect

Using Video Post, you can add events that occur ina finished video. In this case, you are using VideoPost to add a flare effect that simulates a brightstar behind the earth sphere to give the animationmore of an outer space look.

Create a dummy object:

You’ll first need to create a dummy object that willserve as the “placeholder” for the flare effect.

1. Proceed with the file you saved in the last lessonor open tut_wwdesigns_globe_fog.max fromthe \tutorials\worldwide_designs directory.

2. On the Create panel, click Helpers >Dummy.

3. In the Top viewport, drag out a square above theearth sphere. Position the dummy so it is visiblebehind the globe in the Camera viewport.

4. In the Name and Color rollout, name thedummy Flare Dummy.

Add a flare effect:

You’ll now use Video Post to easily create an effectthat will add interest to your animation.

1. Choose Rendering menu > Video Post.

The Video Post dialog appears.

2. From the Video Post toolbar, click AddScene Event. In the View group, name the LabelCamera01. Click OK.

The animation will be created using theCamera01 viewport.

Page 50: 3Ds Max 2009 Special Effects

836 Chapter 8: Special Effects

3. Click Add Image Filter Event. . SelectLens Effects Flare from the drop-down list.Click OK.

For the Label, enter Flare Effect

4. Click Add Image Output Event. Enterwwdesigns with flare effect. Click theFiles button. For the output file name,enter wwdesigns0000.tga. In the TargaImage Control dialog turn on 24 bit in theBits-per-pixel option.

By naming the file with four zeros at the end ofthe name, the program knows that you wantto render an ordered sequence. Setting upyour work this way will let you render a highresolution still image sequence.

The Video Post now lists all the events you justcreated in a queue.

5. In the Video Post Queue, double-click FlareEffect. In the Edit Filter Event, click Setup.

You’ll now set some settings in the Lens EffectsFlare dialog that will create a bright star withrays behind the earth.

6. Click Preview.

A generic preview window displays a flareeffect.

You can change this to display your scene.

7. Click VP Queue to see the earth and the logotext.

Tip: If the logo text is behind the earth, move thetime slider in 3ds Max to a frame where the logotext is in front of the earth. Click Update in theLens Effects Flare dialog to update the preview.

8. In the Lens Flare Properties group, click NodeSource.

9. In the Select Flare Objects list, choose FlareDummy. Click OK.

Now that the dummy object is set as the source,you can now make changes to some settings.

10.To better see each effect, go to the Prefs paneland in the Render column, turn off all theeffects. Now turn each one separately and lookin the preview to see the effect by itself.

11.To create the appearance of a bright star in thebackground, turn on Rays and Star.

You’ll change a few settings to make the distantstar a little more noticeable.

12.Go to the Rays panel. Set these values:

• Size=450

• Angle=45

• Num=300

Click Update to see the changes.

If you cannot see any effects, move the Flaredummy object in the viewport and then clickUpdate in the preview window again until therays are in the desired location.

13.Go to the Stars panel. Set these values:

• Size=100

Page 51: 3Ds Max 2009 Special Effects

Adding a Flare Effect 837

• Sharp=10

Turn on Random. Click Update.

14.Turn on Glow on the Prefs panel.

You’re now ready to render your animation.Click OK to exit the dialog.

15. On the Video Post toolbar, click ExecuteSequence.

16.In the Time Output group, turn on Range.Enter 1 in the first field and 200 in the secondfield. In the Nth Frame field enter 2. ClickRender.

Video Post now renders every other frames ofyour animation and adds the effects you createdin a post-production video. Since you’veselected every second frame, the renderingwill go faster and the animation will play morequickly.

Depending on the speed of your computer,the rendering may take some time. While youwait, you can watch the animation progress inthe frame buffer window and in the Video Postrendering progress dialog.

17.In 3ds Max, go to Render menu > RAM Player.

The RAM player lets you load high resolutionstill image sequences into memory and playthem back.

18.On the RAM player toolbar, click OpenChannel A. Navigate to the image sequenceyou rendered, and select the filename of the 1stimage. At the bottom of the dialog, turn onSequence, then Open.

The files load into the RAM Player.

19.When the files are loaded, play the animationusing the Play controls on the RAM playertoolbar.

Once the files are loaded into the RAM player,you can save them out as a movie file. ChooseSave Channel A, and then select the file typeand file name you want.

Summary

In this tutorial, you have created a flying logo. Youhave created a globe using primitive objects andtexture maps. You have created and animated textto develop the logo treatment, and added goldmetal material and spotlights for dramatic effect.You have added atmospheric and volume lighteffects, as well as a lens flare using Video Post.Finally you have rendered your animation to a stillimage sequence and assembled it into a movieusing the RAM player.

Page 52: 3Ds Max 2009 Special Effects

838 Chapter 8: Special Effects

Introduction to reactor

This tutorial will lead you through the process ofcreating a physically based animation using thereactor dynamics functionality built into 3ds Max.

There are many situations in animation wherehand animating and creating keyframes forobjects can be completely replaced; or at the veryleast, augmented, by using keyframes createdautomatically using physical techniques. Forinstance, imagine trying to hand-animate athousand balls being poured out of a bucket; youwould need to make sure that no two objectspassed through each other during the simulation,and that they behaved realistically when collidingwith each other and the environment. Withreactor, however, you can produce the sameanimation by just creating a bucket and a thousandspheres, providing each object with physicalproperties such as mass. Once you have set upthe objects’ positions, the rest is calculated for youautomatically.

In this tutorial, you will use the reactorfunctionality to create a toy with a low center ofgravity. You will then create copies of the toy, anduse the Preview Window to add them to a toybox and update the objects’ positions in 3ds Max.Next, you will hand-animate the box turningover. The dynamics functionality will solve the

animation for the toys, taking into account thehand-animated box; the toys will react to the box’smotion 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.

• Creating fractures with reactor

Tutorial Files

All the files necessary for this tutorialare provided on the program disc in the\tutorials\reactor\introduction directory. Beforestarting the tutorials, copy the \tutorials folderfrom the disc to your local program installation.

Rigid Bodies Make the World GoRound

The objects in a reactor physical simulation; inthis example, the toys, the toy box, and the floor,are known as rigid bodies. These are the buildingblocks of physical scenes, and can be made upof one or more geometries. You can use anygeometry to create a rigid body.

In this section, you will create two simple primitiveobjects that can be used as rigid bodies, and assignthem some physical properties.

Create a rigid body:

1. Start with a new scene.

2. On the Create panel, click Sphere.

Page 53: 3Ds Max 2009 Special Effects

Getting Collective 839

3. In the Perspective viewport, drag to create asphere. On the Create panel, set the radius to25.0.

4. On the Create panel, click Box.

5. Drag in a viewport to create a box beneath thesphere. On the Create panel, set the Length andWidth values to 200.0 and set Height to 5.0.

Note: Move the box downward to make sure it isnot touching the sphere.

Now you need to give your sphere somephysical properties.

6. Select the sphere, and on the reactor toolbar,

click Open Property Editor .

If the reactor toolbar isn’t visible, right-clickan empty area of the main toolbar, and choosereactor from the context menu.

You haven’t assigned any physical propertiesto the sphere yet, so the dialog displays defaultvalues.

Note: If you don’t have an object selected inthe scene, or if you select an item that cannotbe used as a rigid body (such as a rigid bodycollection), the dialog controls are unavailable.

7. Look at the editor’s Physical Properties rollout.

The default value for Mass is 0.0, which meansthat the rigid body is fixed in space duringthe simulation. However, in this example, thesphere is going to drop onto the box, whichwill act as the floor in your simulation. Forthis reason, you need to give the sphere a massvalue.

8. Set the Mass to 50.0.

If you do not specify any physical propertiesfor an object, it automatically uses the defaultrigid-body properties when simulated. Youdon’t want the box to move in this example,so the default properties are sufficient for thisobject. It uses the default Mass value of 0.0, andis therefore fixed in space.

You now have two objects with physical properties.However, your scene is not yet valid for simulation.You must add the objects explicitly to thesimulation using a Rigid Body Collection.

Getting Collective

If you have a valid rigid body and want to use itin a simulation, you need to add it to a rigid bodycollection. At the start of the simulation, reactorexamines the scene for all enabled rigid bodycollections. It then takes the rigid bodies from thecollections and adds them to the simulation. Inthis example, you will create a collection and addthe sphere and box to it in order to add them tothe simulation.

Page 54: 3Ds Max 2009 Special Effects

840 Chapter 8: Special Effects

Continue using your scene from the previouslesson, or open reactor_intro_1.max from\tutorials\reactor\introduction.

Create and add objects to a rigid body collection:

1. Make sure no objects are selected, and then,on the reactor toolbar, click Create Rigid Body

Collection .

A Rigid Body (RB) Collection is a helper objectthat reactor uses to keep track of the rigidbodies in your scene. It doesn’t show up inrenderings, and its position has no effect onyour scene.

2. Click any viewport to add the collection to yourscene.

Note: The icon’s position has no effect on thesimulation.

3. On the Modify panel, in the RB CollectionProperties rollout, click Pick, and then selectthe box in a viewport.

This adds the box to the rigid body collection.

You can also add objects to the collection withthe Add button, as in the following step.

4. Click Add. This opens a standard selectiondialog that contains a list of the remainingavailable rigid bodies in the scene.

Tip: To remove a rigid body from the collection,highlight it in the Rigid Bodies list and thenclick Delete.

5. From the list, choose the sphere, and then clickSelect to close the dialog and add the sphereto the collection.

Tip: A useful shortcut for creating an RBCollection is to select the objects before youcreate the collection. If you select severalobjects and click Create Rigid Body Collection,an RB Collection is created which alreadycontains the selected objects.

The Basics of Simulation

Now that you have a valid scene for simulation,you can try simulating it. reactor provides twomethods for simulating animation:

• The reactor preview window displays yoursimulation using OpenGL or DirectX. You canexamine your objects’ physical behavior in thewindow, see how they interact, and even usethe mouse to interact with the scene. You canuse this window to update the rigid bodies’states in 3ds Max at any time during simulation,which means that it acts as an interactive scenemodeler.

• Alternatively, use keyframe creation. You definean animation range, and reactor creates andsimulates the physical world across that range,passing the rigid bodies’ states back to 3ds Maxas keyframes.

Continue using your scene from the previouslesson, or open reactor_intro_2.max fromtutorials\reactor\introduction.

Examine your scene in the preview window:

1. Go to the Utilities panel, click the reactorbutton, and, on the About rollout, make sureChoose Solver is set to Havok 1.

2. On the reactor toolbar, click PreviewAnimation.

This opens your scene in a preview window. Bydefault, your scene is initially displayed fromthe Perspective view. You can use the left mousebutton to rotate the camera, the middle buttonto pan, and the scroll wheel to zoom.

3. To start your simulation, open the Simulationmenu in the preview window and choosePlay/Pause, or press P on your keyboard. Yoursimulation start and the sphere will fall ontothe box.

Page 55: 3Ds Max 2009 Special Effects

Geometry Types 841

You can use your right mouse button to dragthe sphere around the scene. However, youcannot move the box, because it has no mass.

Tip: To reset the simulation, press R .

4. When you’re finished exploring yoursimulation, return to 3ds Max by closing thepreview window.

Create physically-based keyframes:

Next, you will create keyframes for the objects’interaction. A sphere falling onto a level surfaceisn’t very interesting, so first you will tilt the box sothe sphere will roll along its surface.

1. In the Left viewport, select the box androtate it clockwise about 30 degrees, beingcareful not to let it touch the sphere.

2. On the reactor toolbar, click CreateAnimation. A Reactor dialog appears, askingyou to confirm the choice. Click OK tocontinue.

This creates a simulation and runs it for thelength of time between the Start Frame and EndFrame values set on the track bar. The defaultvalues for these are 0 and 100, respectively; youwill change these values later in the tutorial.

reactor creates keyframes for the positions andorientations of your rigid bodies for each ofthose 100 frames.

3. Click Play Animation to watch theanimation in the viewport. You should see yoursphere falling onto the box and rolling downover the edge of it.

4. At frame 0, select the sphere if necessary, andthen Alt +click the sphere and, from thequad menu > Set quad, choose Delete SelectedAnimation.

The sphere’s keys on the track bar go away.

Geometry Types

Simulation Geometry is the second rollout in theRigid Body Properties dialog; it deals with howobjects are represented in the physical simulation.

In reactor, a convex object is one that has noholes or concavities in its surface. For instance, aping-pong ball is convex, but a golf ball is concave.Convex objects are much easier to simulatethan concave objects. For this reason, when yousimulate an object, it is treated as if it was convexby default, even if the 3ds Max object is concave.To do this, reactor uses a special algorithm tocreate 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’smesh, and is represented by the Mesh Convex Hulloption on the Simulation Geometry rollout of theRigid Body Properties dialog.

However, there are times where you will want tosimulate the exact mesh of an object, concavitiesand all. You specify this using the Concave Meshoption.

In this section of the tutorial, you will specifythat you want to simulate your sphere as an exactsphere. This means that the sphere’s geometry isnot simulated; instead, a mathematical sphere is

Page 56: 3Ds Max 2009 Special Effects

842 Chapter 8: Special Effects

used for simulation. This is not only faster, butalso more accurate (the object will roll perfectlysmoothly) and less memory-intensive than asimulation based on a geometry-based sphere.

Continue using your scene from the previouslesson, or open reactor_intro_3.max from\tutorials\reactor\introduction.

Change the simulation geometry for the sphere:

1. Select the sphere.

2. Open the Rigid Body Properties dialog .

3. In the Simulation Geometry rollout, chooseBounding Sphere.

4. Click Create Animation to regeneratethe keyframes for the simulation.

The sphere rolls more smoothly, though thismight not be immediately apparent if yoursphere is highly tessellated.

5. At frame 0, select the sphere if necessary, andthen Alt +click the sphere and, from thequad menu > Set quad, choose Delete SelectedAnimation.

The sphere’s keys on the track bar go away.

Geometry Simulation

In this lesson, you’ll continue making a toy. Theexisting sphere acts as the toy’s body. The nextstep is to create a cylinder to act as the toy’s arms.You’ll also create a duplicate of this cylinder andreduce its tessellation. You’ll use this simplifiedversion, which is easier and faster to simulate,as the simulation geometry for the first, morecomplex cylinder. This technique is known asusing proxy geometry.

Note: If you were to make 20 copies of the firstcylinder and add them to your simulation, theywould all use the simplified, duplicate cylinder astheir simulation geometry. This means you’d needonly one instance of the cylinder geometry for thephysical simulation, thus reducing memory usageand increasing simulation speed.

Note: Continue using your scene from the previouslesson, or open reactor_intro_4.max from\tutorials\reactor.

Create a simplified version of an object forsimulation:

1. Create a cylinder in the Left viewport, andposition it above your sphere.

Make sure that the cylinder and sphere don’ttouch each other.

2. On the Modify panel, set the following valuesfor the cylinder: Radius=6.0, Height=70.0, andmake sure Sides is set to 18 (the default).

Page 57: 3Ds Max 2009 Special Effects

Building Up a Rigid Body 843

3. With the cylinder still selected, choose Edit >Clone. On the Clone Options dialog, chooseCopy and click OK.

You’ll use this copy of the cylinder as the proxygeometry.

4. On the Modify panel, reduce the number ofsides of the new cylinder to 12 and then moveit 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 Geometryproperty to Proxy Convex Hull.

This means that the cylinder will use the convexhull created from another object’s geometry asits physical representation.

The Proxy button at the bottom of the rolloutbecomes available.

8. On the Simulation Geometry rollout, clickthe Proxy button, and then select the clonedcylinder in one of the viewports.

The button now displays the name of yourchosen proxy object.

Tip: You can now hide your proxy cylinderto keep it out of the way by selecting it,

right-clicking and choosing Hide Selectionfrom the Display quadrant of the quad menu.

9. Select the RBCollection helper object in yourscene, and add the original cylinder to it.

10. On the reactor toolbar, click PreviewAnimation and then play the animation.

The cylinder doesn’t roll as smoothly as itsdisplay would suggest.

11.In the preview window, choose Display >Sim Edges to display edges for the objects’simulation geometries.

The cylinder’s simulation geometry is coarserthan its display body.

Building Up a Rigid Body

A rigid body can comprise more than one object,or primitive. A rigid body with more than oneprimitive is known as a compound rigid body.

As stated previously, concave objects (objects withholes or dips in the surface or geometry) are moredifficult to simulate than convex objects. For thisreason, a compound rigid body made up of severalconvex objects can be simulated much faster thana single concave object. A good example of this is a

Page 58: 3Ds Max 2009 Special Effects

844 Chapter 8: Special Effects

picture frame, where simulating a concave pictureframe would be slow, but simulating a group offour convex boxes representing the frame sideswould not.

In this lesson, you will combine the two non-fixedrigid bodies in your scene (the sphere andcylinder) to create a single rigid body. In doingso, you will see the differences between primitiveproperties and rigid body properties. Eachprimitive in a rigid body can have a separate massand simulation geometry, while friction, elasticity,and display body properties are applied to theentire rigid body.

To create your compound rigid body, you willneed to select the objects and group them usingthe group functionality in 3ds Max. This groupcan be added to the rigid body collection as a newrigid body.

Continue using the scene from the previouslesson, or open reactor_intro_5.max from\tutorials\reactor\introduction.

Create a compound rigid body:

1. Select the cylinder and move it down into thesphere, so that it resembles a pair of arms.

Relocated cylinder as seen in the Front viewport

2. Hold down Ctrl and select the sphere, addingit to your selection set.

The cylinder and sphere should be the onlyselected objects.

3. Choose Group menu > Group.

Use the Group dialog to name the new grouptoy_body. Click OK to continue.

4. Select the RB Collection helper object, and addyour new group to the collection.

5. Click Preview Animation to watch thesimulation.

You should get an error saying that the sphereand cylinder can no longer be rigid bodies.This is because they are being used as part of anactive compound rigid body, so you will needto remove them as single objects from the rigidbody collection.

6. On the RB Collection Properties rollout of theModify panel, hold down Ctrl and select thesphere and the cylinder, and then click Delete.

7. Click Preview Animation and watch thesimulation.

Now you can see that the sphere and cylinderact as parts of the same object.

Page 59: 3Ds Max 2009 Special Effects

Making It Wobbly 845

Making It Wobbly

The toy you are going to make will have anon-uniform mass distribution, which, in thiscase, means that most of its mass will be centeredabout its base. This will have the effect that the toywill not roll or fall over, but will try to right itself,and will wobble around. This behavior is possiblebecause the primitives in a compound rigid bodycan have different masses. All you have to do isadd a small, heavy object inside the bottom of thetoy and most of its mass will reside there.

Continue using the scene from the previouslesson, or open reactor_intro_6.max from\tutorials\reactor.

Complete the toy:

1. First, complete the toy’s geometry. Create atorus for its waistband, a sphere for the head,two small spheres for eyes, and one for the nose.

Front view of completed toy geometry

2. Select the three spheres used for the eyes andnose and open the Rigid Body Properties dialog

.

3. Set the simulation geometry to Bounding Box.

Since these spheres won’t play a large part in thesimulation, you can treat them as very simplegeometry to speed up the simulation.

4. Select the head of the toy and set its simulationgeometry to Bounding Sphere.

You can keep the torus’s simulation geometryas Mesh Convex Hull, or you could create acopy and simplify it as a proxy, as you did withthe cylinder.

5. Once you have finished creating and arrangingthese objects, add them to the toy_body group.For each object, select the object, choose Groupmenu > Attach, and then click toy_body.

Change the mass distribution for a rigid body:

1. Select the toy_body group and choose Groupmenu > Open.

Page 60: 3Ds Max 2009 Special Effects

846 Chapter 8: Special Effects

This allows you to select the individualprimitives within the group to edit their rigidbody properties.

2. Change the mass of each object in the group(except the body and arms, which already havemass values) to 1.0.

Tip: You can do this quickly by selecting all ofthe objects in the group, and setting the Mass to1.0 on the Rigid Body Properties dialog.

You do this because you are going to add a heavyobject to the group, and it is this mass that youreally want to affect the object’s motion.

3. Click Preview Animation and you willsee that all of the new objects have been addedto the compound rigid body.

The toy should fall, though it won’t yet havethe correct behavior. If the object doesn’t fall,you might not have given a mass to all of theobjects in the rigid body and, as a result, oneof the primitives is fixed. To fix this, close thepreview window and check the mass of each ofthe objects in the group.

4. Add a small box (Height, Width, andLength=3.0) inside the body sphere and nearthe bottom of the object.

5. On the Rigid Body Properties dialog,give the box a mass of 300.0.

6. Select a component of the group and chooseGroup menu > Close to close the group.

7. Select the small box, choose Group menu >Attach, and then click toy_body to add the boxto the group.

8. Click Preview Animation and examinethe behavior of the toy.

Page 61: 3Ds Max 2009 Special Effects

Looking at Things Differently 847

The toy slides down the box and tips over asbefore, but it tilts backward as though to rightitself. The high mass in the box at the base ofthe toy has lowered the group’s center of gravity.

Save your file as my_reactor_intro.max, andexperiment with flattening out the plane andscaling it up.

Looking at Things Differently

reactor allows you to use display proxies forobjects; this means that a rigid body canhave a different display body for use in thepreview window. This improves the window’sperformance, especially when you are simulatingmore than one object with the same display body.If you have a lot of objects that all look the same,then your display only needs to keep track of oneinstance of the display body when display proxiesare used. As a bonus, you increase simulationsetup speed, because you create only one instanceof the display body.

In this lesson you’ll create a display proxy for thetoy. This is so that when you create copies of the

toy later in the tutorial, your setup and displayspeed won’t be adversely affected.

Continue using the scene from the previouslesson, 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 thegroup in the viewport.

Move the copy away from the other objects.

2. A display proxy must be a single mesh. Tocreate this, first ungroup the toy copy byselecting the new group and choosing Groupmenu > Ungroup. Then select the copy’s mainbody sphere.

3. Right-click the sphere. In the Transformquadrant of the quad menu, choose Convert To> Convert To Editable Mesh.

4. In the Edit Geometry rollout of the Modifypanel, click Attach List.

5. Use the Attach List dialog to select the rest ofthe objects that were part of the group, and thenclick Attach.

You now have a single mesh representing thetoy that you can use as a display proxy.

Tip: It is a good idea to label models in yourscene clearly, especially when they looksimilar to one another. In this tutorial, forexample, you could rename your proxy objecttoy_body_proxy.

6. Select your original toy_body group andchoose Group menu > Open.

7. Select the group parent, which is the pink boxsurrounding the grouped objects.

You need to select the group parent rather thanany of the toy’s constituent objects, becausethe group parent represents the rigid body anddisplay proxies are applied to rigid bodies, notprimitives.

Page 62: 3Ds Max 2009 Special Effects

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 selectthe single-mesh version of your toy in one ofthe viewports.

The button displays the name of your proxy object, inthis case toy_body_proxy.

You have now assigned an alternative displaybody to your compound rigid body.

10.Hide the proxy object: Select the single-meshtoy, right-click, and from the Display quadrantof the quad menu choose Hide Selection.

This will keep it out of your way.

11. Select a component of the group, andchoose Group menu > Close, then click PreviewAnimation.

Your toy will use the new mesh as its displayobject. If you make changes to the editablemesh, these will be displayed whenever you usethe preview window.

Simulation Accuracy

If strange artifacts show up in the objects’ motions,you probably need to increase the accuracy of yourphysical simulation. This can be done in one oftwo ways. You can change the accuracy externally,which affects the accuracy for both keyframecreation and the preview window, or you canalter it from within the preview window. In bothcases, changing the accuracy requires altering asimulation parameter called Substeps/Keyframe.You can edit this in the reactor rollouts on theUtilities panel or by using the Physics menu in thepreview window.

When the physics are being calculated, reactormoves the objects forward in small steps. Thesmaller the steps, the more accurate the simulation.However, you should note that the simulation willalso become slower as it becomes more accurate.The default accuracy value is 10 substeps perkeyframe, which means that reactor divides eachkeyframe interval into 10, and steps the simulationforward in intervals of this size. If you increase thesubsteps per keyframe value to 25, then the sizeof reactor ’s steps becomes one keyframe intervaldivided by 25.

Page 63: 3Ds Max 2009 Special Effects

Setting Up the Simulation 849

Note: You can continue using your file oryou can open reactor_intro_8.max from\tutorials\reactor\introduction.

Change the accuracy of your simulation:

1. On the Utilities panel, click the reactorbutton and expand the Preview & Animationrollout.

2. Change the Substeps/Key value from 10 to 25.

3. Click Preview Animation.

The simulation may run more slowly but will beless likely to be affected by sudden slowdowns.

Setting Up the Simulation

In this section you will create a toy box and 39copies of your toy. Using the preview window,you will drop the toy copies into your box, letthem settle, and then pass their positions back to3ds Max. As you will see, the preview window actsas an interactive modeling tool, allowing you torearrange objects physically and then use changesmade in the preview window to update 3ds Max.

Note: You can continue using your file oryou can open reactor_intro_9.max from\tutorials\reactor\introduction.

Create the toy box:

1. In your scene (away from the other objects),create five boxes with Length and Width=400.0,and Height=25.0.

2. Arrange the boxes to form a larger, hollow box.

3. In the Left viewport, rotate the sloping box20 degrees counterclockwise to flatten it outsomewhat. With the sloping box selected,increase both its Length and Width parametersto 600, and move it downward 240 units.

Page 64: 3Ds Max 2009 Special Effects

850 Chapter 8: Special Effects

4. Select and right-click the box used as the base ofthe toy box, and in the Transform quadrant ofthe quad menu, choose Convert To > ConvertTo Editable Mesh.

5. In the Edit Geometry rollout of the Modifypanel, click Attach List.

6. In the Attach List dialog, select the other fourboxes, which make up the sides of the toy box,and click Attach.

You now have a single mesh representing thetoy box.

7. Open the Rigid Body Properties dialogand set the Simulation Geometry property toConcave Mesh.

Update your scene from the preview window:

1. On the toolbar, click Select and Move.

2. Move the toy inside the box.

Note: Make sure that the toy is not touching thebox.

3. In a side viewport, Shift +Move the toy, andposition the first copy above the original.

Note: Make sure that the copy is not touchingthe original toy.

4. In the Clone Options dialog, set Number OfCopies=39 and click OK.

Page 65: 3Ds Max 2009 Special Effects

Using Hand-Animated Rigid Bodies 851

5. Select the RB Collection helper object and inthe Modify panel > RB Collection Propertiesrollout, click Add.

6. Select all of the new toy objects and the toy boxand click Select to add them to the rigid bodycollection.

7. Click Preview Animation and let the toysfall into the box and settle.

8. When the toys have settled in the box, from thePreview Window menu bar choose MAX menu> Update MAX.

9. Close the preview window and click in one ofthe viewports to update the display. The toyswill have been updated so that they have thepositions and rotations you updated in thepreview window.

Using Hand-Animated RigidBodies

Something that you will often want to do is touse hand-animated rigid bodies in a physicalsimulation. These rigid bodies are referred to asunyielding rigid bodies and have the Unyieldingproperty turned on in the Rigid Body Propertiesdialog. They behave as their keyframes dictateand other rigid bodies react to them. You do notneed to give them a mass. In this example, you willhand-animate your toy box so that it tips over andspills the toys out onto the floor.

Note: You can continue using your file oryou can open reactor_intro_10.max from\tutorials\reactor\introduction.

Page 66: 3Ds Max 2009 Special Effects

852 Chapter 8: Special Effects

Add hand-animated rigid bodies to a physicalsimulation:

1. Select the toy box.

2. Open the Rigid Body Properties dialog.On the Physical Properties rollout, turn onUnyielding.

3. Turn on Auto Key and move the timeslider to frame 60. Rotate the box clockwiseby about 125 degrees so that the objects willpour out when physically active. Turn off AutoKey. Be careful to move your floor below thefinal position of the toy box so that the two arenot interpenetrating. This would not generateerrors in simulation, but would look strange.

Note: Your toys may exhibit some strangebehavior when you are hand-animating thebox, but don’t be alarmed. This is because theobjects have not been keyframed yet. Theywill, however, behave correctly in the previewwindow.

4. Click Preview Animation.

Your box tips over and the toys pour out ontothe floor. You may want to increase the size ofyour floor so that the toys don’t all wobble overthe edge.

5. At this stage, you may want to tweak the physicalproperties of your objects. For instance, if yourobjects are piling up as they fall out of the box,you can reduce their friction and the frictionof the floor, so that they spread further aftercolliding with the floor and the other toys.

Note: Remember that to change the physicalproperties, you must open the group andchange the properties of the group helperobject. You can change the properties of morethan one object at a time.

Preparing Output

Now that you have your simulation behavingcorrectly, you need to create keyframes for theobjects’ motions. This can be done as before usingthe Create Animation button on the Toolbox.

In this example, you will create keyframes forthe first 100 frames of the motion, and thensimulate from frame 100 on. This shows how thereactor dynamics functionality can extract initialvelocities from the scene so that simulating fromframe 0 to 100 in one step is the same as simulatingfrom 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 oryou can open reactor_intro_11.max from\tutorials\reactor\introduction.

Page 67: 3Ds Max 2009 Special Effects

Reducing File Size 853

Extract initial velocities for rigid bodies:

1. On the reactor toolbar, click CreateAnimation.

Keyframes are created between frame 0 and 100for your rigid bodies’ motions.

2. On the Utilities panel click reactor, then onthe Preview & Animation rollout, set StartFrame=100 and End Frame=500.

3. Click Preview Animation.

You will see that the objects start simulationwith initial linear and angular velocities.

4. In the Time Controls, click TimeConfiguration.

5. In the Time Configuration dialog, set End Timeto 500.

6. Click Create Animation again.

Keyframes will be created from frame 100 to500. If you examine the keyframes behaviorin the viewport, you will see that the objects’motion is smooth as it passes over frame100, since the objects’ initial velocities wereextracted and used for simulation.

Reducing File Size

You now have keyframes for your objects’ motionthat can be used for creating animations or stillrenderings. However, each object currently has akeyframe for every frame. This means that yourfile size is quite large; it will also be quite difficultto tweak an object’s behavior after the simulation.

reactor provides access to a reduction process thatattempts to remove redundant keyframes for therigid bodies. You can provide a threshold value forthe algorithm that guarantees that the motion ofthe objects after this reduction will be within that

factor of their original value. In this section, youwill reduce the keyframes for your rigid bodies.

Note: You can continue using your file oryou can open reactor_intro_12.max from\tutorials\reactor\introduction.

Remove redundant keyframes after simulation:

1. On the Utilities panel > click reactor andexpand the Preview and Animation rollout.

2. In the Preview and Animation rollout, set StartFrame to 0 and End Frame to 100.

3. On the Utilities panel, expand the Utils rollout.In the Key Management group, click ReduceNow.

This reduces the keyframes for all active rigidbodies in the simulation. For this example, usethe default threshold value of 0.5.

4. Look at the animation again. As you can see,the behavior of the rigid bodies in your scene isalmost exactly the same as before the reductionprocess, but the number of keyframes for eachtoy is greatly reduced. The motion of the toysis still quite complex, but the file size has beenreduced about 30%.

5. Save your scene as my_reactor_intro_final.max.If you like, you can compare your results withthe saved file reactor_intro_final.max. Aboutmidway through your animation, your sceneshould look something like the followingillustration.

Page 68: 3Ds Max 2009 Special Effects

854 Chapter 8: Special Effects

Summary

In this tutorial, you have learned the basics ofusing reactor to create complex animations:

1. Using the Rigid Body Properties dialog to setproperties for objects in your animation.

2. Using an RB Collection object to control theanimation.

3. Previewing the animation, and converting theanimation into 3ds Max keyframes.

Rag Doll Tutorial

Rag Doll Tutorial

In this tutorial, you will add constraints to apredesigned character model to create a fullysimulated rag doll using reactor. The tutorial usestwo different constraint types to achieve realisticrag doll motion: Hinge and Ragdoll constraints.Each type is presented individually, with theworkflow and typical use case for each constraint.

The scene is a simplified room, containing a setof stairs for your rag doll to fall down, and a floor

on which it’ll come to rest. The focus of thistutorial is rag doll character creation, so we’veprovided the completed scene with one catch: Thecharacter lacks any physical properties, and, mostimportantly, it has no constraints! Without thesefeatures the character has no physical presence inthe scene, and will not react with the other objects.

As you proceed through this tutorial you will learnwhat constraints are, how to use them and howto tweak their parameters to adjust the rag doll’sreactions. After this it is up to you to decide how tobest use all those rag dolls, whether it be for fallingdown staircases, tumbling over banisters or simplybeing caught in explosions. It’s up to you!

Skill Level: Intermediate

Time to complete: 2–3 hours

Features Covered in this Tutorial

In these lessons you will learn:

• Setting physical properties for the bones.

• Viewing gravity and other simulationparameters.

• Creating a Rigid Body Collection.

• Previewing the animation.

• Using constraints to hold the character together.

• Using Hinge constraints for knees, elbows andwrists.

• Disabling collisions.

Page 69: 3Ds Max 2009 Special Effects

Setting Up the Rag-Doll Scene 855

• Using Ragdoll constraints for hips andshoulders, back and neck.

Tutorial Files

All the files necessary for this tutorialare provided on the program disc in the\tutorials\reactor\ragdoll directory. Beforestarting the tutorials, copy the \tutorials folderfrom the disc to your local program installation.

Setting Up the Rag-Doll Scene

In this lesson, you set up the scene by opening a3ds Max file.

Open the sample file:

• Choose File menu > Open and opencharacter.max from \tutorials\reactor\ragdoll.

You are presented with a simple scenecontaining some stairs, a floor and a charactermodel.

At the moment none of the objects in this scenehave any physical properties associated withthem; this is what you’ll be adding over thecourse of the tutorial. reactor essentially addsphysicality to scenes. To properly simulatedynamics, objects must have real-worldproperties such as mass and friction assigned.By adding these things to your scene, you can

create a simulation that mirrors your everydayexperiences, or if you’d prefer, an alien worldwith gravity pointing to the right!

Making Objects Physical

The character model you are working with may bethought of as 18 individual pieces: 17 which arebones and an eighteenth, which is the skin thatenvelopes them. As far as reactor is concerned,the skin plays no part in the physical simulationof the scene; it is simply an aesthetic feature inthat it presents a more realistic human look thanthe underlying bones. Only the bones themselvesare simulated and they feedback new coordinateinformation to the skin so that it may properlydeform to keep the bones wrapped up.

With this in mind the first thing you must do isgive each of the bones a value for its mass.

Set physical properties for the bones:

1. On the toolbar, click Select By Name, oralternatively, press H .

You will now be presented with a complete listof all the objects in the scene.

2. In the Select Objects dialog, turn on DisplaySubtree.

Page 70: 3Ds Max 2009 Special Effects

856 Chapter 8: Special Effects

As you can see, all of the bones are named sothat their position in the body is apparent;LCalf, RFoot, Head, etc.

3. Select all the bones and click Select.

4. On the Utilities panel, click reactor andopen the Properties rollout.

5. Assign a value of 10.0 kilograms to theselection, meaning that, in total, the characterweighs 170 kg. Although doing this yields a

nice final result, if you’d like to add greaterrealism to the simulation you should try to givethe different components a comparable valueto their real life equivalents, keeping the ratioof masses relative. For example, your forearmshould not have the same mass as your thigh!

For this tutorial, accept the default values of 0.3for Friction and Elasticity. However, feel free totweak their values and see the results. Elasticitycontrols how bouncy the object appears to be; agreater value leads to a bouncier feel. Frictioncontrols how easy it is to slide the object acrossa given surface in the scene; larger values leadto increased resistance.

Next, you will give the background objects (thesteps of the staircase and the floor) a physicalpresence in the scene.

6. Select the steps and the floor in the scene.

7. On the Utilities panel > Propertiesrollout, set Mass to 0.0.

This seems like a strange mass for theseobjects. However, reactor treats all objectswith a mass of zero as fixed in place; underno circumstances are they allowed to move.Since you don’t want the steps or the floor tosuddenly drop into the void under the influenceof gravity, you give them a mass of zero to tellreactor that they are immovable.

As you may have noticed, the default massassigned 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 andopen the Havok 1 World rollout

Page 71: 3Ds Max 2009 Special Effects

Making Objects Physical 857

The three values in the World rollout > Gravityarea control the gravity in your world (scene).The X, Y and Z components together form thedirection vector that represents gravity. Sincegravity usually points downward, only the Zcomponent has a non-zero value, by default.But where does the rather strange lookingvalue of -386.22 come from? The minus signsimply indicates that the gravity should beapplied downwards, and the value is arrived atas follows: In the real word, gravity acceleratesobjects towards the earth at around 9.8 m/severy second. If you look down at the nextvalue in the World rollout, you’ll see that 1mis equal to 39.37 3ds Max units (inches), soif you roughly convert gravity from meters to3ds Max units, you get the 386.22 3ds Max unitsyou see above.

2. Choose Customize menu > Units Setup andswitch the Display Unit Scale to Metric.

Notice that the values in the Havok 1 Worldrollout are updated accordingly:

If you give values to the X and Y componentsof Gravity, you can create bizarre scenes wherecharacters fly towards the walls or even theceiling! In this lesson, you will be simulating a’normal’ environment, so there is no need tochange it.

Page 72: 3Ds Max 2009 Special Effects

858 Chapter 8: Special Effects

The final step before you can simulate your sceneis to add your objects to a rigid body collection.

Add the objects to a rigid body collection:

1. In the Create panel, click Helpers andselect reactor from the dropdown list.

The Object Type rollout should now containreactor object types.

2. On the Create panel > Object Type rollout, clickRBCollection, then click in one of the viewportsto create a rigid body collection helper object.

The position of the helper object is of nosignificance to the scene. You should seesomething similar to the following image in theviewport:

At the moment, there are no objects in thecollection.

3. On the Modify panel > RB CollectionProperties rollout, click Add.

4. In the Select Rigid Bodies dialog, select all ofthe scene objects except skin and click Select.

The RB Collection Properties list should nowlook something like this:

Page 73: 3Ds Max 2009 Special Effects

Attaching Limbs Together 859

You’re now ready to simulate the rag dollscene. Before you do, save your work asmy_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 andexpand the Preview & Animation rollout, thenclick Preview in Window.

You are informed that several of the bodiesare interpenetrating, however you maysafely ignore this for the moment by clickingContinue. The reactor preview window popsup and you are be presented with the followingscene:

3. Press P to start the simulation.

The bones are not yet connected, and thus,fall apart when they hit the stairs. In the nextlesson, you will attach the limbs.

Attaching Limbs Together

In the previous lesson, the character literally fell topieces once he hit the stairs. In the current scene,each bone is essentially an independent object andis in no way linked with the other bones in thebody. There is nothing to stop the individual bonesfrom going their own way. In this lesson, you willuse Constraints to hold the character together.

Constraints are used to connect one object toanother. All constraints are represented in 3ds Maxby helper objects.

View all available reactor helpers:

• On the Create panel, click Helpers, andselect reactor from the drop-down list.

Page 74: 3Ds Max 2009 Special Effects

860 Chapter 8: Special Effects

Among the reactor objects you’ll see some ofthe available constraint types; from Hingeconstraints to Prismatic constraints, there areconstraint types to reproduce pretty much anybehavior you would like to see in your scene.In the next lesson, you will concentrate on theHinge and Rag Doll constraints, as these arethe two you will be using to piece together thecharacter.

Using Hinge Constraints

The first constraint you’ll be using is known as ahinge constraint which, as you might guess fromthe name, behaves like a hinge. A simple, everydayexample of this kind of constraint is a door. A doorcan only swing around the points at which it isattached to the frame; you can think of this as theaxis around which the door rotates. It can’t rotatearound the other two axes, because the connectionpoints to the frame prevent it from doing so.

In fact, the door is actually a special type of hingeconstraint in that it is a limited hinge constraint.

This means that although it can rotate around thehinge axis, it can do so only until it bumps in thewall of the car. In reality, it cannot swing a full360 degrees: The constraint’s range of motion islimited (to 120 degrees, for example).

Furthermore, the hinges that connect the doorto the frame can take only a measured amountof stress before giving way (think of hitting thedoor with a rather large sledge hammer). Sinceyou can break the constraint, you would call thisa breakable hinge constraint, or more precisely abreakable limited hinge constraint. The good newsis that reactor can simulate all of these features,giving you free rein over the movement and thestresses and strains that the constraints in youscene can undergo.

Add a hinge constraint

1. On the Create panel, click Helpers, andchoose reactor from the dropdown list.

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

The Properties rollout displays.

Page 75: 3Ds Max 2009 Special Effects

Setting Up Knees, Elbows, Ankles and Wrists 861

As you can see, Hinge has quite a fewparameters, but the only ones that you will beconcerned with for this tutorial are the Parent,Child, and Limited settings. You use the Parentand Child controls to specify the objects inyour scene that serve as the two components ofthe constraint; for example: the upper arm and

forearm. The Limited group parameters let youcontrol the extents of the hinge’s motion.

Setting Up Knees, Elbows, Anklesand WristsOpen the sample file:

• You can continue from where you leftoff, or choose File menu > Open andload the character01.max from the\tutorials\reactor\ragdoll directory.

Using a constraint is similar to the Rigid BodyCollection, but this time you add a ConstraintSolver to the scene. Next you can begin to addvarious constraint types to your objects and thenadd them to this solver. The solver, in essence,figures out how best to keep all of your objectshappy under the conditions they’ve been given(body A connected to body B, body B connectedto body C, etc.).

Add a Constraint Solver to the scene:

1. On the Create panel, click Helpers andchoose 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 aConstraint Solver.

Note: The location of the helper object is notimportant.

Page 76: 3Ds Max 2009 Special Effects

862 Chapter 8: Special Effects

Note: The Constraint Solver works only if all theconstraints act upon rigid bodies that belong tothe same Rigid Body Collection.

Next, you’ll specify the collection to which toapply the Constraint Solver.

4. With the solver selected, open the Modifypanel > Properties rollout, and click the buttonlabeled None, below RB Collection.

5. Press H and choose RBCollection01from the Pick Object dialog.

Now you’re ready to start connecting bonestogether, and soon will have your rag doll tumblingdown the stairs. You’ll use the Hinge constraint toconnect the various bones in the character, firstjoining the right foot and calf bones to simulatean ankle.

Create Hinge constraints for the ankles:

1. On the Create panel > Object Type rollout,click Hinge.

2. Click anywhere in a viewport to create a Hingeconstraint.

Next you’ll choose the objects to which toassign to this constraint.

3. In the Modify panel > Properties rollout, clickthe button labeled None, next to Child.

4. Press H and choose RFoot in the PickObject dialog, then click Pick

The Child button should now read RFoot.

5. On the Modify panel > Properties rollout, turnon the Parent check box.

This indicates that you want to constrain twoobjects together, rather than one object to theworld.

6. Click the button labeled None, next to Parent.

7. Press H , choose RCalf from the PickObjects dialog, and then click Pick

The button beside Parent should now readRCalf and the scene should look like this:

Page 77: 3Ds Max 2009 Special Effects

Setting Up Knees, Elbows, Ankles and Wrists 863

In its current state, the character’s foot is free torotate 360 degrees around the hinge constraint,which as you can imagine would be prettypainful! You need to use the Limited propertyfor this hinge constraint.

8. On the Properties rollout, turn on Limited.

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

10.Repeat this process for the left foot and calfbones.

Create Hinge constraints for the knees, elbows andwrists:

• The process for setting up the hinge constraintfor each of the other bone pairs is identical,with only the constraint limits differing. Withthis in mind use this list to set the constraintparameters for each joint:

When you’re done, the scene should look likethis:

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

Page 78: 3Ds Max 2009 Special Effects

864 Chapter 8: Special Effects

You’ll simulate the other bones using Rag DollConstraints, as their motion is more sophisticated.The last thing you have to do is to add all of theconstraints to the Constraint Solver.

Add the Hinge constraints to the Constraint Solver:

1. Press H , and on the Object Selectdialog, choose CSolver01 and click Select.

2. On the Modify panel > Properties rollout,click Add.

3. On the dialog, highlight all of the hinges andclick Select

The CSolver Properties rollout should nowlook like this:

Next you’ll preview the scene again to see just howthese alterations have affected the character.

• On the Utility panel, click reactor, andthen on the Preview & Animation rollout, clickthe Preview in Window.

You might have noticed during the last preview thatreactor complained that some of the rigid bodiesin the scene were interpenetrating. Although youignored this warning on that occasion, it’s not agood idea to do in general. Later in this tutorial,you will take care of this issue, but for now clickContinue and view the preview.

The first thing that stands out is that the bonesconnected with hinge constraints stay together.This is exactly as planned, but notice that theycontinue bouncing and dancing about once they

Page 79: 3Ds Max 2009 Special Effects

Setting Up Knees, Elbows, Ankles and Wrists 865

hit the floor. This is because reactor notices thatthe bones are interpenetrating with one anotherand tries to separate them. However, at the sametime, the Constraint Solver is trying to keep themtogether. Since they are essentially battling withone another over the position of the various bonesthey continue to bounce about erratically. Thesolution to this is to tell reactor not to worry aboutinterpenetrations between the bones that you’veconnected.

Disable collisions between the limbs:

1. On the Utility panel > reactor >Collisions rollout > Global Collisions group,click Define Collision Pairs.

You are presented with the following dialog:

There are three columns: one for all theentities (objects) in the scene, one for enabledcollisions, and one for disabled collisions. Bydefault, all collisions are enabled between allobjects so you need to tell reactor to ignore thecollisions between the bones in your character.You want to ignore only bone-to-bonecollisions, though. If, for example, you choseto ignore the collision between the character’sfoot bone and the floor object, the character’sfoot would pass straight through the floorunimpeded.

2. Select all of (and only) the bone objects in thefirst column.

This displays a list of enabled collisions in thesecond column.

3. Click the >> button

All of the collision pairs between the selectedbodies move to the third column (disabledcollision pairs).

4. Click OK to accept the changes.

Note: Instead of disabling all collisions betweenall limbs, you could instead disable collisionsbetween adjoining limbs. In order to do so, you

Page 80: 3Ds Max 2009 Special Effects

866 Chapter 8: Special Effects

would start with all collisions enabled, selecteach adjoining pair (LHand and LForeArm,Spine3 and Head, etc..) and click ">>" todisable just those pairs.

Preview the animation with collisions disabled:

1. On the Utilities panel > reactor >Preview & Animation rollout, click Preview inWindow.

The Preview window should open this timewithout any warnings and everything shouldbehave as expected (no bouncing limbs).

2. Save your work again, this time asmy_character02.max

Using Rag Doll Constraints

In the previous lesson, you finished joining up thesimpler bones in the body. Now it’s time to thinkabout how to simulate joints such as the hips orshoulders. These joints are more complex than theknees or elbow, as they need to allow for rotationand they have a range of motion of greater freedomthan the hinge constraint provides. To tackle thesetypes of joints you will use Rag Doll constraints.

These are fairly complex, so this lesson will serveas a brief overview. The following is a picture oftwo objects connected by a Rag Doll constraint:

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis (outward)

1. Parent Body

2. Child Body

The Rag Doll constraint provides three axes ofimportance: the Twist Axis, the Plane Axis, andthe Twist x Plane Axis. The twist axis is probablythe easiest to visualize and you can do so by simplystretching out your arm and rotating it so thatyour thumb changes from pointing upwards todownwards. Your movement is just a series ofrotations along the twist axis of the shoulder andelbow. In general, the twist axis should follow thelength of the child body in a joint. In reactor youcan specify how far on either side of neutral theconstraint can twist; this need not be symmetric.

Page 81: 3Ds Max 2009 Special Effects

Using Rag Doll Constraints 867

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis (outward)

1. Twist Min.

2. Twist Max.

3. Twist Range

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis (outward)

1. Twist Range

The other two axes are interlinked and togetherthe control the allowed volume that the child bodycan occupy. So first you’ll have a look at the coneangles that allow you to specify the volume that thechild may move through:

A. Twist Axis

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)

If you imagine the constraint representing yourshoulder, the green volume is the range of allowedpositions that your upper arm may occupy.However, you can refine the allowed volumefurther by using the plane axis to enforce plane

Page 82: 3Ds Max 2009 Special Effects

868 Chapter 8: Special Effects

limits. These limits are used to generate twofurther cones:

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis (outward)

1. Plane

2. Plane Min. Cone

3. Plane Max. Cone

4. Plane Min.

5. Plane Max.

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis (outward)

1. Plane

2. Plane Min. Cone

3. Plane Max. Cone

This allows you to create two different scenarios;one where the cones generated by the plane limitsintersect with cone produced by the cone anglesand the one where they do not:

A. Twist Axis

C. Twist x Plane Axis

1. Plane Min. Cone

2. Plane Max. Cone

A. Twist Axis

C. Twist x Plane Axis

1. Plane Min. Cone

2. Plane Max. Cone

If the volumes do not intersect, the plane limits donot have any effect in the constraint; however, byallowing the cones to intersect, and deeming theoverlapping volume as invalid body positions, youcan limit the allowed positions for the child bodyfurther still.

Page 83: 3Ds Max 2009 Special Effects

Setting Up Hips, Back, Neck and Shoulders 869

A. Twist Axis

B. Plane Axis

C. Twist x Plane Axis

These are the parameters that you will be adjustingin reactor to tweak the behavior of the character.Hopefully this brief overview will help clarify RagDoll constraints a little for you.

Setting Up Hips, Back, Neck andShouldersOpen the sample file:

• You can either continue from whereyou left off or you choose File menu >Open and load character02.max from the\tutorials\reactor\ragdoll directory.

You will approach this lesson in a similar mannerto the hinge constraint lesson in that you’ll gothrough one of the joints in detail and thenuse a table of parameters to construct the otherconstraints. The setup for each Rag Doll constraintis identical, so once you’ve mastered the first oneyou should have no trouble setting up the rest ofthe character. You start with the hips.

Create Rag Doll constraints for the hips:

1. On the Create panel, click Helpers andchoose 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 helperobject.

Next, you choose which objects to associatewith this constraint.

4. On the Modify panel > Properties rollout, clickthe button labeled None, next to Child.

5. Press H and from the Object Selectdialog, choose RThigh and click Pick.

The button beside Child should now readRThigh.

6. Turn on Parent.

This tells reactor to constrain two bodiestogether.

7. Click the button labeled None, next to Parent.

8. Press H and from the Pick Objectdialog, choose Pelvis, then click Pick

The button beside Parent should now readPelvis and the scene should look like this:

Page 84: 3Ds Max 2009 Special Effects

870 Chapter 8: Special Effects

Next, you need to adjust the Rag Doll constraintlimits 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 TwistMax to 5.0.

10.Set Cone Min to -25.0 and Cone Max to 55.0.

11.Set Plane Min to -45.0 and Plane Max to 2.5.

You have completed your first Rag Dollconstraint. Once you have successfully finishedwith that constraint, you can move on tocompleting the rest in a similar fashion.

Create Ragdoll constraints for the back, neck, andshoulders:

• The table below gives a list of the constrainedbodies, the constraint name and the constraint

parameters. Use this table to set up theremaining Rag Doll constraints in your scene.

Once you’ve created all of the above constraintsyour Rag Doll constraints should look like this:

The only thing left to do is to add these new RagDoll constraints to your Constraint Solver.

Add the Rag Doll constraints to the Constraint Solver:

1. Press H and select the CSolver01object.

2. On the Modify panel > Properties rollout,click Add.

Constraint Name Child Parent Twist Min Twist MaxConeMin

ConeMax

PlaneMin

PlaneMax

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

Page 85: 3Ds Max 2009 Special Effects

Creating the Animation 871

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

Now the Constraint Solver has all of theconstraints in it and the scene is ready topreview once again. First, save your scene.

4. Choose File menu > Save As and save the file asmy_character03.max

Preview your character:

• On the Utility panel > reactor > Preview& Animation rollout, click Preview In Window.

Now your character should tumble down thestairs properly.

Creating the Animation

Now that the simulation is working correctly, it’stime to create the animation. Since you don’t wantto see the bone objects and the constraints in youranimation, the first thing you’ll do is hide them.

Open the sample file:

• Continue from the previous lesson or chooseFile menu > Open and choose character03.maxfrom the \tutorials\reactor\ragdoll directory.

Hide the bones of the character:

1. Press H and on the Select Objectsdialog, choose the skin, the floor, and all 16steps, and then click Select.

2. On the Display panel > Hide rollout,click Hide Unselected.

Now you should only be able to see the skin ofyour rag doll.

Create and play the animation:

1. On the Utility panel > reactor > Preview& Animation rollout, click Create Animation.

2. Once the animation calculations havecompleted, click on the viewport of your choiceand click Play.

And that’s a wrap! It’s up to you now to tweakthe various parameters on the rag doll to alter itsbehavior as it tumbles down the stairs. You mayfind some joints are too loose or tight: reduceor increase the limits accordingly. You can giveboth halves of the rag doll’s body different settingsto encourage it to fall in a given direction. Trychanging its initial position and orientation or addsome obstacles on the stairs.

You can see the final result of this tutorialby opening characterEnd.max from the\tutorials\reactor\ragdoll directory.

Summary

You can use the reactor constraints to hold acharacter together, and control how it behavesduring falls, collisions, and other physicalencounters.

Page 86: 3Ds Max 2009 Special Effects

872 Chapter 8: Special Effects