Simple Light-Sourced Clouds |
 
![]() |
A simple, fast method for faking illumination of a cloud texture using layered textures. |
  One way to fake directional lighting is to shift the shadows away from the apparent light source. If the texture is broken down into two layers, it becomes a simple matter to assign the cloud shading to the bottom layer and the cloud outline to the masking top layer.
This is really just a primative bump mapping or embossing technique. The "shadowed" edges opposite the "illuminated" edges in the composite image enhance the effect, but are actually artifacts due to the semi-transparent mask which was used for the illustration. For implementation, the blue areas of the mask should be set to a transparency of 0.   |
||||
 
The not-so-easy part is of course in the details. Here is a break down of the points which needed addressing and how I approached them: limit of effectiveness: There is a limit to the amount that the mask can be shifted after which inconsistancies will become visable and the effect will be lost. This limit is, roughly expressed, one half the diameter of the smallest feature. This may sound fairly restrictive. However, by judiciously blurring the edges of the mask and the transition from shadow to light on the shading layer, one can get away with a lot more. edges:High contrast and well defined edges seem to work best - which seems to go almost counter to the very fluffy, fuzzy nature of clouds. This technique probably not suited for very fuzzy clouds or fogs. However, from our vantage point on the ground, many cloud forms do exhibit a moderately well defined boundary and given the aforementioned benefit of some edge blurring, an acceptable comprimise can be found. You will also notice that transition zone from shadow to light on the cloud shading layer should be fairly tight. This tends to produce denser looking clouds. feature definition:This lighting effect stands out best when applied to relatively large, clumpy, cloud features, becomming less striking with grainy cloud textures. apparent angle of lighting: Edge-on cloud illumination scenarios work best where either the angle of the sun or the apparent thickness of the cloud would limit the amount of broad diffuse lighting. For illustration I've coded the relevent textures for POV as follows:
If you really need the whole scene file,
There is still one serious limitation to this implementation, namely that if the sun is in the view frame, shifting the mask uniformly in one direction no longer works. Rather it would be necessary to radially shift the mask with respect to the location of the light source as projected onto the cloud plane. A black_hole type warp correctly positioned can shift the mask toward the "light source" point on a radial line. For example:
The following render was based on the above code.
|
||||
  |
||||
Created by Abe Madey
bullfrog@taconic.net
Reproduction of content not permitted without express permission.
Updated 26.3.2002