Cloud Rendering
Download
Report
Transcript Cloud Rendering
Real-Time
Cloud Rendering
Alex D’Angelo
[email protected]
March 3, 2003
Intro
Clouds are a common part of nature.
Several types (cumulus
Relatively complex to simulate and
render.
Some Previous Techniques
Fluid Simulation
Cloud Textures
Fluid Simulation
Fluid system is governed by simplified
Navier-Stokes and other fluid dynamics
equations.
2D/3D grid system of exchanging energy.
Realistic simulation and interaction but slow!
Simulation in software and rendered using
raytracing -- doesn’t take advantage of
graphics hardware.
Refer to papers by Stam and Fedkiw.
Cloud Textures
Cloud textures are blended with sky
plane or sky box.
User cannot interact with clouds.
Quick to draw but very unrealistic.
Takes advantage of graphics hardware.
Typically seen in games (i.e. Quake).
Proposed Technique
Hybrid fluid flow/texture solution.
Clouds are represented as particles.
Real-time and interactive.
Simulates and renders clouds with
thousand of particles.
Takes advantage of graphics hardware.
Research by Dobashi (2000) and Harris
(2001)
Basic Idea
Each cloud is a particle system.
Cloud evolves based on cellular
automata.
Two-pass lighting
– Preprocess lights (sun, moon, etc).
– Forward scattering lighting at run-time.
Clouds are rendered using imposters.
Cloud Particles
Particle represents a small portion of
the humid air which makes up the cloud.
Properties:
– Spherical shape
– Density (“albedo”)
– Extinction (humidity drop-off from center)
– Color
Cloud Formation Simulation
Physical formation based on cellular
automata.
Course volumetric grid with 3 Boolean
properties at each location:
– Humidity
– Cloud
– Phase transition
External influences: wind, time.
Refer to [Dobashi2000] for complete rules.
Cloud Formation Alternative
Artists can manually place clouds or
“spray” particles.
Useful for strategically placing clouds in
games and animation.
Lighting Idea (Pre-Process)
Simulate forward scattering
Drawing particles from the light’s view
and reading back properties from the
image.
Lighting (Pre-Process)
View particles from light’s point-of-view
Sort particles by distance to light
Clear the frame buffer
For each particle in the cloud
– Calculate light intensity where particle will be
drawn.
– Particle color is function of intensity, density, area.
– Splat particle with particle color modulated by a
phase function.
Phase Function
We use a simple Rayleigh scattering
phase function
Favors scattering in the forward and
backward directions
P() = 3/4(1+cos2())
Rendering Clouds
Particles are drawn as textured
billboards.
Particles are sorted by distance to eye.
Each particle is lighted by modulating its
color by the phase function, then drawn
using alpha-blending in the frame buffer.
Faster Clouds
Use imposters!
Clouds are rendered to a textured and
shown as a viewer-aligned billboard.
Error metric used to determine when
cloud’s imposter needs to be updated.
Moving Objects Through Clouds
Idea: Simulate a volumetric cloud using
our cloud rendering technique and allow
an object (i.e. model of a jet) to fly
through the cloud.
Moving Objects Through Clouds
Given: an object intersecting a cloud
Algorithm:
– Sort particles by distance from eye
– Render all particles behind object
– Render object
– Render all particle in front of object
Supports any number of objects
Splitting Cloud With Objects
View
Direction
Object a
Back
Particle
Imposter
Object b
Middle
Particle
Imposter
Front
Particle
Imposter
Enhancements
Optimization by view-frustum culling per
cloud.
Full sky and time-of-day simulation
– Sun, moon movement.
– Cloud color takes on sky color.
– Lights have to be reprocessed when lights
are moved.
Questions?
Links
Fluid simulation:
Jos Stam:
http://www.dgp.toronto.edu/people/stam/reality/Research/pub.html
Ron Fedkiw:
http://graphics.stanford.edu/~fedkiw/
Cloud Simulation
Mark Harris
http://www.cs.unc.edu/~harrism/clouds/
Yoshinori Dobashi
http://www.eml.hiroshima-u.ac.jp/~doba/
Papers
[Harris2001] M. Harris and A. Lastra, "Real-Time
Cloud Rendering". Eurographics 2001 Volume 20
Number 3
[Dobashi2000] Y. Dobashi, K. Kaneda, H. Yamashita,
T. Okita, and T. Nishita. "A Simple Efficient Method
for Realistic Animation of Clouds". SIGGRAPH 2000,
pp. 19-28