![]() Requires DOS4GW |
|
|
|
General Information
About Cloudscapes
|
1. The sun is very bright and it is making you squint ! 2. The clouds near the sun are glowing much brighter than clouds far from the sun. 3. Luckly the clouds are moving across the sky, and occasionally block out the sun, making it easier to see, so you don't have to squint as much. 4. The clouds are also changing shape as they move across the sky. 5. Not all the sky contains cloud. Some areas of sky are completely cloud free. 6. The clouds do not continue into the distance forever. The furthest clouds are often obscured by haze. |
Creating Clouds
Create an array of noise
|
|
Smooth it
|
|
Resample it up.
|
|
![]() ![]() ![]() ![]() |
This was done for four arrays of noise to create noise textures of size 32x32, 64x64, 128x128 and 256x256. Imagine now that these noise textures are tiled together to create four maps each of size 256x256. (see left). The white lines have been added as a guide just to help you see the tiling. |
|||
|
CloudMap = Map1 + (Map2 / 2) + (Map3 / 4) + (Map4 / 8) |
|
|||
|
|
Putting the clouds in the sky
|
|
![]()
|
Colouring it in nicely
Blue Sky
![]() |
|
Glow from the Sun
![]() |
|
Mixing the two
![]() |
|
Lens Flare
![]() |
|
Combining it all into a finished image
Animating the clouds
Animating a single noise map
|
|
|
|||
| Noise map 1 | Crossfade between Noise 1 and Noise 2 | Noise map 2 |
|
Pseudocode to animate an octave of noise
|
Rendering the Image
function HazeExpCurve(d)
c = a couple of hundred. Depends on how far away the sky dome is
Hazyness = about .95
p = d2 / c
return Hazynessp
end function
FlareStrength = Cloud Density over sun
for each pixel
c = pixel from CloudMap
gl = pixel from GlowMap
fl = (pixel from FlareMap) * FlareStrength
h = HazeExpCurve(Distance to cloud dome)
Start with Blue Sky Map
HazeRed = Red Component of pixel from BlueSky map
HazeGreen = Green Component of pixel from BlueSky map
HazeBlue = Blue Component of pixel from BlueSky map
Add simple shading to clouds
shading = simple bump mapping on cloud
Apply the bright glow on the clouds from the sun
shading = shading * gl
Fade the amount of cloud by the haze (according to distance)
CloudVal = c * h
Alpha-Blend the clouds with the blue sky using CloudVal
Red = Red + (CloudCol-Red) * CloudVal
Green = Green + (CloudCol-Green)* CloudVal
Blue = Blue + (CloudCol-Blue) * CloudVal
Add Lens Flare
Red = Red + fl
Green = Green + fl
Blue = Blue + fl
Now, use the exposure function, since values of Red, Green and Blue may be quite high
Red = ExposureFunction(Red)
Green = ExposureFunction(Green)
Blue = ExposureFunction(Blue)
Draw this pixel
end loop
|
References
LIGHT (in C++) ! : http://math1.uibk.ac.at/~werner/light/
Mapping Reality: Simulating Clouds : http://patate.virtualave.net/clouds/index.html
Convective Clouds : http://www-imagis.imag.fr/Membres/Fabrice.Neyret/clouds/index-eng.html
Radiant lense flare render engine : http://www.geocities.com/SiliconValley/Ridge/7251/radiant.htm
Intel Developer Site : http://developer.intel.com/software/idap/games/index.htm
Noise Machine : http://www.noisemachine.com/
Return to the Good Looking Textured Light Sourced Bouncy Fun Smart and Stretchy Page.