Results 1 to 10 of 12

Thread: [Award Winner] Making mountains in Gimp using an overlay layer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Tutorial [Award Winner] Making mountains in Gimp using an overlay layer

    This is a basic run through of how I make mountains in Gimp using an overlay layer. The same method can be used to provide light and shade to general maps and is something I use very regularly.

    Let us say that you have an image with the colours that you want in the right place. Here I have an image with a grass texture blurred into brown and then light brown-grey to designate a mountain range:

    BasicStart.jpg

    Now this looks very flat. To create an illusion of depth we need to all light and shade. One way to do this is to create a new layer and fill this with 50% grey (7f7f7f in html notation). Set the layer mode to overlay:

    Layers.jpg

    Now take a large round brush and paint with pure white on the edge of the mountains towards the light and black on the areas away from the light. This will generate light and shade for you. I use a tablet, so I just allow the pressure to give me more or less light and shade. If you are using a mouse I would suggest that you set the opacity of the brush quite low and build up the areas of light and shade.

    After doing this it's often useful to take the smudge tool and just smooth away any hard edges. Now, this is the overlay layer that I created for my mountains:

    Overlay.jpg

    This is the result of that layer set to overlay over the coloured layer I had before:
    End.jpg

    Now obviously the colours underneath are important too. If I was doing this with more care then I'd try to texture the mountain properly rather than having flat brown as the colour.

    This method requires a little care, and is most useful with a tablet. I'll show a slightly longer, but perhaps more foolproof method next.

  2. #2
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Post

    Okay, so as promised, here's the second method.

    As before the image will have a base layer with the colours on it, and an overlay layer that generates the light and shade. This post (and the couple that follow it) will show how to generate a decent overlay layer using filters rather than drawing it in by hand.

    First create a new transparent layer using the layers dialogue, or Layers->New Layer (shift-ctrl-n). On this layer use the lasoo tool to select the border of your mountain shape. It doesn't have to be exact. Here's mine:
    gradientMethod1.jpg

    Now we want to use gradient fill to fill this with a gradient that goes from white along the ridge lines to black along the edges. Here's the settings I use for my gradient settings. I've highlighted the important ones - especially Shape: Shaped(angular):
    gradientMethod2.jpg

    Now click and drag a line from the middle of your selection to one of the edges of the selection. This should fill the selection with your gradient. Now invert the selection (ctrl-I), grow the selection by 1 pixel (Select->Grow selection) and fill with black, you should have something like this:
    gradientMethod3.jpg

    This will be the layer we use as a bump map.

    Next, create a new layer and fill it with 50% grey. This will be our overlay layer. Go to Filters->Map->Bump Map. In this dialogue select your gradient filled layer as the map in the drop down menu. Play with the depth setting to get a reasonably dark shadow and make sure you select the angle for the azimuth so that you have the light coming from the right direction:
    gradientMethod4.jpg

    When you are happy with the preview, hit okay and you should get something that looks a little like this:
    gradientMethod4a.jpg

  3. #3
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Post

    Now this is a nice start on a mountain ridge - however beware! The shaped(angular) gradient in gimp gives vertical and horizontal striping and the bump mapping can often leave a lip around the edge of a selection - both features you can see in this example. If you just go ahead and use this layer as your overlay layer you'll get something that looks like this:
    gradientMethod5Bad.jpg

    Now anyone who ends up with something looking like that should be shot. It only takes a couple of steps to get something looking a lot better. I'll show you two different ways to improve this. First, the easiest. Run a gaussian blur on the layer (Filters->Blur->Gaussian blur):
    gradientMethod6.jpg

    Fiddle with the settings until the preview has no signs of the defects left over from the bump mapping. With your new smooth overlay layer you will now have the much more attractive result:
    gradientMethod7Better.jpg

    Note that the gaussian blur has also smoothed out the transition from the shadow to the flt ground. This is great because mountains do generally smooth out before the ground levels off.

    Another means of fixing the defects is to manually go in with the smudge tool. This gives you a little more direct control and also allows you to keep the sharp ridge lines. I use the following settings:
    Gradient9.jpg

    Now use the smudge tool by scribbling in lines going back and forth from the ridge to the edge of the mountain shape and back. This will smooth out the defects. I got this from my original bump mapped layer:
    gradientMethod10.jpg

  4. #4
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Post

    Now when I set the layer to overlay again, I get the following:

    gradientMethod11.jpg

    So to recap, by using an overlay layer you can change a flat image to one with a bit of form and shape. This can be used to create light and shade fro scratch, but can also be used later on to enhance the light and shade already present in a piece. The trick really lies in creating a reasonable layer.

    Here's the three different images created in three different ways during this tutorial. I hope it was useful.

    End.jpg gradientMethod7Better.jpg gradientMethod11.jpg

  5. #5
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Post

    I use the smudge trick all the time, and I have to say, that even thought it takes a long time, you can produce some stunning results. I typically take a second pass at bump mapping after I have run the smudge tool on the first bump mapped version and this really gets some very nice results after you have played with it for a while. The biggest issue with the second bump map pass after using smudge is that sometimes it looks horrible, so you have to choose your brush and brush size carefully to get the right effect when smudging.

    Thanks for the nice tut Torstan!!! rep++++++

    For those interested, here is an example using the third method plus a bit of playing around.
    Attached Images Attached Images
    Last edited by jfrazierjr; 04-02-2009 at 02:46 PM.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  6. #6
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Post

    Thanks Joe, I wanted to create a tutorial that shows both a hand drawn approach (I include smudging in this category) and an automated approach.

    I like those mountains a lot. I'd perhaps say that the shadows near the ridgelines are a little extreme compared to the rest of the mountain - the shadows should stay dark for most of the width of the mountain before tailing off around the base. Also, the river bump mapping is really extreme - the banks of the rivers have a stronger shadow than the mountains! Great map though - and a lovely example of what can be done with texture and colour and then enhanced with a bit of light and shade.

  7. #7
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,530

    Default

    Great stuff guys!
    My Finished Maps | My Challenge Maps | Still poking around occasionally...

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



  8. #8

    Default

    I'll add a couple suggestions. If you have a tablet try the airbrush tool rather than the paintbrush tool as it is much more responsive. Also if you blur the angular gradient before using it as a bumpmap you can use the curve adjust to define the profile and sharpen the ridge. Lastly instead of greating a 50% grey layer and applying a bump map you can apply the emboss filter directly to the heightfield with a 30degree altitude and will end up with a layer where all flat surfaces are 50% grey.

    -Rob A>

  9. #9

    Post

    Thanks for finally putting this up in an easily referenced form. Repped and rated!
    Bryan Ray, visual effects artist
    http://www.bryanray.name

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •