Using reactor


The reactor plug-in was developed by a company named Havok. reactor is a complex piece of software with a huge assortment of features that enable you to define physical properties and forces and have the scene automatically generate the resulting animation keys as the objects interact while following the laws of physics.

Note 

Be aware that the reactor plug-in is different from the Reaction controller, discussed in Chapter 32, "Animating with Constraints and Controllers."

The reactor plug-in interface exists in the Utilities panel and is one of the default utilities, but you can also access it from the reactor menu and the reactor toolbar, shown in Figure 37.1. The reactor menu and the reactor toolbar provide a quick and easy way to access the various reactor elements. For example, clicking the Rope Collection button opens the Helper category in the Command Panel, selects the reactor subcate-gory, and selects the RP Collection button.

image from book
Figure 37.1: Use the reactor toolbar to define physical object properties.

The reactor process

Before getting into the details of reactor, I want to briefly explain the process involved in using reactor. reactor works with geometry that is defined with certain physical properties. After these properties are defined, the reactor engine can take over and determine how all the various objects interact with one another. In the reactor utility, you can select to use the reactor version 1 engine (Havok 1) or the reactor version 3 engine (Havok 3). Version 3 of the reactor engine is much more accurate and considerably faster than version 1, but if your simulation includes cloth, rope, or soft body objects, then you need to stick with version 1.

NEW FEATURE 

The reactor version 3 engine and all its benefits are new to 3ds Max 9.

Within the Utilities panel are several rollouts of options for controlling the simulation. In the Preview & Animation rollout, you can set the simulation range, number of frames, and substeps per key. In the Havok 1 World rollout, you can set the global gravity values, the World Scale, and Collision Tolerance. The Add Deactivator option lets you remove objects from the simulation that are considered at rest. This keeps them from wiggling around, which happens when they are still part of the simulation. The Short and Long Frequency values help determine when an object is at rest.

If the Havok 3 option is selected, then you can choose to compute the object's motion on a Continuous basis or on a Discrete basis, which only checks the object motion at the beginning and end of each step and interpolates between these two states. You also can set a Maximum Linear Velocity for objects and a Stiffness value.

The Collisions rollout lets you specify how collisions are stored. By storing collisions, you can trigger an event to make particles show sparks, but enabling the storing of collisions can slow down a simulation. These is also a window for Defining Collisions so you can ensure that certain objects won't collide and others will.

The Display panel lets you specify a camera, clipping planes, lights, and textures to use in the Preview window for displaying the simulated objects.

The Utils panel includes an Analyze World button that you can use before starting a simulation. There are also controls for reducing the total number of keys and for testing the convexity of objects.

Defining geometry with physical properties happens in several different ways. Objects can be added to a collection. A collection is a type of reactor object that has several inherited physical properties such as a Rigid Body collection. Objects can also be linked with reactor objects such as a Spring or Motor. These objects are affected by forces that are preset for the different reactor objects. Finally, you can set properties using the Object Property rollout that lets you define properties such as mass, friction, and elasticity. After all the objects are defined and attached to the correct reaction collection or object, you can open a Preview window that lets you see how the object will react under the current forces. You can also interactively play with the various objects in the Preview window.

When you're comfortable with the animation, the reactor image from book Create Animation menu command creates all the keys for the animation sequence.

Tutorial: Filling a glass bowl

Imagine trying to animate a bunch of marbles falling into a glass bowl. If you were using keyframes, determining whether an object overlaps another would be difficult, but with this quick example, we see the power of reactor.

To animate marbles falling into a glass bowl, follow these steps:

  1. Open the image from book Glass bowl of marbles.max file from the Chap 37 directory on the DVD. This file includes a glass bowl and several marbles positioned above its opening.

  2. Select reactor image from book Create Objects image from book Rigid Body Collection, and click in the Front viewport to create the icon. In the RB Collection Properties rollout, click the Add button to open the Select Objects dialog box.

  3. In the Select Objects dialog box, click the All button and then the Select button to select and make all objects in the scene rigid body objects. Then right click to exit Rigid Body Collector mode.

  4. Select the Box and sphere objects that make up the floor and bowl, select reactor image from book Open Property Editor, and enable the Unyielding option. This prevents these two objects from moving. Then select the sphere bowl object, and enable the Concave Mesh option.

  5. Select all the marble objects in the scene, and set the Mass value to 5.0.

  6. Then select reactor image from book Preview Animation to open the Preview window, and press the P key to start the simulation.

  7. If the animation looks fine, select reactor image from book Create Animation to have reactor compute all the keys.

Figure 37.2 shows the bowl full of marbles positioned using reactor.

image from book
Figure 37.2: reactor can compute all the collisions between all these marbles.




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net