See what's going on with flipcode!




 


Submitted by , posted on 11 November 2002



Image Description, by


This is a screenshot from the engine I've been working on for the past several months. This image demonstrates the dynamic cloud features which I added recently.

I wanted the ability to render parameterized full-sky effects. I considered several methods, including 3D (2D + time) perlin noise mapped onto a sky dome, and dynamically rendered imposters. The perlin technique worked but required too much CPU time for decent results, and the imposter method didn't seem able to do full-sky effects with sufficient detail at interactive framerates.

My solution was to use a simple particle model. Each particle has an cloud texture with an alpha channel. The particles are distributed so that the majority of particles are small and on the outer surface of the cloud (currently a box volume), with relatively few large particle on the interior. This should keep particle counts low, yet provide sufficient surface resolution to implement different scattering and shadowing models. Also i expect some coarse density testing can be done to avoid rendering a large portion of the particles. The clouds are fully 3D, you can fly in and through them, although since the details are statically texture mapped, some distortion occurs when the camera orientation changes.

This method has proved quite good. I am able to simulate conditions from partial coverage to full overcast, as both individual clouds and entire sky at interactive framerates and medium resolutions on old hardware (geforce 2). Further enhancements will include better scattering and particle distribution, along with a mechanism for morphing/animating clouds dynamically.

The view frustum of this image has about 150 visible particles (it's hard to say how many are fully occluded) in two cloud groups. One group is extremely large and provides the background clouds, while another higher density/detail group is located in line with the tree.

Feel free to contact me for more information.

James Gregson



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.