cs775 course projecthitesh/photon_mappi… · cs775 course project gaurav bhagwat hitesh...

16
CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination Known techniques Photon Mapping Upgrade: Progressive Algo A New Approach Error Estimates Approaching Goal Published Results Our Implementation Roadmap References CS775 Course Project Progressive Photon mapping: A Probabilistic Approach Gaurav Bhagwat Hitesh Kewalramani Indian Institute of Technology, Bombay March 27, 2012

Upload: others

Post on 09-Aug-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

CS775 Course ProjectProgressive Photon mapping: A Probabilistic

Approach

Gaurav BhagwatHitesh Kewalramani

Indian Institute of Technology, Bombay

March 27, 2012

Page 2: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Outline

Background: Global IlluminationKnown techniquesPhoton MappingUpgrade: Progressive Algo

A New ApproachError EstimatesApproaching GoalPublished Results

Our Implementation Roadmap

References

Page 3: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

What we know ...

I Solutions to rendering equationI Ray Tracing (LDS*E)I Radiosity (LD*E)I Distributed Ray Tracing (Monte Carlo) and Path Tracing

(??)

I Limitations?

Figure: http://graphics.ucsd.edu/h̃enrik/images/cbox.html

Page 4: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

A new method

I Goal: Reduce High freq error, same efficiency, decoupleillumination, capture all paths (Whats new??) .

I Photon Mapping is two-pass global illumination algorithm.

I Photon Tracing (1st pass): Construction of Photon MapsI Photons shoot from light source to hit surfaces of various

materials.I Russian roulette - Absorb, Reflect, Transmit (Error?).I Store the hit point in kd-tree (Hence a Map!!).I Three photon Maps - Global, Caustic, Direct.

Page 5: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

A Photon Map

Figure:www.cs.utexas.edu/mechin/photonmapping/photonmapping.htm

Figure: Realistic Image Synthesis using Photon Mapping (Book)

Page 6: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Rendering (2nd Pass)

c = L(x , ω) ≈ 1

∆A

M∑j=1

fr (x , ωp, ωj)∆φ(x , ωj) (1)

I Gather the M nearest photons using the nearest neighborsearch function on the photon map.

I For each photon, divide the amount of flux (real photons)that the photon represents by the area of ∆A (also calledkernel) and multiply by the BRDF applied to that photon.

I The sum of those results for each photon represents totalsurface radiance returned by the surface intersection in thedirection of the ray that struck it.

Page 7: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Photon Mapping Process

Figure: http://www.spot3d.com/vray/help

Page 8: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Limitations

I Variance due to Russian roulette, also slow convergence.

I Huge Memory.

I Sparse Scenes?

Page 9: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

A better way...

I No need to do everything in one step. Also lets focus onlyon visible points ( A new 1st pass).

I Photon mapping generation remains the same.

I Photon tracing or radiance estimate done incrementally.

I Converges fast.

Figure: Progressive Photon Mapping [1]

Page 10: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Limitations

I Still we need to store local charactericstics.

I Number of Photons? Number of Passes? (A tradeoff?)

I No reduction in Error :(

I Correctness?

Page 11: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Scope for improvement

I Keep the approach same, progressive.

I Goal: Reduce Error and Variance.

I Do something about the memory.

I How?? ... we know that Photon mapping computes aMonte Carlo estimate of reflected radiance L(x , ω) as

L(x , ω) ≈ 1

M

M∑j=1

kr (xj − x)γj (2)

Page 12: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Relationships

I The error ε(x , r) is given as difference between radiancecalculated at position x using a kernel kr and the truevalue L(x , ω).

ε(x , r) =1

M

M∑j=1

kr (xj − x)γj − L(x , ω) (3)

I The variance of the error ε(x , r) is given as

Var [ε(r , x)] ≈ (Var [γ] + E [γ]2)pl(x)

Mr2

∫k(ψ)2dψ (4)

where the p.d.f of a photon in support of kernel kr is givenas pl(x) and γj are the random values as samples ofrandom variable γ.

I Expected error is following

E [ε(x , r)] = r2E [γ]τ (5)

Page 13: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

What those new values mean??

I Given the above values, equation 1 becomes

c̄N =1

N

N∑i=1

1

pe(xi , ωi )W (xi , ωi )(L(xi + ωi ) + εi ) (6)

I Giving the average error in radiance estimate as ε̄N , andvariance as Var [ε̄N ], it is stated that,

N →∞,Var [ε̄N ] = 0⇒ Var [c̄N ] = 0

N →∞,E [ε̄N ] = 0⇒ E [c̄N ] = c

I The Magic...let the variance of radiance estimate increaseby small factor in every time step i , such that the averageit still vanishes.

r2i+1

r2i=

Var [errori ]

Var [errori+1]=

i + α

i + 1(7)

Page 14: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Results

I same as progressive mostly.

I well behave in edges and corners.

I Almost same time.

I Less memory :)

Page 15: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

Steps

I Implement Photon mapping (1st pass)

I Make it progressive.

I Try Probabilistic.

I Result Comparison.

Page 16: CS775 Course Projecthitesh/Photon_Mappi… · CS775 Course Project Gaurav Bhagwat Hitesh Kewalramani Background: Global Illumination. Author: Gaurav Bhagwat Hitesh Kewalramani Created

CS775 Course Project

Gaurav BhagwatHitesh Kewalramani

Background: GlobalIllumination

Known techniques

Photon Mapping

Upgrade: Progressive Algo

A New Approach

Error Estimates

Approaching Goal

Published Results

Our ImplementationRoadmap

References

References

Claude Knaus and Mathhias Zwicker Progressive PhotonMapping. ACM Trans. Graph. 2011

Hachisuka, Toshiya and Ogaki, Shinji and Jensen, HenrikWann Progressive Photon Mapping. ACM Trans. Graph.Dec 2008