Re: Cloud Rendering

Jon Watte <[email protected]> Mon, 12 Apr 2010 09:49:37 -0700
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
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 <[email protected]>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
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list