View Full Version : (Image Included) How to Make Shadow in GIMP for Maze

06-16-2010, 04:44 PM

Hope this is the right forum to ask this. I'm new to GIMP and image editing in general, so, please be gentle with me. :) I posted this question on GIMPTalk (http://www.gimptalk.com/forum/shadow-for-maze-searched-googled-;-image-included-t49329.html) too, but this forum is what turned me on to GIMP and seems to have the largest source of information on it that I've found so far.

Though I read a tutorial (http://binnyva.blogspot.com/2006/12/creating-shadows-in-gimp.html) on shadows and searched this forum, I didn't find what I seek.

Here is a .GIF of part of my labyrinth game:


I made just the maze layer, white background layer, and two drop shadow layers visible and saved a copy as a .GIF so you all could see what I'm trying to accomplish.

The drop shadow layers look good, but I can't help but think there is a better way. Drop shadows are made to make the image look like it is floating above the background. I want a shadow to make the "walls" of the maze look like they are standing in three dimensions by hitting it with a light source from the north-west corner.

Is there a quick, easy way to do this, or is the drop shadow good enough? Don't get me wrong, I like the drop shadow and it's easy to use, but really, it's not technically right if you look very closely.

Or, maybe there is a way to adjust the drop shadow to get what I want?

Thanks for reading and thanks in advance for any helpful advice!


06-16-2010, 09:38 PM
If I understand you correctly, you essentially want to erase the portion of the drop shadow that is north and west of each wall, leaving just a shadow to the south and east of each wall.

Duplicate the walls layer, shift the entire layer one pixel north and west, and change the black walls to white. Place this below your original walls layer and above the drop shadow and white background. This will erase the first pixel width of shadow that you want to remove. Repeat this process to erase further and further out.

I think that should do what you want.


06-16-2010, 10:34 PM
That's a good idea, and you're right, it will take care of the shadow on the "lit" side of the walls. But, there is an actual background image of grass. I just put the white background so it would be easier for the board to tell what I was talking about.

Also, if you look down toward the lower-right, you can better tell that it is, indeed, a drop shadow. Notice that a north-south wall's "shadow" continues over the east-west walls to the south. That's one of the biggest giveaways that it's a drop shadow and not just a shadow created by the wall blocking light.

Also, no matter how hard I tired to tinker with the drop shadow, it still leaves about 1 pixel of light on the "shaded" side.

Again, this is all nitpicking. It looks good, especially with the grass background and hex map and all the monsters and stuff. I just think there would be a function that could do what I'm looking to accomplish.


06-16-2010, 11:59 PM
There are a couple of nice tutorials around here somewhere. I don't have the time to look for them, but Ascension posted one a long while back for Photoshop that should be easily adapted to the Gimp. If I recall correctly, it makes use of the directional blur filter on a copy of the wall. The technique might have been posted with his Oasis map.

06-17-2010, 12:05 AM
Well, I fiddled around and came up with this. If it's what you are looking for I will explain how I did it. There may be a better way but this wasn't too hard.

Start with just the black walls and do this:
1) Duplicate layer (Layer>Duplicate Layer) Note:You will be sitting on the duplicate layer ready to edit it.
2) Filters>Blue>Motion blur
2.5) For motion blur settings I used length=10, angle=225
3) Select by color and click the white background.
4) Select>Invert (this will result in all the blurred areas being selected)
5) fill the selection with a grey color (I used 808080)
6) Now Drag this layer beneath your starting layer
7) click on the starting layer and set it to Overlay

Like I said, there may be a easier faster way but this was the first thing that I thought of. If I come up with something better i will let ya know.

06-17-2010, 12:07 AM
Hehe, looks like I was at least on the right track :)

Mid typed that up while I was double checking my directions to make sure they worked.

06-18-2010, 05:56 PM
That's exactly what I'm looking for if I can make the gray look like shadow. Maybe gaussian blur? I'm a GIMP newb.

Thanks a lot, man!

06-18-2010, 07:32 PM
Well, you could just leave the shadow layer as normal or Darken Only and place it as the top layer and then turn down the opacity until it looks the way you want it. If you do that I suggest you create the shadows on a transparent layer as it will work better that way.

06-22-2010, 12:39 AM
Okay, I figured out how to get it to work.

Here's what I did:

Start with the black walls layer and:
1) Duplicate layer (Layer>Duplicate Layer) Note:You will be sitting on the duplicate layer ready to edit it.
2) Filters>Blue>Motion Blur
2.5) For motion blur settings I used length=10, angle=225
3) Select>By Color and click in the background;
4) Select>Invert (this will result in all the blurred areas being selected)
5) Fill the selection with black;
6) Filters>Blur>Gaussian Blur>
6.5) I used a horizontal and vertical blur of 70 just messing around;
7) Now Drag this layer beneath your walls layer.

The map so far (WIP):


Again, thanks Jax!!! :D

06-22-2010, 01:24 AM
Yep, looks like you got the hang of it now. The only thing that might be a problem is that your "S" on the secret doors is showing up in the shadows at times (ie: to the left of 032). Not sure if that makes a difference for your game or not but you might need to watch for that. And your are most welcome!

06-22-2010, 02:00 AM
Ooo, good catch. Looks like I'm going to have to delete the 's's and add them on another layer.

Does it look like the red/green/gray doors are blending in with the shadow? It shouldn't, should it, because the black fill is what I blurred to make the shadow, right? Might just be my imagination.

06-22-2010, 02:17 AM
Looked closely at the shadow layer and saw that the colors did bleed into the shadows. I think I can fix that by making the walls layer invisible after doing the black fill.

I wonder why the walls on the top and on the left are so dang dark compared to the others?


06-22-2010, 10:59 AM
When you duplicate your layers to create the one that will become the shadows I think you are ending up with another white background layer which if you then blur will blur some of the white over your black walls. The solution, I think, is (in place of duplicating the layer) to select the walls - copy - create a new transparent layer - paste and then do your blur. I'm guessing this is what's causing the faded shadows.

Alternatively you can just go to the duplicated shadow layer (when you first create it) and select by color the white, delete, then blur.

If this doesn't work let me know, I'll run through the process again and see if I can figure out what might be causing this.

06-22-2010, 07:30 PM
You don't think it's just the nature of that blur filter?

I'll get it figured out. No need to spend any more of your time on my rink-dink project. :) I appreciate all your help as is!

One of the reasons I'm looking for a relatively quick way to do this is the fact that I'm going to make several mazes. They'll have stairs and bridges and gorges and tress and shrubbery and everything when I get to that level.

06-22-2010, 07:57 PM
Well if all you are blurring is the walls then there is no reason for any colors to blur into your shadow. That's what I'm saying. If you have a red door for instance in your pasted copy that you are about to blur, it should be changed to black PRIOR to blurring. Basically, anything you want to be as a shadow should be black before you blur it. That way there is no way for the coloring to get into your shadows. As I said, if you have a white background when you blur and you blur the entire page then, yeah, the white will also smudge over into your shadows. That's why you want to do the blur on a transparent layer with only the black items you want shadows for.

I hope this more simple explanation will help. Sometimes I make things more complicated than they need to be. Caused myself no end of headache doing that too :)

06-22-2010, 09:41 PM
As I said, if you have a white background when you blur and you blur the entire page then, yeah, the white will also smudge over into your shadows. That's why you want to do the blur on a transparent layer with only the black items you want shadows for.Ah, yes. I see. I'll cut the walls out next time and make the colored doors black.


06-26-2010, 05:33 AM
I haven't tried to improve the wall shadows yet, but now I wonder how to make shadows for stairs?

06-26-2010, 10:43 AM
Not sure what you are after but most stairs have walls on either side of them so there wouldn't really be any shadows outside of the stairwell.

One thing you can always do with shadows is hand paint them as well. Just create a grey layer color (808080) and set it to "hard light". then use the dodge/burn tool to darken or lighten this layer which will show through. You can paint other colors on that layer as well which will effect the look.

I don't know if any of that makes sense but I hope it helps.

06-26-2010, 02:29 PM
Don't have much time but here is image:


06-26-2010, 03:08 PM
Here is what I figured out so far dabbling (notice stairs by blue door):


I selected the area individually under each stair separately and used the blend tool from left to right. Under the "opacity" slider in the blend tool's toolbox, i changed the "gradient," to "FG to Transparent."

Honestly, i think the stairs' shadows look better than the walls', though the two styles now clash. I might try to use this blend tool somehow to make the wall shadows as well...

06-26-2010, 07:44 PM
Below is my current progress. The grass will probably get changed to sand and the light gray texture is supposed to be white marble but looks more like the moon's surface...

I'm not sure what I want to do with the textures. Don't know what I should do with the maze walls, either...

Next, I'm going to put trees and foliage and stuff in there. After that, top-down statues. If I change the grass to sand, I'll put some leaf-less tress in there and hold off on the shrubs.

At some point, I'm going to put a couple round, fountains in various places.

I'm really having a hard time finding textures and stuff. Any good suggestions?


06-27-2010, 10:50 AM
Gimp should have some nice marble textures in there. Try using one of those and then tweaking the color curve, you can get some nice effects that way.

Otherwise, you might want to check out CGTextures (http://cgtextures.com/) <-- Steel General pointed them out to me in another thread.

06-27-2010, 03:13 PM
Thanks, Jax! That Website is the only place I've really had any luck, but I didn't know GIMP had textures! I'll have to look at its.

06-27-2010, 03:43 PM
Tried to make the g. blur even and uniform, but it just won't do it. It's always way darker around the top, left and right...


06-27-2010, 03:54 PM
Ah, ha! I figured it out.

Don't do a gaussian blur! Just reduce the opacity of the black fill of the shadow layer. I reduced it to 50%.

06-28-2010, 05:29 AM