Global Illumination Using Photon Mapping - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Global Illumination Using Photon Mapping

Description:

Render the image using a Monte Carlo ray tracer optimized with the photon maps. ... photon p represents flux arriving at x from direction psi, we can integrate the ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 13
Provided by: noelvi
Category:

less

Transcript and Presenter's Notes

Title: Global Illumination Using Photon Mapping


1
Global Illumination Using Photon Mapping
  • March 5th 2003
  • Noel Villegas
  • CS 638

2
Table of Contents
  • Photon Mapping Overview
  • Photon Mapping Algorithm Summary
  • Previous work
  • Rendering Equation
  • Finite Elements (radiosity)
  • Conventional radiosity
  • Point sampling (ray tracing)
  • Monte Carlo ray tracing
  • Path tracing
  • Bidirectional Path tracing
  • Metropolis Light Transport
  • Constructing the Photon Map
  • Photon emission
  • Photon storing
  • Photon storing
  • Photon map data structure
  • Photon data structure implementation
  • k-d tree data structure for map
  • Rendering with the Photon Map

3
Photon Mapping Overview
  • Fast, accurate, versatile global illumination
    method
  • Allows for
  • Caustics on arbitrary surfaces
  • Volume caustics
  • Subsurface scattering
  • Color Bleeding
  • Participating Media
  • Photon map used to
  • Generate optimized sampling directions
  • Reduce number of shadow rays
  • Limit number of reflections traced as the scene
    is rendered

4
Photon Mapping Algorithm Summary
  • Build the photon maps (cache of light paths)
  • One high resolution photon map for caustics
  • One low resolution photon map for rendering
  • Render the image using a Monte Carlo ray tracer
    optimized with the photon maps.

5
Previous Work Rendering Equation
  • Kajiyas Rendering Equation generalizes
    rendering algorithms.
  • Difficult to integrate because I() appears on
    both sides of the integral. It is unknown in
    Monte Carlo ray tracing and simplified in
    radiosity.

6
Previous Work - Radiosity
  • Mathematical technique - finite element methods
  • Pros
  • View independent (allows for walkthroughs)
  • Diffuse interreflection, provides global
    illumination
  • Cons
  • O(NlogN)
  • FEM requires (possibly inaccurate) tessellation
    of geometry
  • High memory costs impractical for large models.
    Progressive radiosity reduces memory costs, but
    still expensive.
  • View independent (no specular reflection)
  • Assume every surface is Lambertian -gt reflected
    radiance is constant in all directions. Replace
    radiance with simpler term, radiant exitance aka
    radiosity.
  • Reduces the rendering equation to

7
Previous Work Point Sampling Techniques
  • Conventional (Backwards) Raytracing
  • Pros
  • Procedural geometry no tessellation required,
    geometry is a black box.
  • Allows for arbitrary BRDFs
  • Specular reflections easy since tracing from eye
    to light
  • Cons
  • Not a global illumination algorithm ? does not
    solve the rendering equation.
  • Does not handle diffuse interreflection.
  • Ignores obvious relationships between neighboring
    objects.
  • Path Tracing
  • Mathematical technique continuous Markov chain
    random walk. Solution technique can be seen as a
    Monte Carlo sampling of the Neumann series of the
    rendering equation. Trace light from light
    source to eye.
  • Pros
  • All ray tracing pros
  • Accuracy controlled at the pixel level
  • Cons
  • Large number of estimates required to capture
    diffuse interaction.
  • Variance realized as high frequency noise
  • Monte Carlo integration has standard error
    proportional to 1/root N. N of samples.
    This implies that halving the error requires
    shooting four times as many rays.
  • Techniques to improve path tracing

8
Pass 1 Constructing the Photon Map
  • Photon tracing emitting photons from light
    sources and tracing through model
  • Emit photons from light sources (flat array)
  • Scatter photons (reflecttransmitabsorb) based
    on BRDF and Russian roulette (to get photons of
    similar power in the map)
  • Store photons when they hit non-specular surfaces
    (specular surface hits give no info, use standard
    ray tracing to do specular reflections)
  • Storing photons represents flux. Stored flux
    allows you to approximate the reflected
    illumination at several points on a surface even
    if the surface is textured.
  • Organize the array of photons into a balanced k-d
    tree before rendering

9
Photon Map Data Structure
  • struct photon // photons are stored in the
    photon map data structure
  • float x,y,z
  • char p4 // power using Wards shared
    exponent RGB format
  • char phi,theta // incident direction
    (discretized spherical coordinates)
  • short flag // used for splitting plane axis
    in the k-d tree
  • // 20 bytes
  • Photon Map data structure is static during
    rendering, represents all stored photons in the
    model.
  • Not coupled to geometry.
  • Used to compute statistics of the illumination in
    the model.
  • Statistics are based on nearest photons at any
    given point -gt requires fast lookup when locating
    nearest neighbors in a 3d point set.
  • Compact and fast lookup in a 3d set lends itself
    to the k-d tree.
  • Organized as a heap structure to reduce pointer
    overhead in trees
  • Looking up M photons in a tree with N photons is
    O(Mlog2(N))

10
Pass 2 Rendering with Photon Maps
  • Render with Monte Carlo ray tracing.
  • Pixel radiance is a number of average samples of
    radiance.
  • Sample is a ray traced from eye to pixel.
    Radiance returned at a sample is the surface
    radiance Ls. Compute Ls using the rendering
    equation.
  • Lr can be solved with Monte Carlo techniques like
    path tracing, but photon mapping uses the photon
    map in combination with the BRDF and incoming
    radiance to solve.
  • Break the rendering equation into the sum of
    several components representing different light
    interactions to allow for vary accuracy/speed of
    integral calculation

11
Pass 2 Rendering with Photon Maps
BRDF light sources approximate eval
radiance estimate from global photon map
BRDF specular (specular reflection from LS

indirect soft illumination) evaluation use
MCRT
BRDF diffuse specular reflection from
LS accurate evaluation NOT MCRT, use
caustics photon map
BRDF diffuse indirect soft
illumination approximate eval radiance
estimate from global photon map
12
Pass 2 Rendering with Photon Maps
  • How to estimate radiance from photon map?
  • To compute radiance Lr, leaving an intersection
    point x at a surface with BRDF fr, we locate the
    N photons with the shortest distance to X.
  • Based on the assumption that each photon p
    represents flux arriving at x from direction psi,
    we can integrate the information into the
    rendering equation (3).
  • Approximate the integral by the finite summation
    with the number of photonsN over the small area
    approximated by a sphere of radius r.
  • Apply a cone filter instead of sphere to produce
    finer resolution results.
Write a Comment
User Comments (0)
About PowerShow.com