Identify Design
100% Giraffe Approved
Tutorial Preview Avatar

Archive: Adding Animated Lightning to Images

Avatar of Woody


Friday May 22nd, 2009 in Photoshop Tutorials


This post is an archived post. This means it is old or has been archived for rewriting in the near future. Please be aware that the contents of this article or page may be out of date. If you need assistance be sure to leave comments and our community can help you.
In the previous two tutorials, Animate a Person with Rain and Lightning and Adding Animated Rain to Images, we showed you how to cutout any photograph and set it on a background, ready it for some animated storm effects and then add the animated rain in. In the final part of this series, we're going to add some animated lightning and make our person flash in time with the lightning strokes.

Creating the Lightning

Rather than create a lightning effect from scratch, we're going to use a stock photo of lightning. Sometimes, stock photography is the way to go, especially when trying to imitate real life effects. I will write a tutorial on how to create lightning from scratch in the future, but that's for a completely seperate tutorial. Anywho, I digress. Search online for a nice lightning photograph with a black or dark background and copy it into your image.

Paste this lightning layer below your cutout and rain layers and set it's blending mode to Color Dodge. If you used a large image, be sure to scale it down to a realistic level. Once you've sorted the lightning, your image should now look like this:

A bolt of lightning is now shooting across our sky.
We're now going to work on making this animated. We're not going to make it move. We're going to use a clever little trick to make it appear like it's moving, when in actual fact it's simply flashing. We need to duplicate our lightning layer four times. To do this, press CTRL &amp J. Once you've done that, it'll look pretty bad; but don't worry, only one will be visible at a time. The next few steps will refer to editing specific layers; hide all the others by clicking their eye icon when working on one layer.

Set the Opacity of the bottom lightning layer to 50%. Set the Opacity of the layer above it to 100%. Then with the last three layers, set their Opacity to 75%, 50%, 25%. If we made the animation now, our lightning would flash but would not appear to move. We're going to erase parts of the last layer to give our lightning a less stationary appearance. On the layer at 25% Opacity, erase the top half of the lightning, being creative with your brushstrokes as you reach the forks of the lightning. Use a smallish brush, about 30 in size, and make sure it's feathered. When you've erased this, it should look a little like this:

Our lightning should look faded.
On the layer set to 50% Opacity, repeat the above step but erase less of the lightning away. Use the same creative brushstrokes so that it looks a little like this when finished:
Our lightning should look less faded.
On the layer set to 75% Opacity, repeat the above steps but erase even less of the lightning away. Be sure to apply the same creative brushstrokes so that it doesn't look like somebody's erased half the lightning away. You can even add in your own little strokes for some creativity at this point. The layer at 75% should look like this:
Our lightning should look vivid at this point.
The only modification we'll do to the layer set to 100% Opacity is to erase it's edges slightly. When the Opacity is lowered, the edges of our image aren't visible. Since this layer is set to 100%, though, we can faintly see them. Take your eraser tool and erase along the edges to smooth it out a little.

Creating the Flash

Now we're going to create the flash that will light up our image in time with the lightning. It's similar to the lightning in the sense that we meddle with multiple layers and their opacity, but we're simply going to use a level layer mask at the top of our image and modify it's opacity per frame.

To create this, click the little half moon icon in the layers window on the top layer. From the drop down box, choose Levels. In the options that come up, enter Input Levels: 0, 1.00, 1.25 - Output Levels: 0, 255. With the Levels layer mask applied, all layers below it will be applied with this effect; an effect that will increase the vibrancy and brightness of our image. With this layer active and the 100% Lightning image visible, our image now looks like this:

Our layer mask makes everything more vibrant.
Whenever lightning strikes, the sky always lights up. Our Levels mask is raising the vibrancy already, but the sky itself isn't flashing. To fix this, we're going to add a gradient to the clouds. Create a new layer above the cut out of your person, but below the shadow used to darken them. We're going to set white as our foreground colour first; press D then X. D resets the colour palette and X swaps the colours round.

Select the gradient tool and choose the second type of gradient in the drop down menu; it should look like a white fading triangle. With this gradient selected, move your mouse cursor just below the top of the image and hold down the left mouse button with shift. Move the mouse to just below the lighter part of your image and let go. This will shade the top half of our image. It's too bright, however, so we'll lower the opacity of this layer. 50% is the perfect amount. Our image will then look like this:

With this gradient, the sky is a lot brighter all of a sudden:
Now Comes the Animation
With everything set, we're ready to animate out image now. We're going to apply the various opacity settings and visibility settings to the layers we've made to put this animated storm together. Once again, go to File -> Jump To -> Adobe Image Ready to switch back to Image Ready. The four frames we made before with the rain effect should still be there; create another 8 frames. This will give us plenty of room to work with our animation.

On frame five, set the first rain layer to visible and hide the rest. On the sixth frame, set the second layer of rain to visible and hide the rest, and on the seventh... and so forth. This will make sure our rain is still cycling whilst we create the lightning effect.

On frame five, we want to set the first lightning layer we made (the one at 50% opacity where we deleted none of it) and set it to visible. Make sure the rest are set to invisible. Also, hide the Levels layer mask we made earlier. On Frames 1-4, make sure that the lightning effect and every other effect is hidden. Now activate the gradient layer we made and set it to visible. Lower it's opacity to about 10%.

On frame six, hide the lightning layer we just used and activate / unhide the 100% opacity unedited one. Raise the opacity of the gradient layer slightly, and activate the levels layer mask we made earlier. Set this layer's opacity to about 50-60%. Ensure every other frame of our effect is hidden so it doesn't interfere with what we're making.

On frame seven, hide all lightning layers except the 75% one. Lower the opacity of the levels layer mask significantly and lower the opacity of the gradient as well. On my seventh frame, the gradient is set to 30% opacity and the Levels layer mask set to 35%. On the eighth layer, hide all lightning layers except the 50% and lower the opacity of the gradient again. Hide the levels layer mask; we won't be using this again.

When working with animations, try to avoid deleting layers at all times. Deleting a layer will delete that layer from all frames!
On the ninth frame, hide the rest of the lightning... etc, I'm sure we've established the pattern by now. Hide all of the lightning layers except the 25% one, lower the gradient a lot, to about 5-10%. The final three layers should be left alone; there should be a little period of time between the lightning otherwise it'll just continuously flash.

Sit back and enjoy pressing the play button. Your animation should cycle through. You'll see rain and a flash of lightning, and the sky and Sylar / your cutout should flash up. Pretty neat effect! That's the end of this tutorial. We've learnt how to (briefly) cutout a person from a photograph, add them to a dark and nighttime scene, prepare the background for our storm animation, create the rain, then add some lightning and a white flash to go with it.

This is obviously a tutorial, so I didn't create that epic an animation to go with this. With a lot of time and hard work, you can create some really astounding results with this technique. Just be sure to consider filesize whilst you're doing so, because it's always a factor! If you liked this tutorial, be sure to have a browse around our site. Plenty of excellent tutorials and links to help you further.

Leave us a comment with your results if you work through this tutorial, we would love to see your results. If you have any suggestions for improvements as well, be sure to add them!

Here's my final animation:

Animated Sylar Gif with Storm and Lightning

Leave a reply

You must be logged in to post a comment.