View Full Version : Adding shadows to building graphics


nick0515
May 22, 2011, 12:16 AM
I'm wondering if there are some good methods for adding shadows to building graphics I do. Bearing in mind I'm doing them with cut and paste methods.

Also, I made this. What do people think? Does it look right? To make it, all I did was cut a shadow shaped chunk out. Massively decrease the brightness on the chunk and then paste it back. This is easy to do but I'm just drawing the shadow by hand so I don't really know if I'm doing it well or not. The files I'm using a .nif civ 4 files so there may be a way to view them with a shadow and then paste it with a properly generated shadow. I guess I will have to look elsewhere to find that info though.
http://forums.civfanatics.com/attachment.php?attachmentid=290665&stc=1&d=1306044871 http://forums.civfanatics.com/attachment.php?attachmentid=290664&stc=1&d=1306044871

Kyriakos
May 22, 2011, 12:37 AM
Nice shadow :)

I do not know much about nif files, so cannot help you with your other idea...

Yoda Power
May 22, 2011, 09:29 AM
I think it looks good.

The thing about shadows is: you notice if they aren't there, but you don't really pay attention to a poor shadow anyway. Just as long as there is a shadow. :)

BadKharma
May 22, 2011, 10:29 AM
Nick, what software are you using to do the cut and paste? You should be able to generate an accurate shadow if the building is separate from the background.

Blue Monkey
May 22, 2011, 12:59 PM
Nick, what software are you using to do the cut and paste? You should be able to generate an accurate shadow if the building is separate from the background.:yup: The exact method is going to vary between programs. You should be able to copy the building outline, make it a separate layer, fill in gray, distort it, adjust the opacity & blur the edges, trim as needed, then merge the layer(s).

nick0515
May 22, 2011, 05:54 PM
BadKharma, I just open the civ four buildings in NifSkope. They show on a completely black background and I haven't been able to change the background. They are separate from the background. They are 3d models that can be moved around to any angel and zoomed in or out. I should probably search for some tutorials on how to use it or look at using a more sophisticated program. I think NifSkope is mostly geared to display images rather than edit.

I'm not very knowledgeble about these things which is why I stick to a simple cut and paste method.

LizardmenRule!
May 22, 2011, 08:58 PM
I think the shadow look great

Blue Monkey's method is exactly what I do the few times I've made buildings

Balthasar
May 22, 2011, 11:16 PM
But why stop there? I decided that it looked better flipped, with enhanced shadows and highlights, added a perspective shadow* and, for good measure, some Cypress trees and a little driveway.
Done with GIMP in about 30 minutes.

http://img689.imageshack.us/img689/9673/buildingenhancement2.jpg

Not to be competitive, mind you; rather to demonstrate what GIMP can do quickly, since comparisons are being made between programs..

*140' angle, .7 shadow length, blur radius 2

nick0515
May 23, 2011, 02:50 AM
BM, I didn't fully understand your post somehow. Thanks though. On reading it a second time it makes much more sense to me.

Balthasar, wow!

The trees and driveway aren't to my tastes but the building and shadow look fantastic? I use GIMP for everything except to load the 3d model which I take a screen shot of. How exactky did you acheive such nice colours? Also what function exactly is it that you used to generate a shadow?

EDIT: I found that 'perspective shadow' but when I run it with the same settings as you it does nothing. No shadow appears. Could you explain it a little more and don't be afraid to explain it like your talking to a moron.

Blue Monkey
May 23, 2011, 08:29 AM
BM, I didn't fully understand your post somehow. Thanks though. On reading it a second time it makes much more sense to me.
...
I found that 'perspective shadow' but when I run it with the same settings as you it does nothing. No shadow appears. Could you explain it a little more and don't be afraid to explain it like your talking to a moron.i'm shifting furniture & will be off-line - hopefully for just one day. When i'm back i'll try to remember to post some explanation from gimp tutorials I have on hand.

BadKharma
May 23, 2011, 02:46 PM
BadKharma, I just open the civ four buildings in NifSkope. They show on a completely black background and I haven't been able to change the background. They are separate from the background. They are 3d models that can be moved around to any angel and zoomed in or out.

What file format are they? Adobe CS5 can open certain 3D models directly in Photoshop Extended.

I think the shadow look great

Blue Monkey's method is exactly what I do the few times I've made buildings

:yup: The exact method is going to vary between programs. You should be able to copy the building outline, make it a separate layer, fill in gray, distort it, adjust the opacity & blur the edges, trim as needed, then merge the layer(s).

Yes it will vary, although I prefer to use a gradient transparency mask and feathering the edges.

Balthasar
May 23, 2011, 10:39 PM
The trees and driveway aren't to my tastes but the building and shadow look fantastic! I use GIMP for everything except to load the 3d model which I take a screen shot of. How exactly did you achieve such nice colours? Also what function exactly is it that you used to generate a shadow?

EDIT: I found that 'perspective shadow' but when I run it with the same settings as you it does nothing. No shadow appears. Could you explain it a little more and don't be afraid to explain it like you're talking to a moron.

You asked for it.

Here's what I did, step by step; since you're not interested in the trees, I'll leave that part out:

1. I made a copy of your shadowless building and imported (File->Create->From Clipboard) it to GIMP. I opened the Layers dialog (Ctrl-L) and added a new layer with a transparent background (Layer -> New Layer check Layer Fill Type Transparency) I copied and pasted (Ctrl +V) the building to the new layer and temporarily disabled the original layer by clicking on the little eye to the left of it in the Layers dialog. From here on out, make sure the new layer and not the original "pasted" layer is the 'active' (chosen) layer in the layers dialog.

2. Then, using the Color Select Tool (Shift +O), I highlighted and deleted (Ctrl->X) the grass around the building on the new layer. You can use the shift key to highlight multiple colors. Be careful not to delete colors that are on the building itself. Clean up stragglers with the Eraser. This should leave you with just the building on a transparent background.

3. This is when I flipped it (Image->Transform->Flip Horizontally) so that the building's front would face the sun (which comes from the SouthEast in Civ3). Note that both of the layers flip when you do this.

4. Then I "enhanced" shadows and highlights by using the Dodge/Burn Tool (Shift +D). There really is an art to this part, as you have to imagine which of the building's surfaces will face the sun and which won't. Dodge is lighten, Burn is darken. You can use different 'brush' sizes for differently shaped surfaces. Play it by ear..

5. Then I decided to make the roof more blue by first adjusting the color balance (Colors -> Color Balance - adjust the yellow-blue balance) and lightened the blue a bit (Colors -> Hue-Saturation select the deep blue and adjust lightness). Adjust to taste..

6. Now we add our shadow (Filters ->Light and Shadow -> Perspective). Use the settings from my previous post (140' angle, 0.7 shadow length, blur radius 2). It will create a new Perspective Shadow layer that will appear for you this time, Trust me...

7. Finally, remember that original layer we disabled? Enable it by again clicking on the 'eye' next to the Pasted Layer layer. That gives us our grass back - the original building is hidden by the 'new' building & shadow. The order of the layers should be now: New Layer on top, then Perspective Shadow layer, then the Pasted Layer (original image) layer on the bottom. If these are out of order, you can highlight and 'drag' them into the correct order in the Layers dialog. Here's what that looked like (with my trees disabled; I drew the road right on to the original layer) on my desktop:

290780

8. One last step: Merge, Baby, Merge (Image -> Merge visible Layers or Ctrl +M). This function leaves you with a single image that you can save as a jpg, or index and save as a pcx.

Whew! That took longer to explain than to do! Hope it helps. :D

nick0515
May 23, 2011, 11:33 PM
Well thanks everyone.

I think I'll go with Balthasar's method rather than generating the shadow on the 3d models. To answer your question though BadKharma I believe .nif files can be converted to other fromats and then imported into other programs. I believe Tom, imports .nif files into 3ds Max for many of his units.

Balthasar, thank you a lot. I know how long it can take to write that kind of post and I very much appreciate you doing it. I learned a great deal from that one post. I've never used the layers docable dialogue before and I didn't really properly understand the various colour options. I would, however, have been able to get the shadow working in the first place if I had read you first post right. Instead of setting the shadow's length to 0.7 I was setting it to 7.0 which is why I couldn't see it.

Thanks again everyone. I should now be able to easily had shadows to all the new buildings I do.

Balthasar
May 24, 2011, 12:52 AM
All that because you missed a decimal point? Just kidding. Glad to hear my lil' tutorial helped.

nick0515
May 25, 2011, 06:03 PM
Bloody decimal points...

Also, the Dodge/Burn Tool is something new to me that will be very useful.