star trail stacking in photoshop


I have always wanted to do this kind of photography, but with most digital cameras there is simply no way you can leave the shutter open and the sensor on for a few hours. My D40 starts to get some serious noise after a few minutes, and there clearly must be an upper limit due to the sensor overheating. Luckily for me there is a relatively simple way to compose LOTS of shots into one image and achieve the same effect.
For those who only want to mile high review of it, here it is. Take a ton of pictures with a long-ish shutter speed. (for this one I used 10 seconds) and then layer them all in photoshop on top of each other and use the
“screen” blending mode to get them all visible.
The actual application of this can be difficult, because it is either REALLY time consuming, or it requires some thought and scripting. I decided to go for the latter and use my noggin a bit.

Scripting a photoshop action.

This section will deal with the photoshop side of things

In Photoshop (I’m using cs3, but this will work in any modern version) go to Window > Actions. This will bring up the actions menu palette. Actions are photoshops way of automating specific things multiple times, or across a broad number of documents. They have their limitations, but they can be amazingly timesaving when they work out.

Now we are going to record an action. First, open up a copy of two files. You can pick a copy of two you will be working with, or any other two files. It does not matter. Click on the “new action” icon at the bottom of the action window. It looks like a piece of paper with a corner folded up. Name the new action “Star trail stacker” and click through the dialogs.
Here is where it gets tricky, so follow along exactly as I say.
Click on “Select > All
Click on “Edit > Copy
Click on “File > Close
Click on “Edit > Paste
Go into the layer window, and click on the blending mode pulldown at the top. It defaults to “Normal” Change it to “Lighten”
Click the square icon in the bottom left corner of the action window. This will stop the action recording session.
If all went correctly, your new action should look similar to this.
star trails script

If we stop here you can run this script through photoshop, but it isn’t very useful. To make it more useful we will create a droplet out of it.

In photoshop, click on “File > Automate > Create Droplet
This will bring up a menu window asking you a few things. Save the droplet wherever you feel like. Select the action you just created (probably named “star trail stacker”) and then hit ok.

If you have followed me this far – congrats, you are done! Now you just need to know how to use this droplet. Start by opening the first frame of your timelapse in photoshop. Now open up the window that has all the rest of your frames in the finder, and drag them onto the droplet you just created.
What this script will do is to open them up, one by one and paste them on top of the previous frame as a layer, then change the blending mode to screen.
What this script won’t do. It won’t flatten the image for you, so it will result in a huge, slow photoshop file if you have a lot of images. I created a few hundred layer psd on my macBook testing this, and it slowed it down a lot. If you ‘cut’ your files into batches and then save out a flattened version with a few hundred pictures in it, your processor will thank you!
This script is really just the jumping off point for a ton of other automation you can do. I have used it to stack image sequences into layers so I can “stitch” rally cars and snowboarders into sequences. Use your imagination and photoshop actions can be amazingly powerful, and they can enable you to do things faster than ever before.
Let me know in the comments if you find an interesting use for this!

13 Responses to star trail stacking in photoshop

  1. Pingback: 26 « October « 2009 « </Open Tag

  2. I must have missed a step or something, because my 60 images stacked together resulted in an almost totally white image. Help!

  3. Hi Richard!
    I think if you are having trouble it could be two different things. You either might have the blending mode wrong, or you could simply have too much light in your shots.
    For the first one, check your blending mode on each layer, and try other modes to see if you get a better result. For the second one create an adjustment layer and tweak the brightness / contrast curves for the entire file. Good luck!


    hmmm… one more thing: I just reread my instructions and they say to select “screen”, but the picture shows “lighten” Try both. I don’t have anything I can test with right now.

  4. Excellent. If you have CS3 or 4 Extended there’s some built in magic called File>Scripts>Statistics. Works great,

  5. Pingback: Automated Stacking of Star Trails in PS CS5 | Star Circle Academy

  6. In CS4 after I add Edit>Copy and then File>Close the next action Edit>Paste is not a possibility (Paste is shadowed in Edit menu). When I duplicate the files in each respective layer, however, all works ok. Thanks for tip!

  7. Pingback: Comet like Star Trails – Kingham Photography - Fine Art Nature Photography

  8. Thank you so so so so much!!! This walked me through the impossible Photoshop! Well done!!
    God Bless,
    Sam Glover