Join Steve Nelle for an in-depth discussion in this video Adding Gravity to an effect, part of Particle Effects in 3ds Max.
The Gravity space warp is designed to apply a gravitational pulling affect to any particle system that it's been bound to. Once added to the scene, both the direction and the strength of that pull can then be either adjusted or animated. Now to show you how it works, I'm going to be using a file named Gravity Space Warp. Scrubbing the Timeline reveals that we have a PArray system blowing up a yellow ball, currently push straight out from the exploding PArray that's been positioned in the middle of the sphere. That position representing the origination point for the explosion. Now we won't be covering the technique until our project on creating an explosion, but I want you to also notice that the original sphere had to be hid once the PArray fragments explode.
That was done using something called a Visibility Track. That hiding from view process was necessary due to the fact that it's not the original object, but instead the PArray particle system that's creating our actual geometry fragments. Now with the typical explosion effect, sooner or later the debris from the blast will fall to the ground. We'll create that effect by adding and binding a Gravity space warp to our exploding PArray. The gravitational pull from our effect will travel in the direction of our Gravity viewport icon. So the viewport we create our space warp in will be important. For falling down direction, we'll want to create our Gravity in the Top view.
Let's go and do that. In the Create column, we'll activate the space warp's icon. Under the Forces type of space warp, on the left-hand side, you'll see the Gravity. Let's go and click on that. Now activating the Top view, we'll position our Gravity space warp to the right of our yellow ball. Now, although the position of the Gravity icon in relation to the exploding PArray would be important if we're using the Decay setting on the space warp. For our example here, the position of our space warp icon will make no difference. The only thing we really need to be aware of is that the particle icons stick, the direction of our Gravity, is pointing downward in our Perspective view.
Okay with that now verified, let's activate the Perspective view, going full screen. We'll make that four to one viewport conversion using the Alt+W keyboard shortcut. Okay, I think we're ready to go. Let's go ahead and bind things together. I'll scrub to middle frame so I can better see the PArray icon. Now moving to the upper left-hand corner of the toolbar, I'll activate Bind to Space Warp. From here, I'll simply bind one of the particle fragments back to the Gravity. Okay, once I've done that I'll return to Select mode by hitting the Q shortcut key on the keyboard. Then select and adjust the Gravity Strength, I'll reselect the Gravity space warp in the view.
Now with the Modify column open, we'll go ahead and play things back. Okay, now as expected you'll see the particles are being dragged down in the direction of the Gravity space warp icon. Over on the right, let's now adjust that Gravity Strength. Let's try a value of 2.0. You can see how now things are being grabbed and pulled down a little more aggressively. Let's try a value of 3.0, and even harder or faster still. Let's take that back to 1.0. If we wanted the explosion fragments to move more to one side or the other, we would simply rotate the Gravity icon.
Let's see how things would look if we rotate the arrow going more toward the left-hand side of our view. And why don't we also experiment moving things more to the right? Okay, let's undo those last two operations, taking the icon arrow back to pointing straight down. Now if we use the negative value for the Gravity Strength, the pulling effect would go in the opposite or negative direction. Let's try that. Now look at the difference there. Why don't we try negative 1.0, and as you can see the Gravity now pushes our fragments a little more aggressively toward the topside.
You know when you think it through, a normal explosion would have the particle fragments initially going upward, then once their velocity slowed down, gravity would then kick in pulling them back down toward the ground, and we can create that look by animating our Gravity's Strength value. Let's try that. Let's stop the play returning to the first frame. Now we'll set the initial Strength of our Gravity to negative 0.5. That will create that upward explosive effect. We can now turn on our Auto Key, taking our Timeline to frame 45. Okay for the first one-and-a-half seconds of our animation, we want to maintain the Strength of being negative 0.5.
We can lock that value when at frame 45 by merely holding down the Shift key and right-clicking on the Strength spinner. Now once you've done that, notice the brackets now around that spinner. That's backs us a way of letting us know, we now have a keyframe at 45 with that same Strength value. So if we scrub the timeline, you'll see over the first 45 frames, the Gravity is having the explosion effect go up. Now to pull things back down, we'll go to frame 95 and then change the Strength value to 2.0. Okay now we've kind of run out of frames, so let's right-click on our playback head and change the total number frames to 150.
We can now zoom out a little bit and play things back. So there is a more realistic explosion. First blowing things up into the air, then having the gravitational pull pull them back down. That already gives you a few things that you can now use and apply when using the Gravity space warp. I'm going to go ahead and save my scene out as Gravity Space Warp Completed if you would like to look it over.
- Controlling particle timing, quantity, and rotation
- Comparing particle system types, such as PArray, Super Spray, and more
- Using instanced particles to customize a particle's shape
- Understanding how to set up a particle flow
- Wiring PFlow operators and tests to change particle behavior
- Creating realistic-looking particles using maps
- Adding Gravity and Wind
- Using Space Warps like Vortex, Motor, and PBomb
- Making particles follow a path
- Spawning particles
- Creating realistic smoke