Susu LI - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Susu LI

Description:

ray tracer developed by Henrik Wann Jensen, and add multiple ... real-world situations such as fog and smoke attenuate and scatter light. ... attenuation. My ... – PowerPoint PPT presentation

Number of Views:391
Avg rating:3.0/5.0
Slides: 20
Provided by: csU65
Category:
Tags: attenuate | susu

less

Transcript and Presenter's Notes

Title: Susu LI


1
Rendering Foggy images
  • Susu LI

2
Introduction
  • Goals The main focus of my final project is an
    implementation of the photon mapping method
    into
  • ray tracer developed by Henrik Wann Jensen,
    and add multiple scattering of lights in
    participating media to get foggy like effect if
    possible.
  • My system based on PBRT code

3
Photon Mapping
  • Jensen EGRW 95, 96
  • Simulates the transport of individual photons
  • Photons emitted from light sources
  • Photons bounce off of specular surfaces
  • Photons deposited on diffuse surfaces
  • Held in a 3-D spatial data structure
  • Surfaces need not be parameterized
  • Photons collected by path tracing from eye

4
Why Map Photons?
  • High variance in Monte-Carlo renderings results
    in noise
  • Collection of deposited photons into a photon
    map (a 3-D spatial data structure) provides a
    flux density estimate
  • Flux samples filtered easier than path samples,
    resulting in error at lower frequencies
  • Error is a result of bias, which decreases as the
    number of samples increase
  • And, oh yeah, its a lot faster

5
What is a Photon?
  • A photon p is a particle of light that carries
    flux DFp(xp, wp)
  • Power DFp magnitude (in Watts) and color of
    the flux it carries, stored as an RGB triple
  • Position xp location of the photon
  • Direction wp the incident direction wi used to
    compute irradiance
  • Photons vs. rays
  • Photons propogate flux
  • Rays gather radiance

wp
DFp
xp
6
Sources
  • Point source
  • Photons emitted uniformly in all directions
  • Power of source (W) distributed evenly among
    photons
  • Flux of each photon equal to source power divided
    by total of photons
  • For example, a 60W light bulb would send out a
    total of 100K photons, each carrying a flux DF of
    0.6 mW
  • Photons sent out once per simulation, not
    continuously as in radiosity

7
Russian Roulette
?
  • Arvo Kirk, S90
  • Reflected flux only a fraction of incident flux
  • After several reflections, spending a lot of time
    keeping track of very little flux
  • Instead, completely absorb some photons and
    completely reflect others at full power
  • Spend time tracing fewer full power photons
  • Probability of reflectance is the reflectance r.
  • Probability of absorption is 1 r.

r 60
8
Mixed Surfaces
  • Surfaces have specular and diffuse components
  • rd diffuse reflectance
  • rs specular reflectance
  • rd rs lt 1 (conservation of energy)
  • Let z be a uniform random value from 0 to 1
  • If z lt rd then reflect diffuse
  • Else if z lt rd rs then reflect specular
  • Otherwise absorb

rd 50 rs 30
9
Storing Photons
  • Uses a kd-tree a sequence of axis-aligned
    partitions
  • 2-D partitions are lines
  • 3-D partitions are planes
  • Axis of partitions alternates wrt depth of the
    tree
  • Average access time is O(log n)
  • Worst case O(n) when tree is severely lopsided
  • Need to maintain a balanced tree, which can be
    done in O(n log n)
  • Can find k nearest neighbors inO(k log n) time
    using a heap

10
Reflected Radiance
  • Recall the reflected radiance equation
  • Convert incident radiance into incident flux
  • Reflected radiance in terms of incident flux
  • Numerically

DA pr2
11
How Many Photons?
  • How big is the disk radius r?
  • Large enough that the disk surround
  • s the n nearest photons.
  • The number of photons used for a
  • radiance estimate n is usually
  • between 50 and 500.

Radiance estimate using 50 photons
Radiance estimate using 500 photons
12
Filtering
  • Too few photons cause blurry results
  • Simple averaging produces a box filtering of
    photons
  • Photons nearer to the sample should
  • be weighted more heavily
  • Results in a cone filtering of photons

13
Participating media
  • We have by far assumed that the scene is in a
    vacuum. Hence, radiance is constant along the
    ray. However, some real-world situations such as
    fog and smoke attenuate and scatter light. They
    participate in rendering.
  • Natural phenomena
  • Fog, smoke, fire
  • Atmosphere haze
  • Beam of light through
  • clouds
  • Subsurface scattering

14
Volume scattering processes
  • Absorption (conversion from light to other forms)
  • Emission (contribution from luminous particles)
  • Scattering (direction change of particles)
  • Out-scattering
  • In-scattering
  • Single scattering v.s. multiple scattering
  • Homogeneous v.s. inhomogeneous(heterogeneous)

emission
in-scattering
out-scattering
absorption
15
Single scattering and multiple scattering
attenuation
single scattering
multiple scattering
16
My implementation
  • Preprocessing the scene by shooting a specified
    number of photons from light sources out into the
    scene
  • Implemented new integrator works for surface and
    volume
  • Implemented the ray marching method to handle
    non-homogenous media

17
Problem encoutered
  • Render the scene by infinite area light sources
  • The caustic effect vanished

18
Result
  • For TT car
  • Numbers of photons shooted by light 500,0k
  • For spotfog
  • Numbers of photons shooted by light 1.178M
  • For steambath
  • Numbers of photons shooted by light 178.2K

19
Reference
  • 1 Eric P. Lafortune, Yves D. Willems. Rendering
    participating media with bidirectional path
    tracing, Rendering Techniques '96 (Proceedings of
    the 7th Eurographics Workshop on Rendering), pp.
    92-101, 1996
  • 2 Henrik Wann Jensen, Per H. Christensen,
    Efficient simulation of light transport in scenes
    with participating media using photon maps,
    Proceedings of the 25th annual conference on
    Computer graphics and interactive techniques,
    p.311-320, July 1998
  • 3 Wojciech Jarosz, Craig Donner, Matthias
    Zwicker, Henrik Wann Jensen, Radiance caching for
    participating media, ACM SIGGRAPH 2007 sketches,
    August 05-09, 2007, San Diego, CA
Write a Comment
User Comments (0)
About PowerShow.com