Dynamics in LightWave (Dynamics in Motion) Part 1

In the previous topic, you were introduced to LightWave v9′s particles. This topic will take you even further by showing how to create various dynamic effects for creative animations. These dynamic effects, which are new in LightWave v9, 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.

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 tenpins 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 lets 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—with-out 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, let’s take a quick tour of the dynamics-related panels to familiarize yourself with them.


Understanding Dynamic Controls

Dynamics in LightWave are easy to set up after you understand how the panels work and what the controls mean. Figure 14.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 topic. You can see from the image that there are six tabbed areas within the dynamic controls.

The number of tabbed areas varies depending on which dynamic you apply. As the tutorials progress in this topic, 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

 When a dynamic is applied, the controls are found within the Object Properties panel.

Figure 14.1 When a dynamic is applied, the controls are found within the Object Properties panel.

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

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

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

1. Open LightWave Layout.

2.This model has just one layer, containing a few geometric shapes set up as an "obstacle course."You’ll use dynamics to animate the ball object as it rolls around, and interacts with, the Solids model’s shapes.

The Solids model loaded, ready for some dynamic action. Exciting, isn't it?

Figure 14.2 The Solids model loaded, ready for some dynamic action. Exciting, isn’t it?

3. Select the ball and move it up on the Y-axis so that it’s positioned above the top of the highest box. Create a keyframe at 0 to lock it in place, as in Figure 14.3.

Position the ball at the top of the slide.

Figure 14.3 Position the ball at the top of the slide.

Note

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.

4. With the ball selected, press p to open the Object Properties panel. Although this tutorial is simple, you’ll see how cool the dynamic effects can be.

5. Click the panel’s Dynamics tab, and select Hard from the Add Dynamic dropdown to apply a HardFX dynamic to the ball object. Position your view similar to Figure 14.4 so you can see the slide, ball, and Properties panel. Select the HardFX listing to see its controls.

6. Now that you’ve come this far, it’s a good idea to save the scene. Save this scene as SolidsSetup and then save it again as SolidsWorking, or something similar. The idea behind this is that at any point, you can call up the setup scene and start again.

Add a hard dynamic to the ball and position the view to see everything.

Figure 14.4 Add a hard dynamic to the ball and position the view to see everything.

Note

Don’t forget that you can also press Shift+s to save incremental versions of your scenes.

7. In the Object Properties panel, choose the Solids object and add a collision dynamic to it from the drop-down list, as in Figure 14.5.

Use the Object Properties panel to add a collision dynamic to the slide object.

Figure 14.5 Use the Object Properties panel to add a collision dynamic to the slide object.

8. If you click the Calculate button on the Dynamics tab, nothing happens. You’ve not yet given the dynamics any properties. So, go back to the ball object and select the HardFX listing to access its controls. You only need to click it once for the controls to appear on the Dynamics tab.

9. The first thing you want to do is give the ball some gravity. In the Basic tab of the HardFX controls, set Gravity to -9.8. It’s the last setting in the drop-down, and it corresponds to the acceleration due to gravity on Earth, 9.8 meters/second 2. (The negative value reflects the fact that gravity pulls downward, along the negative Y-axis.)

10. Set the last frame of the animation to 400.

11. Click the Calculate button on the Object Properties panel’s Dynamics tab. Whoa! The ball falls and bounces down the solid object (Figure 14.6)!

With two dynamics applied, your animation starts to have interaction.

Figure 14.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.

12. Back in the Object Properties panel, select the FX Collision listing for the Solids object. Then, set the Bounce/Bind power to 40% (Figure 14.7). The default 200% is way too "bouncy," which is why this ball fell, then bounced off into the air.

13. Click the Calculate button again, and the ball now slides down the objects better. But it’s still not quite right, is it?

14. Select the Ball object in the Object Properties panel, then select the HardFX listing.

15. Increase the value of the Weight setting to 0.2. This will make the ball heavier. If you calculate again, the ball slides much better. But it slides. It should roll, shouldn’t it? You can change this too.

16. On the Rotation tab, change the Impact Effect from Force to Roll (Figure 14.8).

17. Click the Collision tab and change the Collision by option from Node to Sphere.

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.

 Reduce the ball object's Bounce/Bind Power setting to 40% from the default 200% to stop it careening out of the scene.

Figure 14.7 Reduce the ball object’s Bounce/Bind Power setting to 40% from the default 200% to stop it careening out of the scene.

Adding weight to the ball and changing the Impact Effect to Roll will change how the ball behaves.

Figure 14.8 Adding weight to the ball and changing the Impact Effect to Roll will change how the ball behaves.

18. Once the calculation is finished, click the play button at the bottom of the interface and you’ll see the ball roll smoothly down the solid objects (Figure 14.9).

Adjusting the Collision by option lets your ball roll down the obstacles.

Figure 14.9 Adjusting the Collision by option lets your ball roll down the obstacles.

19. Click the Rotation tab, and to the left of the Impact Effect setting, you can tell the ball to roll on a specific axis only. Click the Axis drop-down list and you can see it’s set to Free, but you can change this to the Y-axis (which might apply to a spinning top), or X-axis (for a wheel or yo-yo), and other variations. The Free setting is best for a rolling ball, so you don’t need to change anything here, but it’s a good idea to familiarize yourself with this important control.

20. You can also change some of the other values, such as Wind Effect and Torque. If you increase the Torque Max value to 300%, for example, the ball will roll faster than it is moving. A good example of this is a children’s ball thrown into water, which has a lot of torque coming out of the child’s hand. It spins faster than it is moving (or sliding) on the water. Another example is a bowling ball thrown down an alley. Additionally, you can give the ball a Resist (Spin) setting to have it hold back on its spin amount.

• You can see that with just a few changes to the 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 14.10 shows these controls, which appear on 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 are 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 collision controls are located mainly on the Mode tab, part of the Dynamics tab of the Object Properties panel.

Figure 14.10 The collision controls are located mainly on the Mode tab, part of the Dynamics tab of the Object Properties panel.

• The Type drop-down specifies the surface shape 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 type 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 a 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 0m to 400mm and then click the Calculate button again, the ball will not 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 this setting.

Note

When setting a 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.

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

• 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 say, 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. Conversely, you can set a StopBy collision event in the same way as the Start By. 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. You need to just slow down and think about the process. Think about what you’re going for, and it’ll come together. In this previous exercise, you had a ball, which you told LightWave was a "hard" object. If you calculated after setting this, you might see 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.

Next post:

Previous post: