Getting Collective
Introduction to reactor
Geometry Types
The Basics of Simulation
Now
that you have a valid scene for simulation, you can try simulating
it. reactor provides two methods for simulating animation:
- The
reactor preview window displays your simulation using OpenGL or
DirectX. You can examine your objects’ physical behavior in the
window, see how they interact, and even use the mouse to interact
with the scene. You can use this window to update the rigid bodies’ states
in 3ds Max at any time during simulation, which means that it
acts as an interactive scene modeler.
- Alternatively,
use keyframe creation. You define an animation range, and reactor
creates and simulates the physical world across that range, passing
the rigid bodies’ states back to 3ds Max as keyframes.
Continue using your scene from the previous
lesson, or open reactor_intro_2.max from tutorials\reactor\introduction.
Examine
your scene in the preview window:
- Go
to the Utilities panel, click the reactor button, and, on the About
rollout, make sure Choose Solver is set to Havok 1.
-
On the
reactor toolbar, click Preview Animation.
This opens
your scene in a preview window. By default, your scene is initially
displayed from the Perspective view. You can use the left mouse
button to rotate the camera, the middle button to pan, and the scroll
wheel to zoom.
- To
start your simulation, open the Simulation menu in the preview window
and choose Play/Pause, or press P on
your keyboard. Your simulation start and the sphere will fall onto
the box.
You can use your right mouse button to drag
the sphere around the scene. However, you cannot move the box, because
it has no mass.
TipTo reset the simulation, press R.
- When
you’re finished exploring your simulation, return to 3ds Max by
closing the preview window.
Create
physically-based keyframes:
Next, you will create keyframes for the objects’
interaction. A sphere falling onto a level surface isn't very interesting,
so first you will tilt the box so the sphere will roll along its
surface.
-
In the
Left viewport, select the box and rotate it clockwise about 30 degrees,
being careful not to let it touch the sphere.
-
On the
reactor toolbar, click Create Animation. A Reactor dialog appears,
asking you to confirm the choice. Click OK to continue.
This creates
a simulation and runs it for the length of time between the Start
Frame and End Frame values set on the track bar. The default values
for these are 0 and 100, respectively; you will change these values
later in the tutorial.
reactor
creates keyframes for the positions and orientations of your rigid
bodies for each of those 100 frames.
-
Click
Play Animation to watch the animation in the viewport. You should
see your sphere falling onto the box and rolling down over the edge
of it.
- At
frame 0, select the sphere if necessary, and then Alt+right-click the sphere and,
from the quad menu > Set quad, choose Delete Selected Animation.
The sphere's
keys on the track bar go away.