3D animation can be fun and rewarding, especially when you get into the cooler effects that can really bring a scene to life. In the previous chapter, you were introduced to LightWave 10’s particles. This chapter will take you even further by showing how to create various dynamic effects for creative animations. These dynamic effects let you make animations in which objects collide realistically and influence each other’s motion in a way that obeys natural laws such as gravity, momentum, and shock absorption. Tools like these will help take your animations to the next level. You will work through various projects so that you can quickly and easily learn how to apply these powerful tools to just about any animation. In this chapter, you’ll learn about the following:
• Dynamics-related panels and tools
• Hard-body dynamics, governing solid, rigid objects
• Soft-body dynamics, governing objects that are yielding but resilient
• How to make objects collide and react
The word dynamic is an adjective that relates to energy or to objects in motion. What puts these objects in motion in LightWave are clever commands that you control. To use any of the dynamics in LightWave, you just need to think about what you want an object to do.
Let’s say you have created a fun character with a big, uh, animator’s belly. As your character walks, you want his girth to shake a bit. Although you could use bones with a weight map and apply bone dynamics, a simpler and more effective method is to apply a “soft” dynamic to the jelly belly. Or perhaps you’re an avid bowler (or aspire to be). Instead of wearing those silly shoes to go bowling, just create some 3D bowling balls and pins and use hard dynamics and collisions to send the pins flying—without having to manually keyframe the ball’s contact with each pin in its path or each struck pin’s contact with other pins around it, and so on. LightWave motion dynamics features let you place objects in your scene, tell them how to move and interact with other objects, and then turn them loose to interact with each other—without manually keyframing all of their collisions and encounters. Once you’ve learned all the necessary buttons and processes, LightWave dynamics can make your scenes come to life. Now, take a quick tour of the dynamics-related panels to familiarize yourself with them.
Dynamics in LightWave are easy to set up after you understand how the panels work and what the controls mean. Figure 10.1 shows the SoftFX dynamics panel. This panel is accessed through the Dynamics tab within the Object Properties panel, just as particle effect controls were in the previous chapter. You can see from the image that there are six tabbed areas within the dynamic controls.
Figure 10.1. When a dynamic is applied, the controls are found within the Object Properties panel.
The number of tabbed areas varies depending on which dynamic you apply. As the tutorials progress in this chapter, you’ll see how the different areas are used.
The types of dynamics you can apply to objects are as follows:
• Cloth
• Soft
• Hard
• Emitter (for particles)
• Wind
• Collision
• Gravity
Each of these dynamic types has a similar set of commands and controls. When you apply a dynamic to an object, you need to think about your process, just as you do when modeling or animating. Think about where you are going with the animation and what you want to do with it. Once you understand that, you can choose the appropriate dynamic for your object and know what tabbed area to access within the controls.
Hard-body dynamics have been around for a while, but few ordinary mortals have been able to take advantage of them. Complex scripting requirements and heavy calculations often made this top-notch feature available only to a few. Now, thanks to some clever programmers at NewTek, this feature is available interactively in LightWave 10.
Hard-body dynamics applies to objects that behave as rigid solids. When hard bodies collide, they retain their shapes without compressing or yielding. Think of marbles, billiard balls, or anvils. Hard-body dynamics control how these objects behave when they run into each other, based on properties such as gravity, weight, and density.
Exercise 10.1. Creating Hard-Body Dynamics
This tutorial will take a few basic objects and show you how to make them interact. From there, you’ll change variables to see the how the dynamic toolsets work.
Figure 10.2. The Solids model loaded, ready for some dynamic action. Exciting, isn’t it?
If either the light or camera icon gets in the way of working, simply move it out of view. This project is a lesson in dynamics, and you won’t be lighting or rendering.
Figure 10.3. Position the ball at the top of the slide.
Figure 10.4. Add a hard dynamic to the ball.
Don’t forget that you can also press Shift+S to save incremental versions of your scenes.
Figure 10.5. Use the Object Properties panel to add a collision dynamic to the slide object.
Figure 10.6. With two dynamics applied, your animation starts to have interaction.
Believe it or not, that’s all there is to it! You’ve just created hard-body dynamics. However, there are many more controls to play with, so save the scene and move on to experiment a little.
You might have noticed that the ball doesn’t quite fall down through all of the obstacles. A few more adjustments are in order.
Figure 10.7. Reduce the Ball object’s Bounce/Bind Power setting to 40% from the default 200% to stop it from careening out of the scene.
Figure 10.8. Adding weight to the ball and changing the Impact Effect to Roll will change how the ball behaves.
Figure 10.9. Adjusting the Collision By option lets your ball roll down the obstacles.
The Node setting tells LightWave to use every point within the object to calculate collision dynamics. That can be significant for complex models and interactions, but in a simple scene like this, containing simple geometric objects, the Node setting simply slows down your animation with excess calculation. Once you’ve set the Collision By option to Sphere, click the Calculate button.
With just a few changes to these settings, you can make objects interact with each other. However, you might have noticed that there are more controls for collision effects than you’ve used here. Figure 10.10 shows these controls, which appear on the Dynamics tab of the Object Properties panel.
Figure 10.10. The collision controls are located mainly on the Mode tab, part of the Dynamics tab of the Object Properties panel.
The following list provides a rundown of its controls and settings:
• Setting a group through the Group drop-down is useful for times when you’re working with larger scenes and multiple objects. For instance, let’s say you have three slides going in this scene. You could create a group so that the collision and hard-dynamic objects are tied together and don’t react to other objects with dynamics applied. It’s a way of separating and isolating dynamics, while maintaining control.
• The Type drop-down specifies the surface shape that the selected object “shows” to objects that collide with it, and that is used to calculate the results of that collision, such as the angle at which a given object will ricochet away from its surface. The Object setting uses all the points on an object’s surface to calculate collision results; it provides the most realistic dynamics but requires a lot of processing power and rendering time. The Sphere, Box, and Plane settings calculate collisions as if the selected object, no matter how complex in shape, were one of those simpler objects. These options result in collisions that are not as precise, but they suffice in many instances, often appear no different, and can save a lot of rendering time. The Object-Subdiv setting lets you apply different collision properties to surface subpatches within a single object.
• The Mode drop-down determines how objects will react to the selected object when they collide with it. The default Bounce setting causes objects that strike the selected object to, well, bounce off it. Other options include Stick, Erase, Event, Scatter, and Attract. Stick and Attract have the effects you’d expect on colliding objects. Erase causes objects that strike the selected object to disappear from the scene. The Event setting causes the selected object to act as if it has been struck by another object when noncollision dynamic events occur, such as the activation of a wind effector. The Scatter option causes colliding objects to bounce off the selected object in a random fashion.
• The Radius/Level setting can change the collision position. For example, if you change this value from 0 m to 400 mm and then click the Calculate button again, the ball won’t fall and drop down the slide like it did before. Instead, it will “collide” with the slide before it actually touches it, because you’ve made the ball’s collision radius larger than its actual physical radius. Keep this setting at 0 for this project.
• The Bounce/Bind Power selector controls the strength of the collision behavior specified in the Mode drop-down: how bouncy a Bounce Mode setting is, how sticky a Stick setting is, and so on. Use the mini-slider or type in a percentage value to adjust these settings.
• The Friction Power control, also adjusted via the mini-slider or by typing a number into its requester, determines the amount of resistance the selected object’s surface exerts on other objects as they roll or drag across it. Increasing Friction Power for the slide to 20.0 rather than 0, for instance, causes the ball to move down the slide at a slower rate because of the extra friction. You can play with this value to see how the dynamics react, but for this project keep the setting at 0.
When setting Radius/Level or Bounce/Bind Power, you can click the E buttons to the right of the values to change these settings over time. Make your ball bounce hard, and then suddenly stick.
• You can increase the Fix Power and Roughness to change how the collision reacts throughout the animation. Let’s say you increase Fix Power to 20. The ball will not bounce as much on the collision. It will not slow down, but rather stay attached to the collision object more throughout the calculation. Roughness, on the other hand, will make the ball bounce around, sort of like rough terrain. Set the value to, for example, 40%, and you’ll see the ball bounce down the slide. Change these values to add variations to see how the ball movement changes as it moves down the slide.
• Finally, you can set the Probability, telling LightWave the percentage of probability that the collision should happen. Right now, it’s set to 100%, meaning there’s a 100% probability of a collision. Lower this value, calculate again, and see the difference.
Within the HardFX controls, which are located on the Dynamics tab found in the Object Properties panel, click the Collision tab and then click the Start By Collision drop-down selector. Choose Collision in the Start By drop-down, and the ball’s dynamic effects will remain turned off until the ball collides with another object. Triggering the effect using this collision-detection method saves processing time. You can set a Stop By collision event in the same way. Simply click the Stop By drop-down selector and choose Stop By Event. The event would be the collision. In the previous exercise, turning on the Start By Collision option would yield a ball that just sits in the air, that doesn’t fall, and that doesn’t roll. If something were to hit it, like a 3D hand or baseball bat, this collision would start the effects.
As you can see, setting up hard-body dynamics is not too complicated if you slow down and think about the process. Think about what you’re going for, and it’ll come together. In the previous exercise, you had a ball, which you told LightWave was a “hard” object. If you calculated after applying this setting, you might have seen an error. That’s because LightWave doesn’t have anything to work with, and you need to set something for this object to interact with. So, you told the ball to collide with the Solids object. The Solids object had a “collision” applied.
So how about going a step further? The next exercise will show you how to shatter glass in 3D.
Exercise 10.2. Modeling for Dynamics
This exercise will show you how you can blow apart a window. The technique can be used for anything, from a creature crashing through a brick wall to a bowling ball knocking down a set of pins. The project you’ll do here will show you a quick technique for creating a window in Modeler, and then show you how to use dynamics in Layout to crash an object through it, essentially shattering the window—another hard-body dynamic effect.
Figure 10.11. Create a box in Modeler that has multiple segments along its X and Y axes.
Figure 10.12. Use the Jitter tool to shake up the shape of the polygons.
Figure 10.13. Select, in order, the bottom-left corner point and the point just above it.
You’re selecting two points sequentially to tell Modeler which way you want your selection to go, for the next step.
Figure 10.14. Choose Select Loop to automatically continue the selection of points.
Figure 10.15. Using Select Loop is an easy way to select the points around the entire box.
Figure 10.16. Select Quantize on the Modify tab.
Figure 10.17. Set the Quantize value to 500 mm.
Figure 10.18. Using the Quantize tool, you can even out the selected points.
Figure 10.19. Use the Statistics panel to select polygons with more than four vertices.
There’s another way you could have created this model to this point. After you created the segmented box, you could have selected all of the polygons of the model except for those that make up the outer edge, and then applied the Jitter tool. Only those selected polygons would have Jitter applied, leaving the outer edge nice and even. The reason this exercise showed you another method was simply to have you work with a few more of Modeler’s tools. So, now you know. The choice is yours for future projects.
Figure 10.20. Triple the polygons to break them up more, and use the Align tool to make them all face the same direction.
Figure 10.21. Use the Unweld command to disconnect all the polygons.
The adjacent polygons of your model share common points and side segments; in LightWave lingo, these polygons are welded together. The Unweld command converts each selected polygon into a discrete, self-contained object with sides and vertices all its own. Applying the Unweld command to the window surface will allow the dynamics engine to shatter the window by animating each triangular segment as an independent “shard.” If you did not unweld the points, the dynamics engine could only move or push the entire window object, even though it consisted of multiple segments.
Even though unwelding separates each segment, the window is still one solid object. And, without using dynamics to break up the object, moving the object in Layout will still move the entire object, not the segments.
If you want, select various polygons and apply different surface names to them. Select a few polygons, for example, press q, and then give those panes of glass a specific name and color. Deselect, then select some other panes, surface, color, and so on. The GlassWindow file in the Chapter 10 folder of this book’s DVD has this already done for you.
Exercise 10.3. Shattering Glass
This next exercise will shatter the glass window object built in the previous exercise. It’s similar to the earlier hard-body exercise, but with a few differences in settings.
The dynamic collisions that will shatter the window object in this exercise require the window object’s polygons to be unwelded—converted to discrete, self-contained polygons that share no points or segments. Recall that we used the Unweld command in Exercise 10.2 to separate the window’s surface polygons into “shards” that can be animated independently.
Figure 10.22. Add a dynamic object straight into Layout from the Items tab.
How is this different from the collision you added in Exercise 10.1? In that exercise, you added an object (named Solids) and told LightWave to make it a collision object. In this exercise, you’re creating a collision effector, which we’ll use to blow apart the GlassWindow object. Instead of building another object, you can just apply a dynamic effect directly. You can then even add a HyperVoxel explosion of particles to the effector to enhance the effect.
Figure 10.23. A dynamic collision effector in Layout, as represented by a wireframe ball.
Take a look at the FX_Collision control panel, and you’ll notice the same controls that appeared on the Object Properties panel’s Dynamics tab throughout Exercise 10.1. LightWave often provides multiple locations for its controls.
Figure 10.24. Increase the collision dynamic from the FX_Collision control panel.
Figure 10.25. A small animation is created with the collision dynamic.
Nothing will happen because you do not have anything to calculate. For the GlassWindow object to break apart, you must apply a hard dynamic to it.
Figure 10.26. Add a hard dynamic to the collision effector.
Figure 10.27. Setting the Piece Mode to Parts allows the pane of glass to be shattered.
Figure 10.28. Check the collision effector’s Start By Collision box to make the GlassWindow object sit still until it breaks apart.
From this point on, it’s a matter of tweaking the settings and observing the results until the animation looks the way you want it to look. None of the remaining steps in this exercise are essential or strictly “correct.” Try them all to acquaint yourself with the effects of the controls they describe, and decide for yourself if you want to keep the suggested settings, apply higher or lower values, or discard the adjustments altogether.
If you want to make sure the exploding pieces do not collide with one another, you can choose Box from the Self Interaction drop-down on the Collision tab of the Object Properties panel’s Dynamics tab. Be careful, though, because this will greatly increase calculation times. You can always cancel a calculation by pressing the Control key.
Figure 10.29. Set the Impact Effect to Roll to make the shards spin as they shatter and fall.
Figure 10.30. A Plane-type collision object makes the parts fall and bounce on the ground.
Figure 10.31. Once the collisions and motions are set up, you can position your camera to have the shards of glass fly toward you.
You can use the techniques from the preceding examples to set up just about any collision in which rigid objects crash together and break apart or scatter. Here are a few more tips you can try when working with hard-body dynamics:
• On the Rotation tab in the HardFX panel, change Wind Effect to Roll. When your parts are exploded after the collision, they’ll roll, as if blown by the force of a shockwave in the air, radiating from the impact point. This adds a nice touch to exploding objects.
• On the Rotation tab of the HardFX panel, change the Torque Min and Torque Max values to balance the amount of initial and ending spin and motion on the exploding parts.
• Try changing the Pivot Shift value so that the exploding pieces rotate differently. At 0%, each part rotates around its own center point. Change this value to 100%, and the parts rotate as a group around a much larger radius, as if you’d moved all of their pivot points individually. You can also set this to just an X Shift, Y Shift, or Z Shift from the drop-down control to the left of the value requester.
• Increase the Resistance setting on the HardFX panel’s Basic tab, to slow down the exploding parts.
• If your exploding parts hop like little bugs after they land, try lowering the Ground object’s Bounce/Bind Power setting.
• Use the EditFX panel (as you did in Chapter 9, “Particle Animation”) to select and remove or reposition any individual shards as they scatter from the collision.
• Experiment with one setting at a time. Have fun!
What about soft things, like blankets or pillows? How do soft-body dynamics differ from cloth dynamics? When should you use one over the other? Read on to learn about more cool features of the dynamics in LightWave 10.
What is a soft-body dynamic? Is it just for making plump characters move naturally? That’s one thing it can do. But soft-body dynamics can do much more. A soft-body dynamic applies to any object that is... well, soft! More specifically, it’s anything that is soft and resilient; its surface yields when something hits it, but it reverts to its original shape after the collision. Think of a water balloon, a sofa cushion, or perhaps even the pants on a walking character.
Exercise 10.4. Working with Soft-Body Dynamics
Figure 10.32. Load the Pillow object into Layout and view the scene from a Perspective view.
Figure 10.33. Two keyframes are set for the Pillow object.
Not very effective for a pillow...
Figure 10.34. Changing the values on the Deform tab tells the pillow how to react to the collision.
Figure 10.35. Changing the pillow’s WaveSize and WaveCycle settings balances the amount the pillow bounces when it hits the ground.
Changing the WaveSize value for the pillow tells LightWave how to calculate the motions after the dynamic is applied. You can even see a small thumbnail window of the wave’s motion, starting off more intense on the left and fading off over time to the right.
As you can see from this exercise, setting up objects with soft-body dynamics is easy. What other things can you think of to create with soft-body dynamics? Aside from things like tires hitting the ground or animating gelatin, soft-body dynamics can also be used for characters. You can define a point set in Modeler by selecting a group of points and then clicking New for Selection Set (the S button) at the bottom right of the Modeler interface. Then in Layout, use that selection set and the deformer for soft-body dynamics to make a character’s body parts jiggle. Fun stuff!
This chapter introduced you to hard- and soft-body dynamics. Even though the tutorials were simple, their methods and results are the same whether you’re building New York City in 3D or just a ball and box.
I can’t emphasize this enough: Practice! Experiment! Change a value; see the results. Work with one value at a time, and as always, consult your LightWave 3D manual for any specific technical questions. Now, turn the page and learn about LightWave 10’s bones tools for deforming objects.
52.15.129.90