Smoke Creating smoke is similar to creating fire, with the differences being primarily in the animation speed of materials, the influence of outside forces on the smoke path, and the delay before the effect fades away. The first smoke effect we will create is a distinct trail to mark the biplane's demise.Smoke Trail One of the most important explosive effects in a doomed biplane, as anyone familiar with air battles in vintage war movies knows, is a long trail of billowing smoke. As this effect is similar to the fire effect, we will start with a copy of the fire particle setup.
1. | Clone the Flames birth event, using Copy as the method; name the new event Smoke; and wire it to the Lightning Strike global event. | 2. | Set the Birth Amount to 1. | 3. | Reclone the Script test from Flames to Smoke, using Instance as the method this time, so that your flexibility in updating the script is retained. | 4. | Create a new Spawn test event below Smoke, naming the new event Spawn Smoke. Wire it to the Script test's output. | 5. | Set it to spawn according to how far the particle has traveled by turning on By Travel Distance, with a Step Size of 500 units (one particle emitted per 500 units traveled). | 6. | Set the Speed Variation to 20% and the Divergence to 80 degrees. | 7. | Copy the Position Icon operator from Smoke to maintain the particle emission from the moving source.We won't need any smoke particles to stick with the biplane, as we did with the fire, since smoke emanates from a source and usually doesn't contain an anchored element. | 8. | Create a new Shape Facing operator event below Spawn Smoke, name the new event Smoke Trail, and wire it to the Spawn test. | 9. | Assign the camera as the Look At Camera, and set the size to 2000 units in In World Space. | 10. | To give the smoke particles some momentum away from the emitter, add a Speed operator, set to a Speed of 150 units, with a Variation of 50. | 11. | Finally, add continuous rotation with a Spin operator. Set the Spin Rate to 180 degrees (one full rotation every 2 seconds), with a Variation of 50 degrees. | 12. | Set the Spin Axis to Particle Space. By default, only the Z axis is set to a non-zero value, meaning that the Shape Facing particle will only be rotated around its local Z axis. This way, its facing orientation toward the Look At Object will not change. | 13. | Append a Send Out test to Smoke Trail. | 14. | Create a new Scale operator event below Smoke Trail, name the new event Smoke Fade, and wire it to the Send Out test's output. | 15. | Set the scale type to Relative Successive, with all three factors set to 99.7%. | 16. | Add a Material Dynamic operator and assign the Smoke Trail material to it. | 17. | This material uses particle age to determine opacity and color, so provide a life span by appending a Delete operator to Smoke Fade. | 18. | Set the Delete operator to remove particles according to age by turning on By Particle Age, with a Life Span of 100 and a Variation of 10. | 19. | Change the Display type to Geometry (Figure 18.40).Figure 18.40. The completed smoke-trail particle setup. [View full size image] |
The biplane will now leave a smoke trail behind it, which will shrink and change appearance over time (Figure 18.41). The trail will not, however, leave the flight path of the biplane. Next we will add a crosswind effect to gently blow the smoke around a bit.Figure 18.41. The completed smoke-trail effect.
 Blowing Smoke In this section, we'll apply space warps to the smoke trail to give the appearance that it is being dispersed by a wind. Even a subtle wind effect can add a nice touch of realism, without which the smoke trail would appear starkly linear and symmetrical.
1. | Go to a Top viewport and create a Drag space warp (Create panel > Space Warps > Forces) (Figure 18.42). The location of the space warp is not significant.Figure 18.42. Create a Drag space warp to slow down particles over time (shown with the Modify panel open). [View full size image] The Drag space warp is very useful for adding a realistic element to the motion of particles that experience inertia. Particles simulating smoke, fog, dust, and expanding debris usually lose momentum over timean effect easily created with Drag. | 2. | Set the Time Off to frame 400. This simple step is often overlooked. | 3. | Set the X-, Y-, and Z-axis Linear Damping percentages to 15%. | 4. | Still in the Top viewport, create a Wind space warp.The Wind space warp applies directional force to particles and is particularly useful when a turbulent motion is required. | 5. | Increase its Strength to 3. | 6. | To give the effect greater chaos, increase Turbulence to 3 and Frequency to 15 (Figure 18.43).Figure 18.43. Create a Wind space warp to give the particles a turbulent push. [View full size image] | 7. | Point the Wind space warp across the camera plane by rotating it, in the Top viewport, 30 degrees on its View Y axis and 40 on its View X axis (Figure 18.44).Figure 18.44. Rotate the space warp so that its push will angle across the camera's picture plane. [View full size image] | 8. | To apply these forces to the smoke trail, go to the Smoke Fade event in Particle View and insert a Force operator before the Delete. | 9. | Add Wind01 and Drag01 to the Force Space Warps list.Before applying these two forces, the smoke trail is perfectly even (Figure 18.45), but with Wind and Drag turned on, a nice random element is added (Figure 18.46).Figure 18.45. Without randomizing forces added, the smoke trail is smooth and even. [View full size image] Figure 18.46. The addition of Wind and Drag forces makes the smoke trail appear more natural and broken up. [View full size image] |
Even with turbulent dispersal, the smoke trail is still fairly contiguous. In the next section, we'll break up the trail even more by manually selecting particles to be removed from the effect.Particle Selections One of the more interesting, albeit limited, features of Particle Flow is the ability to select particles in a viewport, either by manual selection or by event, and to pass that selection to a test operator. This allows you to interactively choose particles based on their position in a scene and have them treated specifically by Particle Flow.
1. | The process of particle selection can be fairly CPU intensive, so turn off the Sparks, Scorch, and Flames birth events in Particle Flow. | 2. | In the Top viewport, go to frame 400 and zoom in on the smoke trail. | 3. | To make the particles easier to select, change their Display type (in Smoke Fade) to Asterisks. | 4. | Select the Lightning Strike source icon, and click the Particle button in the Selection rollout to activate selection by particle (Figure 18.47).Figure 18.47. Zoom in on the smoke trail to prepare to manually select particles. [View full size image] | 5. | Use the Lasso Selection Region tool or Rectangular Selection Region tool to randomly select particles along the smoke trail. Given that the scene is at frame 400, the selection process may not be very responsive (Figure 18.48).Figure 18.48. Selected particles are highlighted in the viewport, and the total number selected is reported at the bottom of the Selection rollout. [View full size image] | 6. | Return to Particle View and insert a Delete operator in Smoke Trail, just before the Send Out test.Tip | Selected particles can be directed to events using the Split Selected test, which tests true only for selected particles. |
| 7. | Set it to remove Selected Particles Only. The particles selected in the viewport are deleted (Figure 18.49). Note that particle selection is limited to one selected per source icon; multiple selections cannot be made and passed to Particle Flow.Figure 18.49. With a selection of particles deleted, the smoke trail appears more broken up, as shown in the Camera viewport.
 | 8. | Exit Particle selection mode, change the Smoke Fade display type back to Geometry, and turn the Sparks, Scorch, and Flames birth events back on (Figure 18.50).Figure 18.50. The final particle setup for the lightning strike's subsequent effects. [View full size image] | 9. | Now that the particle setup for the lightning strike is complete, this is a good time to apply a cache, so copy the Cache operator from Lightning03 to the Lightning Strike global event and update it. You may find it necessary to increase the amount of memory available to the Cache operator due to its complexity. This Memory Limit setting is available at the bottom of the Cache operator rollout. By default, 100,000 kilobytes of memory are set aside. If you run out of memory, try increasing this value to 150,000. |
The Particle Flow setup for the explosive effects triggered by the lightning strike is now complete. We have a fully parametric lightning strike, which can occur at any arbitrary keyframe; and sparks, smoke, fire, and scorch marks will be automatically generated.Up to this point, scripting and collision have been used to control Particle Flow based on scene objects or scene time. In the next section, we will instead animate scene objects from a Particle Flow script. |