Rendering Caustics Using Photon Mapping and Ray Tracing - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Rendering Caustics Using Photon Mapping and Ray Tracing

Description:

Whitted ray tracing was introduced in the 80's as a more realistic approximation ... Travels in a ray from the light source ... E(position x) = SNei /pr2. Description ... – PowerPoint PPT presentation

Number of Views:110
Avg rating:3.0/5.0
Slides: 29
Provided by: ids84
Category:

less

Transcript and Presenter's Notes

Title: Rendering Caustics Using Photon Mapping and Ray Tracing


1
Rendering Caustics Using Photon Mapping and Ray
Tracing
  • D. Narayan Brooks
  • nbrooks_at_cse.ucsc.edu
  • Computer Science Department,
  • UC Santa Cruz
  • CS 260 Professor Alex Pang
  • May 14, 2002

2
Introduction
  • Approximating realistic lighting phenomenon in
    computer graphics scenes creates a more
    compelling and engrossing viewing experience
  • The human eye is very adept at pinpointing visual
    discrepancies, especially involving lighting
  • Lighting discrepancies can cause the viewer to
    lose their current suspension of disbelief when
    viewing computer generated scenes

3
Introduction Continued
  • The intricate play between lights and the 3D
    surfaces in a scene is a computationally
    intensive process
  • The lighting process needs to be efficient while
    maintaining an acceptable depiction of the
    interaction between light and the 3D surfaces
  • Caustics are an indirect lighting phenomenon that
    add realism to the scene
  • Photon mapping attempts to efficiently capture
    lighting in general, and caustics in particular

4
Background and Previous Work
  • There has been a lot of research in global
    illumination
  • The goal is to create realistic lighting
    depictions in complex scenes in the most
    efficient manner
  • There have been many techniques and modifications
    of techniques to optimize and capture all
    different types of lighting

5
Background and Previous Work
  • Whitted ray tracing was introduced in the 80s as
    a more realistic approximation of light
    interacting with surfaces
  • Backwards ray tracing was introduced later by
    Arvo to deal with shadows and indirect
    illumination
  • Radiosity was developed as an alternative to the
    sharp images created by ray tracing
  • Many hybrids of the two techniques have been
    developed to compensate for the failings of each
    technique
  • Photon mapping is used by Jensen in 96 to
    achieve global illumination while capturing
    caustics

6
Caustics
  • What are caustics?
  • Distinct areas of high light intensity much
    brighter than the neighboring area
  • A result of indirect lighting, adding more
    realism to the scene
  • Created by light refraction and specular
    reflection
  • Refraction light bends when it encounters
    different mediums, focusing the light
    transmitted
  • Specular reflection light reflects form
    specular surfaces and illuminates diffuse
    surfaces
  • Caustics are generally encountered in scenes with
    liquids and glass objects

7
Caustics
Image from Jensen98
8
Caustics
  • Image from Jensen96

9
Global Illumination
  • There are many techniques that have been used for
    global illumination
  • Radiosity
  • Ray tracing
  • Hybrid methods
  • Photon mapping

10
Global Illumination
  • Radiosity
  • Spread color energy throughout the scene until
    a stasis point is reached
  • Only handles diffuse reflection, no specular
    reflections
  • Large memory consumption
  • Very realistic soft illumination images can be
    produced

11
Global Illumination
  • Ray tracing
  • Handles specular reflections well
  • Recursive, which can be very time consuming
  • Captures shadows, reflections, and refractions
  • Creates images that have a distinct synthetic
    signature
  • Two methods
  • Forward from the eye (view dependent)
  • Backwards - from the light source to the objects

12
Global Illumination
  • Hybrid methods
  • Incorporate diffuse and specular components into
    lighting models as well as capture indirect
    illumination
  • Suffer from large storage requirements and
    computation time
  • Photon mapping
  • An efficient hybrid method
  • Combines photons (energy shooting) with ray
    tracing
  • Achieves the different aspects of global
    illumination caustics shadows, reflections,
    refraction, and diffuse color
  • Accounts for direct and indirect illumination

13
Photon Mapping
  • What are Photon maps?
  • An efficient way to store light intensity on
    surfaces
  • Created by emitting packets of energy (photons)
    Jensen96 from a light source using backwards
    ray tracing
  • Store the photon when it hits a surface
  • High resolution map used for caustics, lower
    resolution map for diffuse and secondary
    reflection approximation

14
Photon Mapping - Photons
  • What is a photon?
  • Packet of energy emitted from a light source
  • Travels in a ray from the light source
  • Can be absorbed, reflected, or transmitted by a
    surface (using the Russian roulette method)
  • Stored in the photon map when an intersection
    occurs
  • Incoming flux is the density of photons stored on
    a surface
  • Photon structure has position, energy, incoming
    direction and caustic/regular flag
  • Photons are classified into direct and indirect
    illumination photons as well as shadow photons

15
Photon Mapping Photon Classification
  • Image courtesy of Jensen/Cooper98

16
Photon Mapping Photon Maps
  • Store photon density where photon intersects
    surface
  • High resolution caustic map
  • Use for direct visualization of caustics
  • Stores photons that were originally shot at
    specular surfaces and then reflected/refracted to
    hit diffuse surfaces
  • Lower resolution global photon map
  • Approximates light/flux
  • Stores photons emitted towards all objects
  • Not visualized directly, used for optimizing
    shadow and recursive reflection rays

17
Photon Mapping - Geometry
  • Photon maps are not coupled with the underlying
    geometry
  • If you can ray trace it, you can map it
    Jensen/Cooper98
  • Very practical for storing information on
    implicit and other procedural surfaces (i.e.
    fractals)
  • Can be extended to visualize volumes for
    participating media light transport simulation
    (clouds, god rays, smoke, etc.)
  • Kept in 3D spatial data structure based on hit
    location

18
Description
  • Photon mapping is a two pass process
  • Create the photon maps by light path tracing
  • Render the scene using ray tracing optimized by
    the photon maps information

19
Description
  • Light Path Tracing (LPT)-
  • Shoot photons from different positions on light,
    along rays to objects, and trace reflections and
    transmissions
  • Each ray carries a fraction of the photon energy
  • Deposit photon in map when it intersects a
    surface
  • Determine if the photon is absorbed or reflected
    using Russian roulette
  • If reflected, use the BRDF of the surface to find
    reflected direction

20
Description
  • Create a global and a caustic photon map by using
    LPT
  • Only shoot to specular objects for caustic map
  • Get shadow photons by only storing regular photon
    on first hit, storing shadow photons on
    subsequent hits along the ray
  • Store photon maps in a balanced multi-dimensional
    search tree, the kd tree, based on hit location

21
Description
  • Find irradiance (color energy) of the surface by
    extending a sphere to radius r, where it will
    contain the N nearest photons
  • Sum the energy from the N photons in the sphere
    and divide it by the approximated area
  • Only use caustic photons for the caustic photon
    density estimate
  • E(position x) SNei /pr2

22
Description
  • Finding N nearest photons in a sphere of radius
    r. Image from Jensen/Cooper98

r
x
23
Description
  • Use caustic map to visualize caustics directly
  • Use global map to optimize shadow tracing by only
    tracing shadow rays from locations with some
    regular photons and some shadow photons
  • Optimize reflections by using irradiance
    approximation in global photon map for secondary
    recursive reflections

24
Rendering
  • Render the scene using a two pass method
  • Create global and caustic photon maps using
    backwards ray tracing
  • Use the information stored in the photon maps for
    caustic visualization and to optimize the forward
    ray tracing
  • Use the photon densities for irradiance (color)
    information

25
Rendering First Pass
  • Create photon maps
  • Use backwards ray tracing to create caustic and
    global photon maps
  • Emit photons from light to objects
  • Store regular photons in photon map at first hit,
    and shadow photons at subsequent hits along the
    ray
  • If photon is reflected or transmitted trace
    photon along new ray, recording hits in photon
    map
  • View independent

26
Rendering Second Pass
  • Ray trace scene from the eye
  • Use forward ray tracing methods such as Monte
    Carlo or other distributed ray tracers
  • Use information stored in photon map to
  • visualize caustics
  • optimize shadow casting
  • approximate secondary recursive reflections
  • Importance sampling can be based on any
    bi-directional reflectance distribution function
    (BRDF)

27
Conclusion
  • Photon mapping is an efficient way to perform
    global illumination
  • Photon maps deal with depicting direct and
    indirect illumination as well as diffuse and
    specular reflections
  • Caustics are rendered using a specific caustic
    photon map
  • Can create visually compelling scenes due to the
    lighting realism

28
References
  • Jensen95 H. Jensen, N. Christensen. Photon
    Maps in Bidirectional Monte Carlo Ray Tracing of
    Complex Objects. Computing and Graphics. Vol.
    19, No. 2, pp. 215-224, 1995, Elsevier Science
    Ltd., Great Britain.
  • Jensen96 Henrik Wann Jensen. Global
    Illumination using Photon Maps. Rendering
    Techniques 96 Proceedings of the Seventh
    Eurographics Workshop on Rendering. pp. 21-30,
    1996, Springer-Verlag.
  • Jensenr98 Henrik Wann Jensen and Per.
    Christensen, "Efficient Simulation of Light
    Transport in Scenes with Participating Media
    using Photon Maps" , Siggraph'98, pp. 311-320.
  • Jensen/Cooper98 Presentation by S. Cooper based
    on "Efficient Simulation of Light Transport in
    Scenes with Participating Media using Photon
    Maps", 2000. http//www.cs.unc.edu/scooper/
    comp238/photonmaps.ppt
Write a Comment
User Comments (0)
About PowerShow.com