Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
3ds Max 6 Bible (2004).pdf
Скачиваний:
55
Добавлен:
17.08.2013
Размер:
50.02 Mб
Скачать

938 Part IX Dynamics

Figure 38-22: Water flowing down a trough using the Path Follow

Space Warp

Summary

Space Warps are useful for adding forces and effects to objects in the scene. Max has several different types of Space Warps, and most of them can be applied only to certain object types. In this chapter, you

Learned how to create Space Warps

Discovered how to bind Space Warps to objects

Explored in depth all the various Space Warps in several subcategories

Combined some Space Warps with particle systems to shatter glass and explode a planet

In the next chapter, we explore the ability to animate dynamic simulations.

 

 

 

Creating a Dynamic

Simulation

If something is dynamic, it moves. Dynamic objects such as the Spring and Damper objects can be animated automatically because

their positions can be computed based on certain property values.

With dynamic simulations in Max, you can animate the position and orientations of several objects in a scene automatically by setting object properties such as bounce and friction and adding forces (via Space Warps) to the scene. When you assign these properties to an object, Max can compute the effects of these properties on the motion of the object when you run the simulation.

For example, an object with a high bounce value acts like a rubber ball, and one with a lower bounce value thuds like a rock when it impacts with other objects during a dynamic simulation. Friction is a property that determines how resistant an object is to moving over another surface, such as sliding ice (lower friction) versus a sliding brick (high friction). After properties have been assigned to the objects in the simulation and Space Warps have been applied, the animation keys are determined automatically when the simulation is run.

In addition to dynamic simulations, you can use the Flex modifier to add soft-body dynamics to your scenes.

Understanding Dynamics

Dynamics is a branch of physics that deals with forces and the motions they cause, and regardless of your experience in school, physics is your friend — especially in the world of 3D. Dynamics in Max can automate the creation of animation keys by calculating the position, rotation, and collisions between objects based on physics equations.

Consider the motion of a simple yo-yo. To animate this motion with keys is fairly simple: Set rotation and position keys halfway through the animation and again at the end, and you’re done.

Now think of the forces controlling the yo-yo. Gravity causes the yo-yo to accelerate toward the ground, causing the string to unwind, which makes the yo-yo spin about its axis. When it reaches the end of the string, the rotation reverses, and the yo-yo rises. Now, using Gravity and Motor Space Warps, you can simulate this motion, but setting the keys manually is probably easier for these few objects.

39C H A P T E R

In This Chapter

Understanding the Spring and Damper dynamic objects

Defining dynamic material properties such as bounce and friction

Using Space Warps in dynamic simulations

Using the Dynamic utility

Optimizing simulation keys

Using the Flex modifier

940 Part IX Dynamics

But before you write off dynamics, think of the motion of popcorn popping. With all the pieces involved, setting all the position and rotation keys would take a long time. For this system, using dynamics makes sense.

The Dynamics utility lets you specify objects to include in a simulation, the forces they interact with, and the objects to be involved in collisions. After the system is defined, the Dynamics utility automatically calculates the movement and collisions of these objects according to the forces involved and sets the keys for you.

Object properties determine the physical characteristics of the objects. These properties are set in the Dynamics utility and in the Material Editor and include properties such as bounce, friction, density, and volume. Using these properties, you can make objects act like ice, rubber, steel, or Styrofoam.

Forces in a dynamic simulation are created using Space Warps, but not every Space Warp can be used in a dynamic simulation. You can produce additional forces using dynamic objects such as springs and dampers.

Using Dynamic Objects

In the Create Dynamics menu are two dynamic objects: Spring and Damper. These primitive objects are similar to other objects, except that you can use them in dynamic simulations.

Spring

The Spring object not only looks like a simple spring but also acts with all the forces of an actual spring. In the Spring Parameters rollout, you can choose from a Free spring or a Bound to Object Pivots spring. A free spring isn’t attached to any other objects, but the Bound to Object Pivots spring lets you select Top and Bottom objects between which the spring is stretched.

The Spring Parameters rollout also includes settings that determine the spring diameter, the number of turns, and whether it winds in a clockwise or counterclockwise direction. You can create segments automatically based on the number of turns using the Automatic Segments option or manually using the Manual Segments option. Smoothing options include All, None, Sides, and Segments. You can specify whether the spring is renderable and whether to automatically generate mapping coordinates.

The Wire Shape section lets you specify which type of cross section the spring will use. Parameters for the Round Wire option include Diameter and Sides. Parameters for the Rectangular Wire option include Width, Depth, Fillet, Fillet Segs (Segments), and Rotation. D-Section Wire is the same as the Rectangular Wire type, except that its edge corners are smoothed to form a cross section that looks like the letter D. For this type of wire, you can define the number of round sides. Figure 39-1 shows each of these spring types. On the left is the Round Wire spring type, in the middle is the Rectangular Wire spring type, and on the right is the D-Section Wire spring type.

Figure 39-1: Spring objects can have three different cross sections: Round, Rectangular, or D-Section.

Chapter 39 Creating a Dynamic Simulation 941

The Dynamics Parameters section, not shown in the previous figure, includes properties for controlling the forces that the spring applies. The Relaxed Height value is the height of the spring when no forces are applied to it. The Constant k value determines the stiffness of the spring and is a measurement of the force produced by stretching the spring. This is an actual physical constant that relates to real-world springs. The measurement unit can be pounds per inch or newtons per meter. You can also specify whether the spring works in compression only, extension only, or both. Compressing a spring means pushing the ends together, and extension means pulling the ends apart from one another.

Springs typically move in a linear fashion: When you pull on them, they return to the same location if released. Stretching a spring beyond its limits causes nonlinear motion. When you select the Enable Nonlinearity option, the spring is allowed to move in a nonlinear fashion if it is pulled too far from its relaxed state.

Damper

A damper is like a shock absorber: It is an object that absorbs force and transmits it at a lower level. A damper can also act as an actuator that causes regular forces. A damper object

includes a base and a piston with a boot inside of a housing. You can see these damper parts in Figure 39-2. Damper objects in Max are essentially massless and cannot be used in collisions.

Piston

Boot

Base Housing

Figure 39-2: A damper object

942 Part IX Dynamics

The Damper Parameters rollout includes two End Point Method options. The first, Free Damper/Actuator, produces the forces but isn’t bound to any objects. The second, Bound to Object Pivots, actually transmits forces to the bound objects. The Pick Piston Object and Pick Base Object buttons let you select the objects to bind to either end of the damper.

When Free Damper/Actuator is selected, the Pin-to-Pin Height spinner becomes active. This spinner lets you specify the height of the free damper. You can make dampers renderable and set them to automatically generate mapping coordinates.

In the Cylinder Parameters and Piston Parameters sections, you can set the diameters of the base, main, inside, and piston parts of the damper. You can also specify the heights of the base, main, and piston cylinders. For the main cylinder, you can fillet the top and bottom. There is also a Smooth Cylinder option for smoothing the base, main, and piston cylinders.

The Boot Parameters section enables you to create a boot within the main cylinder. The boot adds more dampening effect to the damper. In shock absorbers, the boot consists of a rubber cylinder with several folds; a similarly shaped part is found in the dynamic damper object.

The Boot Parameters section holds values for defining this part, including Minimum and Maximum Diameter, the number of Folds, and Stop Diameter and Thickness. The Stop is the end of the boot object, and the Setback value is the distance between the Stop and the end of the main cylinder. There is also an option for a Smooth Boot.

In the Dynamics Parameters section, shown in Figure 39-3, you can specify whether the object is a damper or an actuator. These options are opposite from one another. A damper absorbs force, and an actuator produces force. The Drag value is the measure of how much force the damper absorbs. It can be measured in pounds per in/sec or newtons per m/sec. Dampers can also be set to work in compression only (when end objects are pushed toward each other), extension only (when the end objects are pulled apart), or both. For an actuator, you can specify the force that it applies in pounds or newtons.

Figure 39-3: The Dynamics Parameters section of the Damper Parameters rollout defines the physical characteristics of the damper object.