Rain, Fog, Lighting, and Snow
See also: commercial SDKs on the Clouds
page which also do Rain, Lightning, etc.
Rain
- Markus Hein [email]
writes:
"I began to implement some rain-tests. Rain seems to be a tricky thing,
consisting of a lot of components to make the scene real and not looking
synthetic. The part I had good results with was the visible rain-effects
"close to the lens". Falling particles, from an emitter that was moved with
the camera, and 'ripples' and that was made with FIXED-aligned particles
over the surface (interpolating the particle's size&alpha) But, this is
just a result like one of thousands of "GL-Rain-Demos" I have found on the
net. If we want to have a real rainy scene so we have to go further. I
think that the rain-component "far from the lens" is stuff for using
Shader-Programs on modern 3D-hardware."
- rain demo [2002] at
Kevin Hawkins' gamedev site [2003] shows rain falling as short grey lines simulating
motion blur of the falling drops
- many of the "rain demos" out there aren't rain, but rather ripples, as
if from raindrops
-
Simulation
of Rain in Videos, Starik and Werman, 2003
[pdf]
- analysis of how rain appears in actual video footage, and
description of how to simulate the same results, without any knowledge
of the 3D scene
- although this paper deals with video, it should certainly apply to
realtime 3D rendering as well
- interestingly, they don't use any kind of particle system,
they don't track raindrops from frame to frame - apparently, humans
can't see the individual drops nor even whether they are going up or
down!
- an important part of their approach is darkening the image
(decreasing brightness and saturation)
- corresponding videos are on the page
Rain
Simulation Results
Fog & Haze
- It's easy to turn on fog in OpenGL, which is a type of uniform haze. However, not only is it restricted to uniform density in all direction,
you cannot vary it's color by direction either, so it does not co-exist well
with a sky dome.
- For example, when the sunset makes the sky orange in the west, the fog
color will clash with the orange in that part of the sky.
- Johan
Hammes
wrote:
- "Since your field of view is fairly narrow always (smaller than 60
degrees), it's possible to calculate the average color of the skydome at
the horizon, and change the fog color to reflect this. I have done this
in the past with stunning results.
- Remember to also increase the amount of fog as you are looking into
the sun. This simulates the strong forward scattering found in fog and
clouds. When looking towards the sun through fog, because of forward
scattering the fog appears brighter, and as a result you are able to
distinguish less detail through it. This is most easily simulated by
increasing the fog density as a function of the angle towards the sun."
- Another option is to render the skydome as
fog, using the alpha channel as described by Clint Brewer
- DigiBen's
OpenGL tutorials include a section on Volumetric Fog which shows how to
use
glFogCoordfEXT
to accomplish it with one rendering pass
Lightning
-
The Digital Ceraunoscope: Synthetic Thunder and Lightning
- Andrew Glassner, Microsoft Research, 1999
- actually models the relationship between the shape of the lighting
and the sound of the thunder it produces (!)
- Visual Simulation of Lightning (pdf
requires ACM library membership)
- Brian Wyvill and Todd Reed, University of Calgary, 1993
- focus is on producing a ray-tracing model of randomized lightning
-
Efficient Rendering of Lightning Taking into Account
Scattering Effects due to Cloud and Atmospheric Particles
- Yoshinori Dobashi, Tsuyoshi Yamamoto, Tomoyuki Nishita, Proc. of the
9th Pacific Conference, 2001
- Visual Simulation of Lightning Taking into Account Cloud Growth
- B.Sosorbaram, T.Fujimoto, K.Muraoka and N.Chiba, Proceedings CGI2001
- Probabilistic Technique for the Synthetic Imagery of Lightning
- P. Kruszewski, Computers & Graphics, Vol.2, No.2, 1999
Snow
- snow which is already on the ground (rather than falling) is generally
treated as a problem of distributing the snow texture on the ground in a
realistic fashion
- "The Synthesis of Snowcovered Terrains", MIT, 1996 [no longer online]
- academic paper which uses a raytraced heightfield rather than a
texture
- "creates the snow mesh according to the geometry of the terrain and
other
user
inputs, e.g. temperature, snow quantity, density of virtual snow guages,
etc."
- "A
Modeling and Rendering Method for Snow by Using Metaballs", Tomoyuki
Nishita. 1997
- models the shape and shading model of snow, based on the physical
phenomenon
-
Computer Modelling Of Fallen Snow (pdf), Paul Fearing, 2000
- simulates snow distribution with "an adaptive particle/surface
hybrid"