Starry Night Sky Effect With Photoshop CS6

Starry Night Sky Effect With Photoshop CS6

Written by Steve Patterson.

In this photo effects tutorial, we'll learn how to easily fill an empty night sky with stars using Photoshop CS6. This tutorial is also fully compatible with Photoshop CC (Creative Cloud). If you're using Photoshop CS5 or earlier, you'll want to check out the original version of our Starry Night Sky tutorial.

Capturing a star-filled night sky with our cameras can be tricky. Often there are other, brighter light sources nearby (like city lights), and of course there's the added problem of our planet refusing to play nice and stop spinning for us during the exposure. What we often end up with is either an interesting (but unwanted) star trail effect or a night sky filled with nothing but darkness. Fortunately, as we'll see in this tutorial, Photoshop makes it easy to add the stars into our photos later, with the additional benefit of being able to control just how "starry" the sky becomes. The result may not fool any astronomers or astrophysicists in the family, but considering that this same technique is often used to create star-filled backgrounds for movies, the effect is more than realistic enough to fool pretty much everyone else.

Here's the photo I'll be starting with (city at night photo from Shutterstock):

Cape Town harbor and city at night with moon in the sky. Image 59821666 licensed from Shutterstock by Photoshop Essentials.com
The original photo.

And here's what the final "starry night sky" effect will look like:

A starry night sky effect created in Photoshop CS6.
The final effect.

How To Create A Starry Night Sky With Photoshop

Step 1: Add A New Blank Layer

With our photo newly opened in Photoshop, if we look in the Layers panel, we see the image sitting on the Background layer which is currently the only layer in the document:

The Layers panel in Photoshop CS6 showing the Background layer.
The Layers panel showing the original image.

Let's add a new blank layer for our stars. Click on the New Layer icon at the bottom of the Layers panel (second icon from the right):

Clicking the New Layer icon in the Layers panel.
Clicking the New Layer icon.

Photoshop adds a new blank layer named Layer 1 above the Background layer:

A new blank layer appears in the Layers panel.
The new blank layer is added.

Step 2: Fill The New Layer With Black

We need to fill our new layer with black. For that, we'll use Photoshop's Fill command. Go up to the Edit menu in the Menu Bar along the top of the screen and choose Fill:

Selecting the Fill command from the Edit menu in the Menu Bar.
Going to Edit > Fill.

This opens the Fill dialog box. Change the Use option at the top of the dialog box to Black. In the Blending section in the bottom half of the dialog box, make sure Mode is set to Normal and Opacity is set to 100% (which they should be set to by default):

Changing the Use option to Black in the Fill dialog box.
Changing the Use option to Black.

Click OK when you're done to close out of the Fill dialog box, at which point Photoshop fills the new layer with black, temporarily blocking our photo from view:

The document after filling the new layer with black.
Filling the top layer with black hides the photo on the layer below it.

Step 3: Convert The Layer Into A Smart Object

In a moment, we're going to apply a couple of Photoshop's filters to this black-filled layer. But before we do, let's first convert the layer into a Smart Object. That way, our filters will be applied as Smart Filters, allowing us to go back and edit their settings later if we need to. With Layer 1 selected (it should be highlighted in blue), click on the small menu icon in the top right corner of the Layers panel:

The Layers panel menu icon.
Clicking the Layers panel menu icon.

Then choose Convert to Smart Object from the menu that appears:

Selecting the Convert to Smart Object command from the Layers panel menu.
Selecting Convert to Smart Object from the Layers panel menu.

Nothing will seem to have happened to the image, but a small Smart Object icon appears in the lower right corner of the layer's preview thumbnail in the Layers panel. This lets us know the layer is now a Smart Object:

The layer has been converted into a Smart Object.
Smart Objects are indicated by a small icon in their preview thumbnail.

Step 4: Apply The Add Noise Filter

We're ready to add our filters, and we'll start with the Add Noise filter. Go up to the Filter menu at the top of the screen, choose Noise, then choose Add Noise:

Selecting the Add Noise filter from the Filter menu.
Going to Filter > Noise > Add Noise.

This opens the Add Noise dialog box. The Add Noise filter basically adds a bunch of little white, single-pixel dots to the black-filled layer, and we control how many dots are added using the Amount value. Enter a value of around 25%. At the bottom of the dialog box, set the Distribution option to Gaussian and select the Monochromatic option, which will prevent any colors other than black and white from appearing in the noise:

The Add Noise filter dialog box in Photoshop CS6.
The Add Noise dialog box.

Click OK to close out of the Add Noise dialog box. Photoshop fills the layer with noise (random dots):

The image after applying the Add Noise filter.
The image after applying the Add Noise filter.

If we look back in the Layers panel, we see the Add Noise filter listed as a Smart Filter below Layer 1:

The Layers panel showing the Add Noise Smart Filter.
The Layers panel showing the Add Noise Smart Filter.

Step 5: Apply The Gaussian Blur Filter

Now that we've added some noise, we need to add a bit of blurring to it, which will make those single-pixel dots a bit wider and clump some of them together. We'll do that using Photoshop's Gaussian Blur filter. Go back up to the Filter menu, choose Blur, then choose Gaussian Blur:

Selecting the Gaussian Blur filter from the Filter menu.
Going to Filter > Blur > Gaussian Blur.

This opens the Gaussian Blur dialog box. We control the amount of blurring using the Radius value, and you can either enter a value directly into the Radius box or drag the slider along the bottom to increase or decrease the value. The value you'll want to enter here will depend on the size of your image. Generally, a Radius value of 2 to 6 pixels works best, with 2 pixels being ideal for small images and 6 pixels for very large images.

The nice thing is, since we're adding the Gaussian Blur filter as a Smart Filter, we can easily go back later and try a different value. I'm going to enter a Radius value of 3 pixels:

Setting the Radius value in the Gaussian Blur dialog box.
Setting the Radius value to 3 pixels.

Click OK when you're done to close out of the dialog box and apply the blurring effect to the noise. If we look again in the Layers panel, we see both the Add Noise and Gaussian Blur filters listed as Smart Filters below Layer 1:

The Add Noise and Gaussian Blur Smart Filters in the Layers panel.
Both filters are now listed as Smart Filters.

If you decide later on that you want to try a different Radius value for the Gaussian Blur filter, all you'll need to do is double-click directly on the words Gaussian Blur:

Double-clicking on the Gaussian Blur Smart Filter to re-open it.
Double-clicking on the Gaussian Blur Smart Filter.

This will re-open the filter's dialog box where you can enter in a different Radius value, again anywhere from 2 to 6 pixels depending on the size of your image. Simply click OK when you're done to close back out of the dialog box. You can do this as often as you like because Smart Filters in Photoshop are non-destructive, meaning no permanent changes are ever made to the image. Using Smart Filters with our effects make it easy to fine-tune them and get them looking just right.

Step 6: Add A Levels Adjustment Layer

Next, we need to brighten the lightest areas of our noise layer and darken the darkest areas. This will turn the faint, blurry noise into our stars. Press and hold the Alt (Win) / Option (Mac) key on your keyboard and click on the New Adjustment Layer icon at the bottom of the Layers panel:

Clicking the New Adjustment Layer icon in the Layers panel.
Clicking the New Adjustment Layer icon while pressing and holding Alt (Win) / Option (Mac).

Choose a Levels adjustment layer from the menu that appears:

Choosing a Levels adjustment layer.
Choosing a Levels adjustment layer.

Photoshop will pop open the New Layer dialog box. Select the Use Previous Layer to Create Clipping Mask option by clicking inside its checkbox. This will clip our adjustment layer to the noise layer below it, meaning that anything we do with the Levels adjustment layer will affect only the noise layer. The original image on the Background layer will not be affected. Click OK when you're done to close out of the dialog box:

Selecting the Use Previous Layer to Create Clipping Mask option.
Checking the Use Previous Layer to Create Clipping Mask option.

Photoshop adds the new Levels adjustment layer, named Levels 1, above the noise layer. It appears indented to the right with a small arrow pointing down at the layer below it. This tells us the adjustment layer is clipped to the noise layer:

Selecting the Use Previous Layer to Create Clipping Mask option.
The Levels adjustment layer (Levels 1) is added above Layer 1.

Learn how clipping masks work in Photoshop

Step 7: Adjust The White And Black Point Sliders

The controls and options for the Levels adjustment layer appear in the Properties panel. In the center of the panel is the Histogram, a graph showing us the current tonal range of the image (or in this case, the tonal range of the noise layer). Directly below the histogram are three little sliders. The one on the far left, filled with black, is the black point slider. The one on the far right, filled with white, is the white point slider. There's also a gray slider in the middle, but for this effect, we won't need to use it:

The Properties Panel in Photoshop CS6 showing the Levels adjustment layer controls.
The black point (left) and white point (right) sliders.

Click on the white point slider on the right and begin dragging it towards the left. As you drag, you'll see the lighter areas of the noise becoming brighter. Drag the slider all the way over to where the right side of the histogram begins. This will brighten the lightest areas of noise to pure white:

Dragging the white point slider towards the left.
Dragging the white point slider to the right side of the histogram.

Here's what my image looks like after dragging the white point slider to the left:

The image after adjusting the white point slider.
The lightest areas of noise are now much brighter.

Next, click on the black point slider on the left and begin dragging it towards the right. As you drag, you'll see the darkest areas of noise becoming pure black. As you drag the slider further, more and more of the noise will disappear into the darkness. You'll need to drag the black point slider very close to the white point slider to achieve the best results, and you'll probably want to play around with both sliders a bit to fine-tune the effect:

Dragging the black point slider towards the right.
Dragging the black point slider to the right.

Here's my stars effect after dragging the black point slider. One important note is that if you're creating the effect for print, you'll want to adjust the white and black point sliders so that it looks like you actually have more stars than you need, and that's because you'll lose some of the effect during the print process. If you're creating the effect strictly for the screen, you won't need to worry it:

The stars effect after adjusting the black point slider in Levels.
The effect after adjusting the black point slider.

I mentioned earlier that you can go back at any point and re-adjust the amount of blurring being applied to the noise layer by double-clicking on the Gaussian Blur Smart Filter in the Layers panel (see Step 5). You can also go back and re-adjust these white point and black point sliders. Simply click on the Levels adjustment layer in the Layers panel to make it the active layer (if it isn't active already), then drag the sliders in the Properties panel. Just like Smart Filters, adjustment layers in Photoshop are non-destructive and fully editable. No permanent changes are made to the image.

Step 8: Add A Hue/Saturation Adjustment Layer

Let's add a bit of color to the stars, and we can do that using a Hue/Saturation adjustment layer. Once again press and hold your Alt (Win) / Option (Mac) key on your keyboard, then click on the New Adjustment Layer icon at the bottom of the Layers panel:

Clicking again on the New Adjustment Layer icon in the Layers panel.
Clicking again on the New Adjustment Layer icon while holding Alt (Win) / Option (Mac).

Select a Hue/Saturation adjustment layer from the list that appears:

Adding a Hue/Saturation adjustment layer in Photoshop.
Choosing Hue/Saturation from the menu.

Photoshop will again pop open the New Layer dialog box. Just as we did before, select the Use Previous Layer to Create Clipping Mask option by clicking inside its checkbox:

Selecting the Use Previous Layer to Create Clipping Mask option in the New Layer dialog box.
Selecting the Use Previous Layer to Create Clipping Mask option.

Click OK when you're done to close out of the dialog box. Photoshop adds a new Hue/Saturation adjustment layer named Hue/Saturation 1 above the Levels layer (I've expanded the width of the Layers panel in the screenshot just to make the name visible). This new adjustment layer is also clipped to the noise layer, allowing us to colorize only the noise, not the original image:

The Layers panel showing the new Hue/Saturation adjustment layer.
The Layers panel showing the new Hue/Saturation adjustment layer.

With the Hue/Saturation adjustment layer active in the Layers panel, the Properties panel changes to the Hue/Saturation controls and options. First, select the Colorize option near the bottom of the dialog box by clicking inside its checkbox. Then, drag the Hue slider to select whichever color you like for your stars. I think blue looks nice, so I'll drag my Hue slider over to the right to a value of around 212. If you think the color looks too intense, drag the Saturation slider towards the left to reduce it. I'll lower my Saturation value from its default value of 25 down to 15:

The Hue/Saturation options in the Properties panel in Photoshop CS6.
Checking Colorize, then dragging the Hue and Saturation sliders.

Here's my image after colorizing the stars. The colorizing effect is quite subtle so it may be easier to see the result with your own image in Photoshop than it is in this screenshot:

The effect after colorizing the stars.
The effect after colorizing the stars.

Step 9: Group All Three Layers Above The Background Layer

Of course, we do have one big problem at the moment. Our stars are completely blocking the original photo from view. Let's fix that, and we'll start by taking all three layers that are combining to create the stars effect (in other words, all the layers sitting above the Background layer) and grouping them together into a layer group.

With the top Hue/Saturation layer selected in the Layers panel, hold down the Shift key on your keyboard and click on the noise layer (Layer 1). This will select all three layers at once (they'll all appear highlighted in blue):

Selecting three layers at once in the Layers panel.
All three layers above the Background layer are selected.

With the layers selected, click on the Layers panel menu icon in the top right corner:

Clicking the Layers panel menu icon in Photoshop.
Clicking the menu icon.

Choose New Group from Layers from the menu:

Selecting New Group from Layers from the Layers panel menu.
Selecting New Group from Layers from the Layers panel menu.

Photoshop opens the New Group from Layers dialog box. Name the group "Stars", then click OK to close out of it:

Naming the layer group in the New Group from Layers dialog box.
The New Group from Layers dialog box.

The new Stars group appears in the Layers panel with our three layers inside it. If you click the triangle icon to the left of the folder icon, you can twirl the group open and see the layers nested within it. Click the triangle icon again to twirl it closed:

The Layers panel showing the new Stars layer group.
Layer groups are a great way to keep the Layers panel organized.

Learn all about layer groups in Photoshop

Step 10: Turn The Layer Group Off

Let's hide the Stars group temporarily so we can see our original image. To do that, click on the layer group's visibility icon (the little eyeball):

Clicking the layer group visibility icon in the Layers panel.
Clicking the layer group's visibility icon.

The original image reappears in the document:

Cape Town harbor and city at night with moon in the sky. Image 59821666 licensed from Shutterstock by Photoshop Essentials.com
The original image is once again visible.

Step 11: Select The Area Where The Stars Should Not Appear

Now that we can see our image again, we need to select the area where the stars should not be visible. In my case, that would be the city in the bottom of the image, as well as the (barely visible) mountain range off in the distance. Photoshop has plenty of selection tools to choose from, and the one you'll want to use will depend on the subject you need to select. I'm going to keep things simple here and go with the standard Lasso Tool which I'll grab from the Tools panel:

Selecting the Lasso Tool in Photoshop.
Selecting the Lasso Tool.

With the Lasso Tool in hand, I'll drag along the top of the city and mountain range. With this image, there's no need to be surgically precise with my selection (which is why I chose the Lasso Tool) but I'll still keep my selection outline as close to the edges of my subject(s) as possible. To select the sides and bottom of the photo, I can simply drag outside the image into the gray pasteboard area. Photoshop will automatically snap the selection outline to the edges of the image:

Selecting the city and mountain range with the Lasso Tool in Photoshop.
The area along the bottom of the image is now selected.

I think I also want to select the area around the moon in the top right corner of the photo. For that, I'll use Photoshop's Elliptical Marquee Tool. To select it, I'll click and hold on the Rectangular Marquee Tool in the Tools panel, then I'll grab the Elliptical Marquee Tool from the fly-out menu that appears:

Selecting the Elliptical Marquee Tool in Photoshop.
Selecting the Elliptical Marquee Tool.

The default behavior for most of Photoshop's selection tools, including the Elliptical Marquee Tool, is to create a brand new selection, but what I want to do here is add a new area to the selection I've already created, so I'll click on the Add to Selection icon up in the Options Bar:

Clicking the Add to Selection icon in the Options Bar in Photoshop.
Changing the behavior of the Elliptical Marquee Tool from New Selection to Add to Selection.

Then, I'll position my mouse cursor in the center of the moon. The small plus icon ( + ) in the lower right of the cursor tells me I'm in Add to Selection mode:

Centering the Elliptical Marquee Tool cursor inside the moon.
Centering the Elliptical Marquee Tool cursor inside the moon.

I'll click and, with my mouse button held down, I'll begin dragging outward from the center. As soon as I start dragging, I'll press and hold Shift+Alt (Win) / Shift+Option (Mac) on my keyboard, then continue dragging. Holding the Shift key will force my elliptical selection into a perfect circle, while the Alt (Win) / Option (Mac) key tells Photoshop to drag the selection outward from the spot I clicked on:

Centering the Elliptical Marquee Tool cursor inside the moon.
Centering the Elliptical Marquee Tool cursor inside the moon.

I'll release my mouse button when I'm done, and now we can see that I have both the city along the bottom of the photo and the moon in the upper right corner selected. These are the areas where the stars will not appear:

The area around the moon has been added to the initial selection.
The area around the moon has been added to the initial selection.

Learn how to add, subtract and intersect your selections in Photoshop

Step 12: Turn The Layer Group Back On

Click once again on the layer group's visibility icon (the empty square where the eyeball used to be) to make the group visible again in the document:

Clicking the Stars layer group's visibility icon.
Clicking the Stars layer group's visibility icon.

The stars will again block the original image from view, but the selection outline(s) will remain visible:

The selection outlines are visible in front of the stars.
The selection outlines appear in front of the stars.

Step 13: Add A Layer Mask

Press and hold the Alt (Win) / Option (Mac) key on your keyboard and click the Add Layer Mask icon at the bottom of the Layers panel:

Clicking the Add Layer Mask icon in the Layers panel.
Clicking the Add Layer Mask icon (while holding Alt (Win) / Option (Mac)).

Photoshop adds a layer mask to the Stars group and uses our selection to determine which areas of the group should remain visible and which should be hidden. Normally, the area inside the selection would remain visible, but by holding down the Alt (Win) / Option (Mac) key, we told Photoshop to do the opposite and keep everything outside the selection visible while hiding the areas inside it:

The image after adding the layer mask.
The image after adding the layer mask.

If we look in the Layers panel, we see that a layer mask thumbnail has been added to the Stars group, with black representing the areas that are hidden from view and white being the visible areas:

The Layers panel showing the mask thumbnail.
The Layers panel showing the mask thumbnail.

Understanding layer masks in Photoshop

Step 14: Change The Blend Mode Of The Layer Group To Screen

The only problem remaining is that I'm seeing harsh, ugly edges separating the visible and hidden areas of the stars. To blend the stars in with the original photo and create seamless transitions, change the blend mode of the Stars layer group from Pass Through to Screen. The blend mode option is found in the upper left corner of the Layers panel:

Changing the layer blend mode of the Stars group to Screen.
Changing the blend mode of the Stars group to Screen.

Here, after changing the blend mode to Screen, is my final starry night sky effect:

A starry night sky effect created in Photoshop CS6.
The final result.