Manipulators Manipulators are onscreen helpers, such as sliders, that can be wired to specific tracks of one or more scene objects. In this section, we will create two sliders to control aspects of the rocket's launch and flight.
1. | Go to Create panel > Helpers > Manipulators. | 2. | Go to a Front viewport (manipulators cannot be created in a Camera viewport). Click the Slider button and click in the viewport to create a slider manipulator. Name this manipulator Slider_launch_shake. | 3. | This slider will now appear in any active viewport. Go to the Modify panel and enter "launch shake" in the Label box to change the name of the slider as it will appear in viewports. | 4. | Return to the Camera viewport and move the slider, using the Select and Manipulate tool, into the upper left corner of the viewport (Figure 14.52). If the slider does not appear in the Camera viewport, it may be outside the cropped region, requiring you to go to the Front viewport to move the slider closer to the center of the viewport. To move the slider in an orthogonal viewport, click and drag the small box to the left of the slider. Click the Select and Manipulate button again to exit that mode.Figure 14.52. This slider will be used to control the shaking of the rocket during launch. [View full size image] The primary effect of this slider will be to add a shaking motion to the rocket before it launches. In order to accomplish this, a Noise controller must be layered on the position track of the Dummy controlling the rocket's position. | 5. | Select Dummy_launchpoint and go to the Motion panel > Assign Controller rollout. Expand Link Params to see the individual position, rotation, and scale tracks. | 6. | Highlight Position : Position XYZ, click the Assign Controller button, choose the Position List controller, and click OK. | 7. | Expand the position track, now labeled Position : Position List, to see that an empty track named Available has been added. | 8. | Highlight Available and assign a Noise Position controller to it. This will bring up a Properties dialog for the Noise controller. | 9. | We want this controller to provide a small shake on the Z axis, so set X Strength to 0, Y Strength to 0, and Z Strength to 5. | 10. | Close the Noise Controller dialog. Note that if you scrub the Time Slider, the Dummy will shake throughout the animation. |
Wiring a Slider Now we will wire the slider to the Weight value of the Noise controller.
1. | Select the slider, and in the right-click menu, choose Wire Parameters > Object (Slider) > value. (This is the slider's output.) Choose Dummy_launchpoint as the target, going to Transform > Link Params > Position > Weights > Weight: Noise Position (Figure 14.53).Figure 14.53. Wiring the slider to the Dummy. [View full size image] | 2. | This will bring up the Parameter Wiring dialog, with the slider's value track highlighted in the top left pane and the Dummy's Weight: Noise Position track in the top right pane. Click the right arrow to establish control flowing from the slider to the Dummy. Click Connect to activate the wiring (Figure 14.54).Figure 14.54. The Parameter Wiring dialog. [View full size image] | 3. | The Parameter Wiring dialog is modeless; while it is still open, you can scrub the Time Slider to evaluate the results of your wiring. The immediate result is that the shake effect is gone because the default value of the slider, which now corresponds to the weight of the Noise Controller, is 0. | 4. | To give a nice, subtle effect, change the code in the lower right pane (labeled Expression for Dummy_launchpoint's Weight_Noise_Position) to this: value/100
| 5. | Close the Parameter Wiring dialog and use the Select and Manipulate tool to drag the slider's Adjust Value indicator toward the right, to its maximum value of 100. When you scrub the Time Slider, you should now see the rocket and its parent Dummy shake slightly. Return the slider value to 0, and exit Select and Manipulate mode. |
Adding Particles It seems reasonable that this pre-launch shaking would be accompanied by some smoke. Fortunately, a particle system has been provided for just this purpose.
1. | Press 6 to open Particle View (Figure 14.55).Figure 14.55. Particle View.
If you're unfamiliar with Particle Flow, the event-driven particle system included with 3ds max, this schematic may seem a little complicated. Basically, it represents a flow of particles from a Particle Flow source iconChapter 18. | 2. | At this point, the particle flow is turned off, as evidenced by the darkened light bulb in the title bar of the first event (titled PF Source 01). Click the light bulb to turn it white and activate the particle flow. Scrub the Time Slider to see a stream of smoke particles being emitted from the rocket (Figure 14.56).Figure 14.56. Smoke particles are emitted from the rocket. [View full size image] Let's wire the slider into a couple of parameters in this particle flow, so that, as the pre-launch shaking increases, the particles will get faster and disperse more widely. | 3. | Close Particle View and go to frame 0 (making particle flow edits at frame 0 increases viewport response). | 4. | Select the slider, and as before, in the right-click menu, choose Wire Parameters > Object (Slider) > value. Choose PF Source 01 as the target, going to Object (PF Source) > Smoke Trail > Speed 07 > Speed. | 5. | Set the control direction from the slider toward the PF Source, using the following code in the pane labeled "Expression for PF Source 01's Speed": Value/10+15
| 6. | Click the Connect button to activate the expression. This expression will maintain the smoke particles' original speed of 15 and add a value equal to one-tenth the slider's setting, giving a top speed of 25 when the slider is at 100 percent.Note | Once a Particle Flow parameter has been wired to a manipulator, it is no longer directly editable in Particle View. This holds true for any value that is controlled by a manipulator. |
| 7. | We'll also use this slider to control how widely the particles are dispersed. Wire the slider to the PF Source icon again, this time wiring to Object (PF Source) > Smoke Trail > Speed 07 > Divergence. Use the following code for the Divergence parameter: Value*1.8
As the slider's value increases from 0 to 100, the angle of particle dispersion will ramp up from 0 to 180 degrees. |
Animating Sliders Now that we've set up the controls for this slider, let's get some use out of it by animating its value.
1. | Go to frame 10, turn on Auto Key mode, and activate Select and Manipulate mode. Drag the triangle handle on the slider until the value reads 70.0. | 2. | Go to frame 40, and increase the slider value to its maximum setting of 100.0. | 3. | Go to frame 41 (the first frame when the rocket is no longer attached to the planet), and decrease the slider setting to 0. Turn off Auto Key mode.If you scrub the Time Slider, you will see that smoke particles are emitted more widely, and with greater speed, up to the moment of launch. We'll now create a second slider to control the rocket's flame. | 4. | Select the original slider and make a Clone of it, using Copy as the method. Rename the new slider Slider_flame_strength. In the Modify panel, change its Label to "flame strength". | 5. | Manipulators cannot be moved in the viewport using the standard Move tool, but the slider's viewport coordinates are available in the Modify panel. The X Position and Y Position values measure distance from the upper right corner of the viewport, so increase the Y Position value until the new slider is moved below the original (Figure 14.57).Figure 14.57. Use the new slider's Y Position value to move it in the viewport. [View full size image] | 6. | Obviously, we don't want the same keyframes, so select all three new keys in the Time Bar, then right-click and choose Delete Selected Keys. Be sure to leave the key at frame 0 with a slider value of 0. | 7. | Wire this slider to the mesh used to represent the jet flame, named Rocket_flame, wiring to Transform > Scale > Z Scale (Figure 14.58). Be sure to indicate control direction using the correct arrow key and click the Connect button before closing the Parameter Wiring dialog.Figure 14.58. This expression will allow slider control of the flame mesh's length. [View full size image] | 8. | If you test the flame strength slider by going to approximately frame 50 and increasing its value to 100, you will see that the length of the flame goes right out of the viewport. Let's reduce the maximum range of this slider in the Modify panel by setting Maximum to 60. | 9. | This slider will also be used to control the brightness and range of the light attached to the rocket's jet. Go to Animation > Wire Parameters > Parameter Wire Dialog to reopen the dialog. | 10. | From the Parameter Wire dialog, select Slider_flame_strength, then go to the "value : Bezier Float" track in the left pane. Click the Find Next Parameter (binoculars) icon over the right pane to automatically bring up the parameter already wired to a slider. The first one selected will be the Weight: Noise Position parameter wired to the launch shake slider. You can use the same icon repeatedly to cycle through wired parameters.Note | The pop-up tool tip for the Find Next Parameter icon indicates that only parameters wired to the parameter already selected in the opposite pane will be found, but in actuality the results will include any wired parameter. |
| 11. | In the right pane, go to Objects > Rocket > Omni_rocketflame > Object (Omni Light) > Multiplier. | 12. | Connect the slider value to the light's multiplier, using the following expression: Value/60+1
This will give the light a minimum multiplier of 1.0, ranging up to 2.0 when the slider is at maximum. Don't forget to indicate the control direction and to connect the wire. | 13. | To connect the slider to the light's range, scroll down in the right pane to the Decay Falloff parameter. Wire the slider to this parameter as well, using the following expression: Value/6+30
| 14. | This will vary the light's range between 30 and 40 units. Close the Parameter Wiring dialog. Now let's animate the slider and see how it works. | 15. | Confirm that the flame strength slider is at 0. Turn on Auto Key mode, go to frame 20, and in the Modify panel, set Value to 15.Note | Sliders can be animated through the Modify panel without use of the Select and Manipulate tool. |
| 16. | Go to frame 43, just after the rocket launches, and increase Value to 32. Note how the rocket flame's length and the light's range increases with the slider. | 17. | Go to frame 47, and provide a big burst of flame by increasing the slider to its maximum of 60. Note that if you use the Modify panel to set a value greater than Maximum, the Maximum will be automatically increased. | 18. | Go to frame 60, as the rocket approaches the moon, and reduce the slider's value to a normal cruising value of 15. |
If you like, keyframe a few more rocket bursts by bracketing a value of 60 with a pair of keys set at 15. For example, to set up a burst around frame 100, when the rocket is passing in front of the moon, set the following keys:- Frame 100:
Value = 60 - Frame 93:
Value = 15 - Frame 105:
Values = 15 - Turn the Auto Key button off when you're done.
If you would like to compare your results with the author's, open the max file path_constraint_complete.max from the DVD. Manipulators can be powerful tools for simplifying your animations. Consider using them whenever you have several parameters that need to be animated in unison. |