Create an Animated Flashlight Beam that Changes Shape

Posted on by Larry

Recently, I wrote a tutorial on how to create an animated flashlight beam (link) using Apple Motion. It was a good tutorial, with some interesting techniques.

However, it had a limitation that, unlike real life, the shape of the revealed area did not automatically change as the light moved around. In real life, as you pan a flashlight, the shape of the beam changes, depending upon where you point it. Circles become ovals and the aspect ratio of the oval varies.

The way to fix this, as Mark Suszko suggested, was to convert the Motion project to 3D and animate it. So, this afternoon, pressed by the need to write a tutorial for my newsletter, I did. And, surprisingly, it isn’t that hard to do and yields very believable results.


(Click to see larger image.)

Here’s where we are going: a 12-second animated clip of a flashlight beam exploring Ta Prohm, an ancient (1186 A.D.) monastery in Siem Reap, Cambodia. That, you may know, is the location where parts of  “Lara Croft: Tomb Raider” (2001) were shot. It is a stunning, amazing place to visit.

The cool thing about this effect is that you can build it from a still, yet make it look animated. Even better, you don’t need to fly to Cambodia.

This effect is built in three phases:

PHASE 1
GET STARTED

Create a new Motion project. To make the math easier, I’m using 30 fps, but you can pick whatever frame rate and frame size you want for your project. Because of the number of moves this makes, I’m using a duration of 12:15. Again, you can pick whatever duration you need.

This step isn’t required, but to help me keep track of what I’m doing, I created markers (shortcut: M) in the Timeline panel to indicate where animation starts and stops.

PHASE 1
IMPORT THE BACKGROUND IMAGE

Here’s the background image that we will illuminate: the Hall of Dancers of Ta Prohm.

Historical Notes: This entire monastery was built without mortar. More than 12,500 people lived on site, while it took 80,000 people to provide services and supplies. It was abandoned in the 15th century. At its height, it spread across about 650,000 square meters (1/4 square mile).

In the Inspector, notice three settings: Position, Scale and Opacity. All will be important later.

NOTE: Your settings will be different, depending upon your background image. However, these three settings will be important no matter what size image you import.

In the Layers panel of the Project pane, rename the Group containing the image to Background. (Not required, but very helpful.)

NOTE: If the Layers panel is not visible, click the Project Pane button so it turns blue (left red arrow), then click the Layers text button (right red arrow) so it also is blue.

CREATE THE FLASHLIGHT BEAM

To create a shape that changes as we move, we need to add a light; separate from the Background group.

From the menu bar at the top, choose Object > New Light (shortcut: Shift + Cmd + L).

Lights require Motion running in 3D. So, In this dialog, click Switch to 3D.

The light settings all depend upon what you want the light to reveal. For this tutorial, the settings I changed were:

Light type: Spot (Spot gives more control than Point, though Point will work)
Color: Warm white (because, why not?)
Falloff: 5%
Cone angle: 32° (Controls the size of the beam)
Soft edge: 30° (Controls how soft the edge is)

To get an oval shape, we need to move the light low so it shines up. Change Position: Y so the beam sits on the bottom edge of the frame, or, for a more exaggerated effect, even lower.

Thusly – the first phase is done.

PHASE 2
ANIMATE THE BEAM

We use keyframes to animate the beam, as though it was exploring the space. To keep timing consistent, I created the following markers:

1:00: Tilt up starts. This means for the first second the light is visible, but not moving
2:15: End of tilt and hold for one second
3:15: Pan right
5:00: End of pan and hold for one second
6:00: Pan left to center
7:15: Keep panning left (this keyframe could be replaced by a curved path)
9:00: End of pan left and hold for one second
10:00: Pan center
11:15: End of pan and hold till end

Move the playhead to the start of the timeline, then type Option + Cmd + right arrow. This jumps to the next marker at 1:00. (Type Option + Cmd + left arrow to jump to the previous marker.)

Be SURE the light is selected in the Layers panel, then set keyframes for Properties > Position X & Y. Adjust both X & Y positions so the light is positioned exactly where you want it to start.

Move to the next marker (2:15) and adjust the X and Y position so it reveals where you want the beam to pause for a second. Once you set keyframes for a parameter, every time you change that setting, new keyframes are created automatically.

Move to the next marker (3:15) and set keyframes without changing anything. This causes the animation to pause without moving the light.

Move to the next marker (5:00) and move the light to where the pan right ends.

Move to the next marker (6:00) and set keyframes without changing anything. This again causes the animation to pause without moving the light.

(Click to view larger image.)

By now, you are seeing a red “trail” in the Viewer, showing the path the light will follow – red lines – and keyframes – small white shapes.

Repeat this process of moving to the next keyframe and either repositioning the light – causing it to move – or simply creating new keyframes – causing it to pause.

Here’s what my finished track looks like.

Play the timeline and tweak keyframe values as necessary.

NOTE: Normally, the middle keyframe on the pan left would not be necessary – and the pan would be smoother – if you used a curved motion path. However, I have not found a way to create curves when creating a motion path for a light. Images, yes. Lights, no.

In my case, the Ease-In/Ease-Out settings are causing the light to curve in strange ways.

Go to the Timeline panel, click the blue diamonds icon to reveal keyframes (red arrow)…

Then:

There’s no “right” answer, pick the option that works for you. Setting Interpolation to Linear removes all curves between keyframes.

PHASE 3
ADD BACKGROUND

The good news is that though somewhat persnickety, creating this so far isn’t too hard. The bad news is that everything outside the light is really, really dark. Like black.

This points out an advantage of “node-based” effects vs. “layer effects.” If this used nodes we could attach a downstream node and say: “Add background.” But, Motion uses layers – like Photoshop – and we can’t. But there is a simple fix.

After we make sure everything looks and moves the way we want, choose Share > Export movie. This will “bake in” our lighting effect into a stand-alone movie.

NOTE: Be sure to use ProRes 4444. This assures that colors are precisely accurate.

Once exported, create a new Motion project – same frame size, frame rate and duration – and import the movie we just exported.

Once the movie is imported and properly centered (Position X & Y = 0), import the original background image.

Remember those Position properties we set when we first imported that image? Exactly match them to this imported image, EXCEPT set Opacity to 6%. This dims the rest of the image making it look like we are in a dark tomb.

Play your video and admire your work.



Bookmark the permalink.

2 Responses to Create an Animated Flashlight Beam that Changes Shape

  1. mark suszko says:

    Glad you tried my suggestion! Once you get into 3D lighting of 2D scenes in Apple Motion, it’s like eating potato chips. You have so many free instruments available, the PAR cans are invisible, and there’s no clunky stands or grids in the way.

    I am pretty sure you can also add canned behaviors to the lights from the ones Motion provides for other objects and CG builds. You can also make cookies and gobos from 2D shapes and stick them in the beam using groupings to create things like a Bat Signal effect. You can also use this trick to supplement your scenes shot at NAB if the lighting there goes bad for some reason.

Leave a Reply

Your email address will not be published. Required fields are marked *

Everything You Need to Know


2,000 Video Training Titles

  • Apple Final Cut Pro
  • Adobe Premiere Pro
  • DaVinci Resolve

Edit smarter with Larry Jordan. Available in our store.

Access over 2,000 on-demand video editing courses. Become a member of our Video Training Library today!


JOIN NOW

Subscribe to Larry's FREE weekly newsletter and
save 10%
on your first purchase.