Difference between revisions of "Creating Shadows Under Units"

From The Battle for Wesnoth Wiki
(Updated for latest standard.)
(Added images.)
Line 9: Line 9:
  
 
To create a shadow, take a unit you wish to apply shadows to.
 
To create a shadow, take a unit you wish to apply shadows to.
 +
http://www.wesnoth.org/wiki-images/shadow-tutorial-1.png
  
 
Create a new layer (we're assuming here that you're using Gimp/Photoshop or some layer-supporting graphics program), and draw in it, with the pencil tool set to RGB: 22,0,52 the desired shape of the shadow you would like.  Note for most units, that our perspective will make the shadow of most creatures somewhat wider than it is tall.
 
Create a new layer (we're assuming here that you're using Gimp/Photoshop or some layer-supporting graphics program), and draw in it, with the pencil tool set to RGB: 22,0,52 the desired shape of the shadow you would like.  Note for most units, that our perspective will make the shadow of most creatures somewhat wider than it is tall.
 +
http://www.wesnoth.org/wiki-images/shadow-tutorial-2.png
  
 
Finally, move this layer underneath all your other layers, and set its opacity to 60%.
 
Finally, move this layer underneath all your other layers, and set its opacity to 60%.
 +
http://www.wesnoth.org/wiki-images/shadow-tutorial-3.png
  
 
== See Also ==
 
== See Also ==

Revision as of 04:57, 19 April 2009

by Richard Kettering (Jetryl)



Wesnoth has been through several iterations of how shadows are drawn, our most recent being a slightly blurred version.

Our current standard for drawing shadows is fairly simple. All of the shadow pixels are given an opacity of 60% (or in other words, a transparency of 40%). The preferred shadow color is RGB: 22,0,52 (on a scale from 0->255; in hex it would be 160034). This has minor cosmetic advantages over pitch black (rgb: 0,0,0), because most shadowed surfaces in the real world have a large amount of blue-ish ambient light reflected into them, rather than being just a darker version of their source color. It also makes shadows easier to work with in mixed-down PNG files, because you can select just the shadow by clicking on it with the magic wand tool (since it's a different color than black, which invariably ends up getting used on the bodies of most units).

To create a shadow, take a unit you wish to apply shadows to. shadow-tutorial-1.png

Create a new layer (we're assuming here that you're using Gimp/Photoshop or some layer-supporting graphics program), and draw in it, with the pencil tool set to RGB: 22,0,52 the desired shape of the shadow you would like. Note for most units, that our perspective will make the shadow of most creatures somewhat wider than it is tall. shadow-tutorial-2.png

Finally, move this layer underneath all your other layers, and set its opacity to 60%. shadow-tutorial-3.png

See Also