1. User guide
  2. Stack

Stack Frames

Chapter 6 of 19 12 min read6 screenshots

Chapters6 of 19
On this page7 sections
  1. Before you start: lights and darks
  2. Start a stack
  3. The Stack Frames dialog
  4. While it runs
  5. Where the result goes
  6. Fix the sky mask later and restack
  7. Tips for shooting a stackable set

Stacking is the heart of a clean nightscape, whatever stacking software you use. One frame at a high ISO is noisy. Average fifteen or twenty of them and the noise drops away while the stars and the Milky Way stay.

The catch is that the sky moves between frames and the ground doesn't. NightScape Lab handles both:

  • The sky is aligned on its stars, so the stars stay points.
  • The ground stays where it is, so the foreground stays sharp.
  • An AI sky mask decides which pixels are sky and which are ground.
  • Your dark frames are subtracted, which takes out hot pixels and the camera's own thermal noise.
  • Satellite and plane trails are removed, along with anything else that shows up in only a frame or two.

The result is one base image. It opens in Process, where you run the NightScape tools and make a few basic changes before you send it on to Lightroom or Photoshop.

Shortcuts on this page are written the Mac way. On Windows and Linux, use Ctrl where you see Cmd and Alt where you see Opt.

Before you start: lights and darks

The stack needs to know which frames are lights (your photos of the scene) and which are darks (frames shot with the lens cap on, at the same settings). Import sorts them for you. If a dark came in marked as a light, select it and choose Photo > Frame Type > Dark Frame, or right-click it and use Frame Type there. Light Frame in the same menu turns it back. Frames: Sorting Your Shots covers this in more detail.

Rejected frames are always left out, so flagging a bad frame as rejected (X) is the quickest way to keep it out of a stack.

Two commands in the Frames menu save a lot of clicking: Select All Light Frames and Select All Dark Frames. They select from the photos showing, so open the night's folder first.

Start a stack

  1. In Frames, select the light frames you want to stack. Select their darks too if you have them.
  2. Choose NightScape > Stack Frames… or press Opt+Cmd+S (Ctrl+Alt+S on Windows and Linux). You can also right-click one of the selected photos and choose Stack Frames….
  3. Check the dialog, then click the Stack button at the bottom.
The NightScape menu
The NightScape menu holds every way to build an image, with the Process tools in a submenu.
Stack Frames dialog with light and dark counts, rejection, and stack options.
The Stack Frames dialog: the summary line, the Rejection slider, the Sky mask section and the Stack button.

The Stack Frames dialog

The summary line

The first line tells you what the stack will take, for example "116 light frames and 40 dark frames from the selection (rejected frames are left out)."

The frames go into the stack in the order they were shot, earliest first. The stack lines up every light to the first one.

RAW frames and other files

A stack of RAW frames takes only RAW frames. If the selection also holds JPEG, TIFF or PNG files (the JPEG half of a RAW+JPEG pair, say), the dialog leaves them out and names them once: "Left out, as the RAW stack can't take them: …". You don't have to deselect them.

A selection with no RAW files in it can still be stacked. TIFF, JPEG and PNG frames stack pixel for pixel, so they all have to be the same size. If they aren't, the dialog lists the sizes it found and says "Select frames of one size to stack them." The Stack button stays off until they match.

The darks question

If you haven't selected any darks, the dialog asks: "No dark frames are selected. Do you want to add darks?"

NightScape Lab then looks through the catalog for darks that were shot with these lights. A dark counts when it matches the lights on all of these:

MatchWhat it means
FolderIt's in the same folder as the lights.
ExposureSame shutter speed.
ISOSame ISO.
LensSame lens (a dark with no lens recorded isn't ruled out).
Frame sizeSame width and height, so darks shot in one orientation aren't offered to frames shot in the other.
TimeShot within an hour before the first light or an hour after the last.

Darks you've rejected are never offered.

If it finds some, it names them (for example "15 dark frames were shot with these lights: _DSC6351 to _DSC6365.") and shows an Add them checkbox. The box starts unticked. The darks are only used if you tick it, and the summary line and the Stack button show the dark count change when you do.

If it finds none, it says "Select them with the lights to use them." Cancel, select your darks along with the lights, and open the dialog again.

Frames that don't fit this stack

With three or more lights, the dialog checks for frames that don't belong with the rest:

  • A frame much brighter or darker than the others (about a stop, judged from its thumbnail). A twilight frame at the start of a run is the usual one.
  • A frame shot more than five minutes away from the main run of frames.

When it finds any, one orange line appears, for example 83 frames don't fit this stack. Click it to open the list.

The warning opened. Each frame has its reason and a checkbox. Ticked means it stays in the stack.

Each frame is named with its reason, for example "_DSC6175.ARW is much brighter than the others and was shot 32 minutes before them." The stack lines up and level-matches every light to the first one, so a frame like that can tint the base image or leave an edge that only some frames cover.

Every frame in the list starts ticked, which means it's still in the stack. Untick a frame to leave it out. Leave All Out unticks the whole list and Keep All ticks it again. The light count in the summary line and on the Stack button follows the boxes.

While any of those frames is still in, a second line stays under the warning: "They're still in the stack and probably shouldn't be". That's the app telling you plainly. It's still your call, and sometimes the frames are fine.

Leaving a frame out only affects this stack. The photo itself doesn't change, and the list starts over the next time you open the dialog.

Rejection (sigma)

OptionRangeDefault
Rejection (sigma)1.5 to 5.03.0

Pixels this many standard deviations away from the rest are left out of the average. A lower number removes more satellites, planes and hot pixels. A higher number keeps more signal. 3.0 suits most stacks. Lower it if you can still see a trail in the base image. Double-click the slider's name to put it back to 3.0.

Remove satellite and plane trails

On by default. This takes the streaks satellites and planes leave out of the base image.

Sky mask: Preview Sky Mask…

The stack splits sky from ground with the AI sky mask. Most of the time it gets it right. When the horizon is tricky (trees against the Milky Way, a lit building, a reflection in water), it's worth checking first.

  1. Click Preview Sky Mask…. The dialog shows "Finding the sky on the first light…" while it works.
  2. The mask appears over the first light. Red is ground: it stays still. Clear is sky: it's aligned on the stars.
  3. To fix a mistake, set Brush to Sky or Ground and paint over it in the preview. Size sets the brush from 5 to 200 (it starts at 40). Set Brush back to Off when you're done.
Preview Sky Mask over a night landscape with red sky overlay before stacking.

The preview is the frame as my astro-modified camera shot it, which is why it looks red. A stock camera's frame won't. The previewed mask. Red stays still as ground. The rest is aligned as sky.

Once you've previewed a mask, the stack uses it in place of its own. If you change the selection so a different frame comes first, the preview is dropped, since it belongs to the old first frame. Closing the dialog drops it too.

The Stack button

The button names what it will stack, for example Stack 116 Lights, 40 Darks. After you preview a mask it reads Stack 116 Lights, 40 Darks with This Mask.

It stays greyed out when there are fewer than two lights, when TIFF or JPEG frames come in different sizes, while a mask preview is still loading, or while another long job (a stack, panorama, star trails or merge) is running.

Cancel closes the dialog without stacking.

While it runs

The stack runs in the background. Its progress shows in the bar at the top of the window (for example "Stacking 116 lights, 40 darks", the step it's on, a progress bar and the time so far) with a Cancel button if you change your mind. Cancel shows Canceling, and if the stack hasn't stopped within about 3 seconds, the app stops the engine. You can keep sorting and editing while it works.

Activity area at the bottom of the window showing a running job and its Cancel button.
A stack under way at the top of the window.

Where the result goes

When the stack finishes, NightScape Lab saves it beside the first light (the earliest frame) as <first light>-Stack.tif. For a stack starting at _DSC6175.ARW, that's _DSC6175-Stack.tif in the same folder. If that name is taken, it adds a number (_DSC6175-Stack-2.tif and so on). It never writes over an existing file.

The base image is named after that file everywhere in the app: the grid, the filmstrip, Edit In and Export. What went into it (for example "Stack · 116 lights, 40 darks") is kept in its Caption, where the Metadata panel shows it. It's listed under Base Images in the left panel of Frames.

It opens in Process

A finished stack opens in Process straight away, whichever module you were in, and a message says what went into it ("Stack finished: 15 lights, 15 darks"). The stack is built from the RAW data, so a white balance you set on the frames beforehand doesn't come with it. Set it on the stack, with Sky White Balance or in Basic. Frames stays where you were behind it (the import you were looking at, or the frames' folder) with the base image selected.

A finished stack open in Process
The base image in Process, with the NightScape group open on the right.

If you're in the middle of something when it finishes (a dialog is open, or in Process you have Crop or a brush in hand, or a tool is running on the photo in front), the app doesn't pull that photo out from under you. The bar at the top says the file is ready, for example "_DSC6175-Stack.tif is ready", with an Open in Process button beside it.

When the file can't go beside the frames

If the frames' folder can't take the file (a full or read-only disk, say), the base image stays in NightScape Lab's Renders folder inside the catalog, and the app's message says why. It's still named <first light>-Stack.tif in the app.

A stack that Lightroom Classic asked for (the plugin's Stack in NightScape Lab) also stays in Renders. Save to Lightroom writes the one file that goes beside those frames. See Edit In, Export and Lightroom.

Warnings

If the engine has something to say about the result (a mask that looks turned or flipped, for example), you'll see "The stack finished with a warning:" followed by the reason.

Fix the sky mask later and restack

You can go back to a stack's sky mask after it's done. Open the base image in Process and look for the Sky Mask panel on the right, under the NightScape group. It's there for any stack whose working files are still in the catalog's Renders folder.

The Sky Mask panel in Process
The Sky Mask panel with the overlay on. Red is ground.
  1. Open Sky Mask. It shows how many lights and darks the stack used.
  2. Tick Show overlay (O), or press O, to see the mask over the photo.
  3. Set Brush to Sky or Ground and paint over the mistakes. Size runs from 5 to 400 (60 to start). Picking a brush turns the overlay on for you.
  4. Click Restack with Edited Mask.

The brush takes the keys you know from Photoshop and Lightroom. [ makes it smaller and ] larger. The scroll wheel over the photo sizes it too. On a Mac, hold Control and Opt and drag left or right to size it by hand (on Windows, hold Alt and drag with the right button).

The restack uses the same frames and options as the first time, with your painted mask. The new pixels replace the photo's, and Restack with Edited Mask appears as a step in History. Any tool layers on the base image (from the NightScape tools) are cleared, since they were made from the old pixels.

Reset throws away your painting and goes back to the stack's own mask. Both buttons stay greyed out until you've painted something.

The restacked image lives in the catalog's Renders folder. The -Stack.tif file beside your frames stays as it was.

Sky / Ground

The same panel has a Sky / Ground adjustment under the mask controls. It uses the stack's sky mask to change the sky and the ground apart, with four sliders for each:

SliderRangeStarts at
Exposure-4.00 to +4.000
Temperature-100 to +1000
Tint-100 to +1000
Contrast-100 to +1000

It's a quick way to lift a dark foreground a little or cool the sky before you hand the photo off. Each move is a History step, and the adjustment is carried into your TIFF and PSD exports. Double-click a slider's name to put it back to 0.

Tips for shooting a stackable set

  • Shoot the lights back to back at the same settings. A pause of more than five minutes in the middle of the set gets flagged, because the sky has turned too far for every frame to cover the same edge.
  • Leave out twilight frames from the start of the night. They're too bright to level-match to the rest.
  • Shoot your darks right after the lights, with the lens cap on, at the same shutter speed and ISO. Done straight away, before the camera cools down, they match the lights' noise. Keep them on the same card so they import into the same folder, and they'll be found and offered when you forget to select them.
  • Fifteen to twenty lights is a good number. More helps, but each one adds less.