Re: [Algorithms] Cloud Rendering
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2010-04-12 16:49:44
|
A few years ago, when programmable shaders and multi-texturing-passes were novel, there was a lot written up on this. I remember a very in-depth article by Naty Hoffman on light scattering and how it affects color in haze, sunsets, etc. There are also cloud/sky/daylight models that you can buy and plug into your game or simulation, if you want very realistic effects. If you just want to fake it, then some combination of distance/elevation-based fog with a perturbation function, stand-in geometry that uses normal maps to simulate cloud roundness, and spherical lighting functions (clamp(1+NdotL) instead of clamp(NdotL), for example) is a quick-and-easy start. Elevation-based fog is typically implemented as two fog exponents, one for "above" and one for "below" the separating plane, and you calculate how far it travels within in each of the halves, and apply fog appropriately. Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Mon, Apr 12, 2010 at 8:11 AM, Zafar Qamar <zaf...@co...>wrote: > Hi, > > I’m trying to do some fairly realistic-looking cloud-rendering, in a 3D > game. > > > > These are the main requirements... > > > > 1) Have a high-cloud layer that can range from 0 to full coverage > > 2) Have lower clouds (sprites) that fade&roll in and out and move > around and are “lit by the Sun”, so the light can catch edges, and cause the > other side to appear in shadow etc. > > 3) Have colours of the sky change, as the sun rises/sets etc > > > > Can anyone suggest any ideas/tips/tricks or links to help me in my quest? > > > > Your input would be very much appreciated. > > > > Cheers > > Zaf > |