Exercise 11: A flash and a jolt
Purpose. To make the explosion of Exercise 10 flash the screen and shake the camera.
Fire and smoke are things in the world. A strong explosion is also felt: the picture whites out for an instant and the view jolts. Neither is a particle that travels. One is a screen effect, the other moves the camera. Both are made, timed and fired like any other emitter.
Before starting
Section titled “Before starting”The Explosion folder from Exercise 10 is in the workspace. Add two things to it, in the Explorer:
- A new ColorCorrectionEffect, named
Flash. It can stay in the folder. It does not need to be in Lighting. - A new ordinary Part, named
Jolt, placed at the centre of the explosion.
Procedure
Section titled “Procedure”Steps 1 to 4 repeat earlier exercises on a new kind of emitter.
| Step | Control | Action | Result |
|---|---|---|---|
| 1 | Flash | Select, then press Transform | The Properties panel shows the sections of a ColorCorrection emitter, with Emission and Appearance open. |
| 2 | Properties ▸ Appearance ▸ Brightness ▸ ⋯ | Press. Double-click the left-hand keypoint, enter 0.5 for Value. Press Apply. | The graph falls from 0.5 to 0. |
| 3 | Properties ▸ Emission ▸ Lifetime | Enter 0.2 | No change yet. |
| 4 | HUD ▸ Emit button | Press | The whole viewport brightens and returns to normal within a fifth of a second. The Emit box already reads 1. |
| 5 | Jolt | Select | The Transform button appears, with a small ▾ button beside it. |
| 6 | ▾ ▸ Transform as Camera Shake | Press ▾, then click the entry | Jolt turns invisible. The Properties panel shows the sections of a Camera Shake, with Emission and Shake open. The Emit box reads 1. |
| 7 | HUD ▸ Emit button | Press | The viewport shakes at full strength for half a second and stops dead. |
| 8 | Properties ▸ Shake ▸ Amplitude ▸ ⋯ | Press. Set the left-hand keypoint to 2 and the right-hand keypoint to 0. Press Apply. | No change yet. |
| 9 | Properties ▸ Shake ▸ Falloff | Enter 80 | No change yet. |
| 10 | Explosion | Select, then press Emit on the HUD | Fire, smoke, flash and jolt play together. The shake starts hard and dies away. Seen from farther off, it is weaker. |
What the steps did
Section titled “What the steps did”A ColorCorrection emitter makes a short-lived duplicate of the effect and runs its graphs over the Lifetime. Its four rows are Brightness, Contrast, Saturation and TintColor. Each starts at the value the effect had when it was transformed. Brightness, Contrast and Saturation can go below 0 as well as above it.
Transform as is the list behind the ▾ button. It shows only when the selection includes an ordinary Part that has not been transformed. It turns a Part into one of five special emitters. The Part becomes an invisible marker for where the effect comes from.
A Camera Shake creates nothing in the workspace. It moves the camera for its Lifetime and puts it back exactly where it would have been.
| Row | Unit | What it sets |
|---|---|---|
| Amplitude | Studs | How far the camera is pushed, over the life of the shake. The push at any instant is up to about half the value. |
| Rot. Amplitude | Degrees | How far the camera is tilted. It starts at 0.6. |
| Frequency | How fast the shake wobbles. 10 is a nervous rumble, 2 a slow sway. | |
| Falloff | Studs | The distance from the marker at which the shake has faded to nothing. At 0, the shake is felt at full strength everywhere. |
With Falloff at 80, the shake has full strength at Jolt, three quarters at 20 studs, half at 40 and none from 80 studs outward.
Several shakes at once are added together.
If the result differs
Section titled “If the result differs”| Symptom | Cause | Action |
|---|---|---|
| No ▾ button at step 5 | The selection has no ordinary, untransformed Part in it. | Select Jolt alone. |
| Nothing flashes at step 4 | The Emit box reads 0. | Enter 1. |
| The flash ends with a jump | The Brightness graph does not end at 0. | Set the right-hand keypoint to 0. |
| The viewport stays bright | Linger holds the last frame, or Enabled is on. | Set Linger to 0 and switch Enabled off. |
| The shake is the same at any distance | Falloff is 0. | Repeat step 9. |
| The flash and the jolt do not fire with the rest | They are not inside Explosion. | Drag them into the folder. |
Variations
Section titled “Variations”| Change | Result |
|---|---|
Transform a BlurEffect, Size graph from 20 to 0, Lifetime 0.3, Emit 1 | The view blurs at the blast and sharpens again. |
On Flash, a Saturation graph from 0 to -1, Mode Animate, Linger 2 | The colour drains from the view and stays grey for two seconds. |
On Flash, a TintColor gradient from orange to white | The flash is tinted like firelight. |
On Jolt, Rot. Amplitude 2 | The view also rocks from side to side. |
On Jolt, Mode Animate, Loop on, Amplitude 0.15, Frequency 18, Falloff 40 | A steady engine rumble, felt only near the marker. |
On Jolt, HUD ▸ Delay 0.1 | The jolt arrives a moment after the flash. |
| New in this exercise | A ColorCorrection emitter. Transform as. Camera Shake: Amplitude and Falloff. |
| Done before | Transform (seven times). A graph that falls to 0 (Exercises 4, 5 and 8). Lifetime (Exercises 2, 6, 9 and 10). The Emit box and button (Exercises 3, 6, 8, 9 and 10). A Folder fired as one (Exercise 10). |
| Carried forward | Keep Explosion. |