SD PathsFrom Light To SpecularTo DiffuseTo CameraProblem: Tracing from ViewerSample SemisphereRed path very improbable
Easy way to solve problemStart tracing at lightDiffuse surface -> Force ray to camera -> no samplingOther caustics related path problematic
Instead of Camera -> DiffuseCamera -> Specular -> Diffuse
Cannot force ray to cameraRed path highly improbableSlowly convergingReal life examples?
First specular bounce: Light in glassSpecular reflections in scene very inefficient
Water in a swimming poolCaustic effects on bottom of poolSchematic
Light enters -> specularCaustics on ground -> diffuseSeen through surface -> specularSame setup as before
More efficient solution: Photon MappingExplain PM for special case:SDS paths
Same setupSDS PathSimilar as Light TracingStart at lightsource
Trace photons into sceneBounce at specular surfaceHit diffuse surface
At diffuse surface: STORE3D structure like KD-TreeTrace millions of photonsAccess them in following pass
RaytracingShoot rays into sceneBounce on specular surfaceOn diffuse surface: Estimate Photon Density
Top view Middle: hit point of ray tracingFind n-Nearest photons (KD-Tree handy)Radius of disk = Distance to n-th nearest photonDensity = photons / areaDensity -> Estimate Illumination-> Good approximationBut Problem
Quality <- # photonsStore all photons-> #photons limited by memory
PM does not allow arbitrary precision MCPT: Calculate longer -> better qualityPM: Hardware limits quality
PPM makes a few changes to PM
Photon Tracing pass-> Store all photonsRay Tracing pass-> Estimate IlluminationFirst Change:
Turn around.First Ray Tracing, then Photon Tracing.How does this work?
Same algorithm as ray tracing in non-progressiveStore all hit points (KD-Tree)-> Structure of all visible points
Then shoot photons. Store all photonsThen estimate illumination of each hitpointAdvantage for Progressive Photon Mapping
We can do multiple passes of photon tracingWith just one ray tracing pass.Progressively enhance qualityWithout storing photonsNot trival
2 passes of photon tracingEstimate photon density of accumulation Second pass will yield similar radius
When merging both casesK-Nearestneighbours should return smaller radius
Represent growing frequencyRadius converge to zeroProblem: N-Nearest neighbors not possibleWe need an estimate
Assume homogeneousDetermine densityMultiply with new area to get number of photonsDetermine R
For consistencyConverge to right solutionAdd photons in every iteration-> new parameter alpha-> fraction of photons to keepKnow number of photons -> determine radius
Another problem:Accumulate flux every iterationFlux depends on area. Cannot simply add flux, correct by ratio of areas
More efficient solution: Photon MappingExplain PM for special case:SDS paths
PT badLT good on diffuse surfaceBad on specular -> cameraPM good, but low freqPPM better quality
Diffuse Torus in glassPT Bad qualityBDPT again good on caustics on diffuseBad on SDSGood results in PPM
Reflection of causticsNot efficiently possible with MC