Thursday, April 7, 2011

Gimp Tutorial - How To Use Gimp to Create Beautiful a Sun Ray Photo

In this lesson, I'm going to show you how to use GIMP to take a photo of the sun, add some sun rays to the photo, and change the color to make the photo look more dramatic.

Suggested Prerequisites:
Layer Mask Gimp Video Tutorial
Layer Mode Gimp Video Tutorial
Adjusting Colors Using Gimp
Layers and Selections Gimp Video Tutorial
Suggested Items:
Wacom Tablet (For Shading and Masking)
My eBook on Layer Masks - This short and inexpensive book focuses on one thing -getting you insanely good at making Layer Masks.  If you get good at layer masking, you'll get good at Gimp.

In this how to, we will start with this photo:
This beautiful photo was taken in Dun Laoghaire.
...and we will End with this photo:
As if the photo actually needed editing...although a few color effects really do go a long way
Suggested Prerequisites
Understand Layers
Learn about layer modes and layer masks
Understand the color menu
Learn my 5 Photo Editing Principles
Suggested Items
Wacom Tablet (for masking)
Gimp reference manual
Part 1: How To Use GIMP to Create the Sun Rays.
Using a pretty cool technique, I will show you how to create sun rays (or beams) without using special brushes, complicated gradients, or any stock photo.
Duplicate the background layer. Name that layer "Sun Rays."
Click "Filter>>>Blur>>>Motion Blur."
Set your settings something like what I have shown below.
The important thing is to make sure the center of the blur is set properly. You have to type the coordinates into GIMP. To get the coordinates, simply move your mouse over where you want the center of the photo to be, and check the bottom-left corner of your GIMP screen. The coordinates will be displayed there.
Note that this step often takes a long time to render (for me, it took GIMP about 10-15 minutes.)
My photo now looks like this:
It's pretty apparent where the rays are going to come from, right?
Click "Colors>>>Curves" adjust the curves something like what I have below:
Oh're so awesome.
I ended up with this:
Notice a lot of the information is now washed out, but the detail in the sun rays are starting to really shine through (no pun intended.)
Filters>>>Edge Detect>>>Edge. Set it to "Sobel" and "10."
And just when you thought you understood what was going on, we go and do this. Don't worry, the black won't be a factor for long,
Click on Colors>>>Curves
Create a curve that looks something like this:
My photo turned out like this:
Now we have a very good contrast on our sunbeams...although they're a little too sharp. Time to blur them a bit.
Click Filter>>>Blur>>>Gaussian Blur
Blur the entire photo at a value around 25.
Set the sun rays layer to the layer mode "Overlay."
You should end up with something like this:

That looks pretty good, but we lost a lot of our photo as a result. Time to add a layer mask.
Right click on the Sun Rays layer>>>click "Add Layer Mask" Set the mask mode to White.

Reset your color palette by clicking on the black and white boxes in the bottom-left corner of your toolbox.
Switch the foreground and background colors on your palette by clicking the arrows beside the color palette (or by pressing the X key.)
Choose the Blend Tool (Shortcut Key: L)
In the tool options window, change the gradient to "radial"
Click and drag a gradient from the center of the sun outward. This will cause the layer to gradually fade away in the darker areas further from the sun. My photo looks like this:
The gradient in the layer mask gives us the best of both worlds.
Part 2: How to use GIMP to Dramatize the photo
Now that we have our sun rays in place, it's time to give the photo that "golden sky" look, as well as pull out some of the shadows in the clouds and water using a technique that differs from the usual "curve adjustment" concept shown in previous tutorials.
Duplicate the background layer. Name the duplicated layer "Dramatize"
Set the layer "Dramatize" to overlay
Ensuring that you're editing the Dramatize layer, click colors>>>desaturate.
Click Filters>>>>enhance>>>unsharp mask
Play with these settings to something you like. Mine were set up with these settings:
Radius: 26.3
Amount: 4.37
Set the dramatize layer to overlay, and adjust the opacity to something you like. My overlay is set to 37.5, and looks like this:
Using a combination of overlay, and transparency, we're able to sharpen the image without giving up too much detail.
Create a new layer. Name that new layer "Glow Color"
Choose the Blend Tool (Shortcut Key: L)
Set your foreground color to a light yellow, and your background color to a bright orange (kind of like the colors found on a piece of candy corn.)
In the tool options window, change the gradient to "radial"
Click and drag a gradient from the center of the sun outward. This should create a gradient that looks something like this:
Note the location of the yellow glow. It is in-line with the sun.
Set the layer mode to "Hue"
Adjust the opacity to something that you're happy with. (I set mine to 40, and came up with this:)
The purpose of this layer is to pull some (not all) of the blue out of the sky.
Duplicate the glow color layer. Name the duplicated layer "Sun Color"
Set the opacity of the sun color layer to 100.
Right-click on the sun color layer>>>click "add layer mask"
Set the layer mask to "Grayscale copy of layer"
Make sure you're editing the sun color layer mask, and click Click colors>>>brightness-contrast
adjust the contrast to something you're happy with. Mine is set to these settings:
Brightness: -61
And my photo looks like this:
My's...GOLD! Too gold.
Adjust the opacity to something you like. Mine is set to 25 and looks like this:
That's a little better. Now for the final touch, the lens flare.
Part 3: How To use GIMP to Add a Lens Flare
This final step is not hard to do, since GIMP automates the lens flare creation. The only problem is GIMP has to put the lens flare on the same layer as your background layer. To help better preserve the data, we're going to duplicate your background layer and add the flare to the duplicated layer, that way if you decide that you don't like the flare at a later point, you can always delete the duplicated layer and still use the original. It's a good practice in general to always keep the original image on a layer, and only edit duplicates. Sometimes progress requires looking at where you came from.
That being said, start by duplicating the background layer Name the duplicated layer "Lens Flare Background"
Ensuring that you're editing the lens flare background layer, click filters>>>light and shadow
In the window, position the lens flare inside of the sun, so that the flare appears to be coming from the sun.
Click OK.
I ended up with this:
What do you think? What would you have edited this photo differently?


  1. The setting of "sobel" to 10? there is no unit setting in filters, edge detection, sobel?

  2. You're clicking filters>>>edge detect>>>edge right? There should be a drop down menu to set the detect mode to sobel. Hope this helps.

  3. Alex, thanks for the tutorial!

    "Duplicate the glow color layer. Name the duplicated layer "Sun Color"

    some regimes mixing layer -Hue,Overlay or Normal???

  4. That layer should be set to "hue," which is why I duplicated the layer. That kept the layer mode and opacity this makes for a good starting point for the new layer. Make sense?

  5. hey man u know some kids have to use this so like have it make sense this is hard as hell "Alex". lolol :)

  6. Sorry to hear you couldn't understand something, why don't you tell me where you're getting stuck and maybe I can clarify it for you.

  7. Thanks. Relatively easy to follow but pending preference I made some adjustment to the figures. Excellent stuff. Good job! Thanks again.

  8. Its awesome work you have done. i can not do like that as you did.

  9. What a lovely tutorial! I will make like this one. Thanks

  10. Thank you for this post, very interesting.
    I am a marketer in Grenoble (France). I use on an everyday basis Gimp and Canva.
    Gimp is not very intuitive, you need months and months of use to begin making amazing stuff with it.
    On the other side, Canva is the most intuitive photo editor ever. In 5 minutes you can create catchy images, background that do not look like an old ‘paint’ image.
    So the best combo is to modify your image with Gimp, put it in PNG format, and ‘work’ on it with Canva. Hope it will give you ideas
    marketer at

  11. Wonderful tutorial. Thanks for share with us.
    clipping path


Wacom Tablet

In my Gimp Tutorials, I frequently use Wacom Tablets. Here is an awesome wacom tablet I recommend using.
A Wacom tablet will enhance your GIMP photo editing experience by offering a pressure-sensitive touch that translates to varying transparency when making brush strokes in GIMP.

Gimp Reference Manual

I highly recommend getting this Gimp book to use as a reference manual in conjunction with my tutorials. This book will explain how the tools I use work. My tutorials will give you practical applications for the tools shown in this book.