Photorealistic Rendering

53
Photorealis tic Rendering

description

Photorealistic Rendering. Photorealistic Rendering. Ray tracing v. photorealistic rendering. What illumination effects are captured by ray tracing?. What illumination effects are not captured by ray tracing?. Ray tracing v. Photorealistic rendering. Ambient Light. - PowerPoint PPT Presentation

Transcript of Photorealistic Rendering

Page 1: Photorealistic Rendering

Photorealistic Rendering

Page 2: Photorealistic Rendering

Photorealistic Rendering

Page 3: Photorealistic Rendering

Ray tracing v. photorealistic rendering

What illumination effects are not captured by ray tracing?

What illumination effects are captured by ray tracing?

Page 4: Photorealistic Rendering

AmbientLight

Ray tracing v. Photorealistic rendering

Page 5: Photorealistic Rendering

Caustics

Ray tracing v. photorealistic rendering

Page 6: Photorealistic Rendering

Color bleeding

Ray tracing v. photorealistic rendering

Page 7: Photorealistic Rendering

Ray tracing v. photorealistic rendering

LDSE notation

L - LightD - DiffuseS - SpecularE - eye

LDELSEL[D|S]ELD+ELS*DEL[D|S]+E

Describe path 1/2/3 with path notation

Which is handled by ray tracing?

Page 8: Photorealistic Rendering

Rendering samples the environment

How can the shading / illumination be modeled mathematically?

To understand how different graphics sampling strategies affect accuracy (or don’t)

Page 9: Photorealistic Rendering

Shading as integration

Bidirectional Reflectance Distribution Function (BRDF)

Rendering Equation (also called the Transport Equation)

Page 10: Photorealistic Rendering

Bidirectional Reflectance Distribution Function (BRDF)

Page 11: Photorealistic Rendering

Light at a point incoming from all directions

Page 12: Photorealistic Rendering

incoming - Field Radiance

Radiance - light at a point in a given direction

outgoing - Radiance exitance or surface radiance

Page 13: Photorealistic Rendering

Integration estimation by sampling

Shading ‘equation’ not analytic

Need to estimate shading integral by sampling

Need to understand how best to control error

Page 14: Photorealistic Rendering

Basic statistics

Probability density function (pdf)

Continuous random variable

Relative likelihood for the value of a continuous variable to occur at a point

Probability of a continuous random variable falling within a set is the integral of the pdf over the set

Page 15: Photorealistic Rendering

Basic statistics

Expected value

Standard deviation

Variation

Page 16: Photorealistic Rendering

Integration estimation by sampling

Monte Carlo Integration

Page 17: Photorealistic Rendering

Average score by integration

p(x) - pdf of score at a point on target

f(x) - score at a point on target

if xi generated with p(x)

(dart throwing example)

Page 18: Photorealistic Rendering

Integration estimation by sampling

How accurate is it?

How to estimate and reduce the error?

How to minimize the number of samples?

Page 19: Photorealistic Rendering

Law of large numbers

In the limit, sampling is correct

Page 20: Photorealistic Rendering

Stratified sampling

Sum of variances – break down into subproblems and get better estimate

Page 21: Photorealistic Rendering

Law of diminishing returns

need 4x samples to get 2x better estimate

error related to standard deviation

standard deviation proportional to

Page 22: Photorealistic Rendering

Non-uniform sampling distribution

Areas of high variability

Take more samples in those areas to reduce error

Give more weight to samples in sparse areas (value reflects more area)

Page 23: Photorealistic Rendering

Importance sampling

sample non-uniform distribution

uniform sample & weigh by distribution

non-uniform sample & weigh evenly

Page 24: Photorealistic Rendering

Alternatives to Ray Tracing

Trace rays from light source?

Trace more rays from eye?

Do both?

Page 25: Photorealistic Rendering

Radiosity - Jim Kajiya

Propogate diffuse light around environment: LD*E

Break environment up into micro-patches

Not a ray tracing approach - usually combined with it

Determine pairwise visibility between each pair of micro-patches

From Heat Transfer Theory develped in the ‘50s

Precompute diffuse (viewer independent) illumination

Page 26: Photorealistic Rendering

Radiosity - Form Factor

pairwise visibility of micropatches

Page 27: Photorealistic Rendering

Radiosity - form factor

Page 28: Photorealistic Rendering

Radiosity - form factor

Page 29: Photorealistic Rendering

Radiosity

Solve large matrix equation

Page 30: Photorealistic Rendering

Radiosity - progressive refinement

Initially

Itertively add emissions propogated around enviroment

Page 31: Photorealistic Rendering

Radiosity

Page 32: Photorealistic Rendering

Radiosity

Page 33: Photorealistic Rendering

Path Tracing - Jim Kajiya

Extension of ray tracing

At every intersection, select random direction to generate secondary (and beyond) ray - Do this a lot

Until it hits a light sourceUntil a certain maximum depth

http://graphics.ucsd.edu/~iman/BDPT/Diagrams from:

Probabilistically terminate“Russian Roulette”

Page 34: Photorealistic Rendering

Path Tracing

Improve by illuminating each intermediate point

Page 35: Photorealistic Rendering

Path Tracing

Accurate - if enough rays are generated

Inefficient

Unbiased

Accurate in the limit

http://feeblemind.tuxfamily.org/dotclear/images/cimetiere-des-pixels/sunflow/sponza/sponza_SF-path_tracing-logo.png

Page 36: Photorealistic Rendering

Path Tracing

http://graphics.ucsd.edu/~iman/BDPT/From:

Page 37: Photorealistic Rendering

Path Tracing

http://sunflow.sourceforge.net/gallery/v0060/livingroom.png

Page 38: Photorealistic Rendering

Light Tracing - Philip Dutre

Generate a bunch of ‘particles’ at light source

Trace each particle through environment

Every time a hitcalculate contribution to eyerandomly bounce particle into scene

Probabilistically terminate

unbiased

Page 39: Photorealistic Rendering

Light Tracing

Page 40: Photorealistic Rendering

Light Tracing

: www.graphics.cornell.edu/~eric/thesis/images.html

Page 41: Photorealistic Rendering

Light Tracing

Page 42: Photorealistic Rendering

Photon Mapping - Henrik Wann Jensen

2nd pass - ray tracing with indirect illumination coming from querying the photon map by shooting secondary rays

Biased - photon map is sparse, so at query point photon map is interpolated from close-by photon deposits

2 pass algorithm

1st pass - photons shot from light source and ‘deposited’ on surfaces as they bounce around the environment - probabalistically

Page 43: Photorealistic Rendering

Photon Mapping

http://web.cs.wpi.edu/~emmanuel/courses/cs563/write_ups/zackw/photon_mapping/PhotonMapping.html

Page 44: Photorealistic Rendering

Photon Map

http://jgt.akpeters.com/papers/Christensen99/Fig2a.jpg

Page 45: Photorealistic Rendering

Photon Mapping

From

http://www.ypoart.com/tutorials/photon/index.php

Page 46: Photorealistic Rendering

Photon Mapping

Page 47: Photorealistic Rendering

Photon Mapping

Page 48: Photorealistic Rendering

Bi-Directional Path Tracing

Generate paths from light

Generate paths from eye

Hook up vertices from one path to vertices of other path, to get multiple paths from eye to light

Page 49: Photorealistic Rendering

Bi-Directional Path Tracing

http://graphics.ucsd.edu/~iman/BDPT/

From:

Page 50: Photorealistic Rendering

Bi-Directional Path Tracing

Page 51: Photorealistic Rendering

Bi-Directional Path Tracing

Page 52: Photorealistic Rendering

Bi-Directional Path Tracing

Page 53: Photorealistic Rendering

Consider

http://www.yafaray.org/documentation/userguide/lightingmethods#methods