real-time cloud rendering

22
Real-Time Cloud Rendering Alex D’Angelo alexz @ FusionIndustries .com March 3, 2003

Upload: cher

Post on 06-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Real-Time Cloud Rendering

Real-TimeCloud Rendering

Alex D’Angelo alexz@FusionIndustries

.com

March 3, 2003

Page 2: Real-Time Cloud Rendering

Intro

Clouds are a common part of nature. Several types (cumulus Relatively complex to simulate and

render.

Page 3: Real-Time Cloud Rendering

Some Previous Techniques

Fluid Simulation Cloud Textures

Page 4: Real-Time Cloud Rendering

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.

Page 5: Real-Time Cloud Rendering

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).

Page 6: Real-Time Cloud Rendering

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)

Page 7: Real-Time Cloud Rendering

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.

Page 8: Real-Time Cloud Rendering

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

Page 9: Real-Time Cloud Rendering

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.

Page 10: Real-Time Cloud Rendering

Cloud Formation Alternative

Artists can manually place clouds or “spray” particles.

Useful for strategically placing clouds in games and animation.

Page 11: Real-Time Cloud Rendering

Lighting Idea (Pre-Process)

Simulate forward scattering Drawing particles from the light’s view

and reading back properties from the image.

Page 12: Real-Time Cloud Rendering

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.

Page 13: Real-Time Cloud Rendering

Phase Function

We use a simple Rayleigh scattering phase function

Favors scattering in the forward and backward directions

P() = 3/4(1+cos2())

Page 14: Real-Time Cloud Rendering

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.

Page 15: Real-Time Cloud Rendering

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.

Page 16: Real-Time Cloud Rendering

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.

Page 17: Real-Time Cloud Rendering

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

Page 18: Real-Time Cloud Rendering

Splitting Cloud With Objects

View Direction

Back Particle Imposter

Middle Particle Imposter

Front Particle Imposter

Object a Object b

Page 19: Real-Time Cloud Rendering

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.

Page 20: Real-Time Cloud Rendering

Questions?

Page 21: Real-Time Cloud Rendering

Links

Fluid simulation:Jos Stam:

http://www.dgp.toronto.edu/people/stam/reality/Research/pub.html

Ron Fedkiw:

http://graphics.stanford.edu/~fedkiw/

Cloud SimulationMark Harris

http://www.cs.unc.edu/~harrism/clouds/

Yoshinori Dobashi

http://www.eml.hiroshima-u.ac.jp/~doba/

Page 22: Real-Time Cloud Rendering

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