|
Submitted by , posted on 27 February 2001
|
|
Image Description, by
Hi there. This image comes from a test renderer I've put together to
experiment with shadowing in volumetric environments.
The model (I think it's 128^3 voxels) is a Pink noise function with some
scaling and bracketing to create the desired cloud cover.
The rendering is achieved by simply drawing the volume as 128 overlaid,
textured polygons. Each polygon is rendered twice, once textured with an RGB
transparency map, and once textured with an RGB emission map.
The transparency map is essentially just the initial volume of cloud data.
The emission volume data however, is generated by "illuminating" the cloud
data set. Illumination is achieved by sweeping a light map through the
volume data. The light levels of the map's pixels are used to illuminate the
voxels of a slice of the volume, and then the voxels are used to attenuate
the pixels of the light map, casting shadows on subsequent layers of the
volume. As well as generating shadows, the volume is "normal shaded" without
ever explicitly defining a normal data set - which is nice. The technique
works particularly well for clouds because you get glow filtering through
some of the thinner bits of fluff.
Each image takes a few seconds to draw at the moment. This is rather slow!
Most of this time is due to texture transfer, and my iBook having a sedate
3d card. In a multi-resolution setting (it's the future, boys and girls),
impostors could be used to "flatten" blocks of the volume into a single
polygon. It's a bit tricky to do shadowing "on the card" with openGL, but
it's not impossible by any means. I believe it may be a better trade off to
do the shadowing and impostor generation in software (with Shear Warp), and
final texture composting in hardware.
Cheers,
Benjohn
|
|