photon mapping + final gather light leaks

Practical and theoretical implementation discussion.
Post Reply
MohamedSakr
Posts: 83
Joined: Thu Apr 24, 2014 2:27 am

photon mapping + final gather light leaks

Post by MohamedSakr » Sun Feb 22, 2015 7:51 am

I understand how final gather works "to some extent" , I'm using PBRT 2 as a reference.
the problem is, light leaks appear at corners!!, any idea of a robust solution?

papaboo
Posts: 42
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: photon mapping + final gather light leaks

Post by papaboo » Mon Feb 23, 2015 2:59 pm

Photon mapping comes with geometric bias and light leaking. There are various ways to reduce it, but you can't remove it without an infinite number of samples and a really really really high precision backbuffer.

That being said you can 'postpone' the light leaking until it's is no longer noticeable.
Instead of doing final gathering at the first non-specular surface, you can wait until the path PDF is less then 1/PI, i.e the path itself is so out of focus that you won't notice the artefacts.
A second check you can make that postpones final gathering to avoid leaking is to continue tracing eye rays until the length of the last bounce is higher than your photon gathering radius. (kernel bandwidth). This check should help your case. Imagine that your primary ray hits a floor and traces a final gather ray to the wall 2mm away. If you gather at the wall, you'll essentially be gathering the same photons that you would on the floor, so you'll see just about the same artefacts that you would by visualizing the photon map directly. If you let the final gather ray bounce an extra time it might hit something further away and the light leaking won't be noticeable.

MohamedSakr
Posts: 83
Joined: Thu Apr 24, 2014 2:27 am

Re: photon mapping + final gather light leaks

Post by MohamedSakr » Mon Feb 23, 2015 11:26 pm

thanks a lot :) , you are correct about the corner case where the ray gathers the near wall "wrong" radiance photon!! , I think I know now how to solve it.
cheers.

Igors
Posts: 17
Joined: Sat Jan 07, 2012 11:56 am

Re: photon mapping + final gather light leaks

Post by Igors » Wed Mar 27, 2019 7:47 am

Hi, papaboo, All

Sorry for old themes reanimating but I've same prob (but no solutions)

>> A second check you can make that postpones final gathering to avoid leaking is to continue tracing eye rays until the length of the last bounce is higher than your photon gathering radius. (kernel bandwidth). This check should help your case. Imagine that your primary ray hits a floor and traces a final gather ray to the wall 2mm away. If you gather at the wall, you'll essentially be gathering the same photons that you would on the floor, so you'll see just about the same artefacts that you would by visualizing the photon map directly. If you let the final gather ray bounce an extra time it might hit something further away and the light leaking won't be noticeable. <<

Interesting approach, can you please explain/share more details? Imagine we're at final gather phase, cast a ray and found my photon map cannot be used directly at hit point (too small hit distance for example). Ok, what's next? How should I "continue tracing""? How many rays I should cast from hit poinr? Where to?

Thx

Post Reply