First off, if you have not read last month’s article (issue 10), I suggest you do so now, as it covers several vital concepts not discussed here. That said, let us delve into more shading concepts. What is that I hear? Thousands crying "No, we hate shading, we don’t want any more freakin’ shading tutorials!" ? Worry not, this article concludes all that I know (or remember) about shading; in the following months I will discuss more interesting concepts like...explosions!!! (I sense that many have now gained interest). | Transparency, Refraction, and more |
bump mapping
diffusion mapping |
Mmm...examples =) |
extrusion mapping
pattern mapping
specular mapping
transparency and refraction
Do not worry, it is not vital that you know all that garbage above, just follow the tutorial and pretend to know what you are doing :’). Before we examine the following articles, you must first understand a relatively simple concept: static objects and moving objects. Static objects do not move at all, therefore they can reflect their surroundings to any degree you wish. So, for example, if you were to have a reflective object on top of a given background, since it would only be staying in one place, you could render a perfect reflection of the background. If that same object were to move onto another background, the reflection would be inaccurate and look paradoxical. Static objects are generally things that will be glued in place in your game, like a torch on a wall (note that static objects can be animated). Moving objects, however, will be subject to any type of background change, since they can potentially move. Thus, you must draw moving objects according to only an approximation of their environment (we did this last issue with reflective objects). Now, on with show. |
Specularly highlight *this* |
dithered transparency
hue/value (HV) transparency
First we will work with the object cut out. If you do not have a "color replacer" tool in your paint program, you may find this part difficult (a color replacer replaces the secondary color with the primary color). You will want to replace the brightest region of this cut out with bright values of your object’s given hue, and the darker regions with subsequently darker values of the object’s hue (6,3). This should result in a shaded object that has a texture visible behind it (unless you messed up, which is most likely the case :0) ). Then the shadow piece is replaced with a fairly dark range of the object’s hue (7,3) (this makes sense because shadows cast by transparent objects are the color of the object). Then you piece the shadow and the object together in their respective places on top of the background where you cut them out (8,3). Flat objects (5,4)-(8,4) are similar, except the individual faces are cut out and replaced with single color ranges.
psuedo-refraction
Flat-surfaced objects (5,6)-(8,6)refract slightly differently; Whichever faces point outwards away from the ground (usually the upper pieces of a flat object), these regions refract, or partially refract, given their angle. Shade these regions in some other way than their counterpart faces. You may wonder why the other faces of these objects are not transparent. Remember that refraction bends light, so the side and lower faces of an object cannot "see" the ground below them; the only thing the can "see" is air, so they are shaded normally. You may choose to make your refractive objects transparent, but it does not always look good and is simpler left alone.
true refraction
conclusion
|