Lattice-Boltzmann Lighting By Robert Geist , Karl Rasche , James Westall and Robert Schalkoff

29
LATTICE-BOLTZMANN LIGHTING BY ROBERT GEIST, KARL RASCHE, JAMES WESTALL AND ROBERT SCHALKOFF William Moss Advanced Image Synthesis, Fall 2008

description

William Moss Advanced Image Synthesis, Fall 2008. Lattice-Boltzmann Lighting By Robert Geist , Karl Rasche , James Westall and Robert Schalkoff. Quickly!. Motivation. Visual simulation of smoke , Fedkiw et al., 2001. - PowerPoint PPT Presentation

Transcript of Lattice-Boltzmann Lighting By Robert Geist , Karl Rasche , James Westall and Robert Schalkoff

Page 1: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

LATTICE-BOLTZMANN LIGHTING BY ROBERT GEIST, KARL RASCHE, JAMES WESTALL AND ROBERT SCHALKOFF

William MossAdvanced Image Synthesis, Fall 2008

Page 2: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

2

MOTIVATIONSeptember 25, 2008

Quickly!

Visual simulation of smoke, Fedkiw et al., 2001

Metropolis Light Transport for Participating Media, Pauly et al, 2000

Efficient simulation of light transport in scenes with participating media using photon maps, Jensen and Christensen, 1998

Page 3: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

3

OVERVIEW Background on participating media Participating media as diffusion Lattice-Boltzmann methods

Background Solving the diffusion equation Results

September 25, 2008

Page 4: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

4

PARTICIPATING MEDIA BACKGROUND Interactions take place at all points in the

medium, not just the boundaries Solve the volume radiative transfer equation:

where f is the phase, σa is the absorption coefficient, σs is the scattering coefficient, σt = σa + σs and Le is the emissive field

September 25, 2008

wxLxwwxLwwxfxwxLxxwx,L

tsea

,'',,',,

Page 5: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

5

Radiance =

PARTICIPATING MEDIA BACKGROUNDSeptember 25, 2008

Emission − Out-scattering− Absorption + In-scattering

Diffuse Intensity (Id)

Reduced Incident Intensity (Iri)

Page 6: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

6

PARTICIPATING MEDIA BACKGROUND

Ray xu = x0 - us

September 25, 2008

Page 7: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

7

REDUCED INCIDENT INTENSITY

Where I is the incident intensity, σt = σa + σs and ρ is the density of the medium

Trace a ray through the medium, integrating:

September 25, 2008

Page 8: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

8

DIFFUSE INTENSITY As the medium becomes thick

Number of scattering events increases Directional dependence decreases Light distribution tends towards uniformity

Approximate the diffuse intensity First two Taylor expansion terms in the directional

component Results in a diffusion equation for average Id

See Stam, ‘95 for full derivation

September 25, 2008

Page 9: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

9

LATTICE-BOLTZMANN METHODS First introduced in as the Lattice-Gas Automaton

(1987) Lattice-Boltzmann model (1988)

A system specified by interactions with neighbors Simple local interaction functions can model complex

macroscopic phenomena Dates back to 1940s with cellular automata

Game of life

September 25, 2008

Page 10: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

10

LATTICE-BOLTZMANN METHODS Heart of the method is the lattice

Some have used hexagonal, they choose a grid Each point connected to the surrounding points

Stores “directional density,” density flowing in that direction

For a 3D grid, 18 directional densities per node

September 25, 2008

Page 11: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

11

LATTICE-BOLTZMANN METHODSSeptember 25, 2008

2 distanceat

shown) (8 neighbors 121 distanceat neighbors 6

Page 12: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

12

LATTICE-BOLTZMANN METHODS Flow is represented by a matrix, Θ

Θij – fraction of flow in direction j that will be diverted to direction i

Updates performed synchronously

ΘI = O I is the vector of current densities O is the vector of densities flowing out of that site

September 25, 2008

ji

Page 13: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

13

LATTICE-BOLTZMANN METHODS An alterative to FEM for solving coupled PDEs

Comparable speed, stability, accuracy and storage Widely used for solving fluid flow in physics

Multiple methods for simulating the incompressible, time-dependant Navier-Stokes

Used in graphics for modeling gases Also Navier-Stokes

September 25, 2008

Page 14: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

14

LATTICE-BOLTZMANN METHODS Advantages

Easy to implement Easy to parallelize Easy to handle complex boundary conditions

Disadvantages Specified by microscopic particle density interactions Difficult to deduce rules given a macroscopic system

September 25, 2008

Page 15: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

15

LATTICE-BOLTZMANN SOLUTION Choose Θ such that in the limit, we get the

diffusion equations Start simple, isotropic scattering

σa, is absorption at each lattice point

September 25, 2008

Page 16: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

16

LATTICE-BOLTZMANN SOLUTION For axial rows (i = 1…6):

For non-axial rows (i = 7…18):

September 25, 2008

Page 17: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

17

LATTICE-BOLTZMANN SOLUTION Show this simulates a diffusion process

Put light into the system, let it “settle” and render

Start with:

Where fi(r, t) is the density at site r at time t in direction ci, λ Is the lattice spacing, τ is the time step and Θi is the ith row of Θ

The ci directions are all 18 previous flow directions

September 25, 2008

Page 18: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

18

LATTICE-BOLTZMANN SOLUTION Let λ and τ go to 0 (see paper for full, 1 page, proof): Result is a diffusion equation (phew):

September 25, 2008

Page 19: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

19

ANISOTROPIC SCATTERING Modify Θ

Remember Θij is the fraction of flow in direction cj that will be diverted to direction ci

Weight values unevenly For forward-scattering, weight values where cj ·ci < 0 more

heavily For back-scattering, do the reverse

September 25, 2008

Page 20: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

20

ANISOTROPIC SCATTERING Scale σs in Θij by

Where pi,j is a discrete version of Henyey-Greenstein phase function

Where ni = ci / |ci| and g defines the scattering g > 0 provides forward scattering, g < 0 back scattering

September 25, 2008

Page 21: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

21

INCIDENT LIGHT Add light at the boundaries of the lattice

Choose the lattice direction with the largest dot product with the light direction

Fix the inflow in that direction to the dot product Reduce the remaining incident light by that amount Repeat for remain directions Apply the inflow to boundary nodes

Only handles directional light Fine for clouds

September 25, 2008

Page 22: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

22

SOLVING THE SYSTEM Inject the light at the boundaries For each node

Distribute the incoming density according to the collision rules (i.e. ΘI = O)

Flow the distributed density to the neighboring nodes Repeat

September 25, 2008

Page 23: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

23

SOLVING THE SYSTEMSeptember 25, 2008

Page 24: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

24

Radiance =

PARTICIPATING MEDIA BACKGROUNDSeptember 25, 2008

Emission − Out-scattering− Absorption + In-scattering

Diffuse Intensity (Iri)

Reduced Incident Intensity (Id)

Page 25: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

25

RENDERING THE VOLUME DENSITIES Have the outward flowing density at every point

This represents the number of photons Sum all the directions to represent the illuminate

Could use viewer location, if desired Shoot rays into the volume

Attenuate the value due to the reduced indecent intensity

Increase the value due to the illuminate at intersected lattice cells

September 25, 2008

Page 26: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

26

RESULTS

Isotropic Scattering

September 25, 2008

Page 27: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

27

RESULTSSeptember 25, 2008

Forward Scattering

Page 28: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

28

RESULTSSeptember 25, 2008

Page 29: Lattice-Boltzmann Lighting By Robert  Geist , Karl  Rasche , James  Westall  and Robert  Schalkoff

29

REFERENCES Robert Geist, Karl Rasche, James Westall and

Robert Schalkoff, Lattice-Boltzmann Lighting, Proc. Eurographics Symposium on Rendering, June, 2004

Jos Stam, Multiple scattering as a diffusion process, Eurographics Rendering Workshop, 1995

Eva Cerezo, Frederic Pérez, Xavier Pueyo, Francisco J. Seron and François X. Sillion, A survey on participating media rendering techniques, The Visual Computer, June 2005

September 25, 2008