Source of non-symetric scattering : refraction ?

Practical and theoretical implementation discussion.
Post Reply
spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Source of non-symetric scattering : refraction ?

Post by spectral » Wed Sep 05, 2012 7:49 pm

Dear all,

I have a question about the factor to use to have correct refraction due to non-symetry. In the Veach thesis :
The radiance along viewing rays is scaled by (eta_t/eta_)^2 when they cross the interface, but the particle weights are left unchanged.
So, it mean that for the adjoint case I have to multiply by 1/(eta_t*eta_t) ?

Thanks
Spectral
OMPF 2 global moderator

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by ingenious » Wed Sep 05, 2012 9:22 pm

It means that when an eye path goes from Medium1 to Medium2, you multiply the path throughput by (EtaMedium1 / EtaMedium2)^2. For light paths you simply don't.
Image Click here. You'll thank me later.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by spectral » Thu Sep 06, 2012 7:55 am

Thanks a lot,

It was confusing with eta_t and eta_i, but now it is clear when I read it once again.
I'm just surprised that I have never see this correction in any path tracer :-P (I have to re-check this ! but never notice it !!)

:-P
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by apaffy » Thu Sep 06, 2012 9:28 am

Well, my understanding is that unless you have non-specular bounces within some medium, the two boundaries (in and out of the medium) cancel out and it does not affect the image.

I've always been interested in implementing the basic radiance approach described by Veach, but not yet attempted it. Would someone that has implemented this be willing to share any tips/insights into this approach?

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by spectral » Thu Sep 06, 2012 9:45 am

apaffy wrote:Well, my understanding is that unless you have non-specular bounces within some medium, the two boundaries (in and out of the medium) cancel out and it does not affect the image.

I've always been interested in implementing the basic radiance approach described by Veach, but not yet attempted it. Would someone that has implemented this be willing to share any tips/insights into this approach?
My understanding is that they not completely cancel out. Even a perfect mirror BSDF is based on fresnel law and so, some absorption is still possible. So, you can't cancel everything. By example, if you use a IOR of 1.5 then you will have a 'dark mirror'. So, your pdf = 1 if the Wi is the exact reflected direction, in the other case your pdf = 0. So, it mean that you still have to account for the BSDF in most cases (except connection).

But, no sure it answer your question :-P

You can check Mitsuba renderer, they also account for this correction (Just in the last version they only account for 1/eta and not 1/eta², don't know why).

I have finally implement it and it result that my refraction are darker, I don't know why... maybe I have a problem with my MIS (I have to check this when I have some free time :-P).
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by apaffy » Thu Sep 06, 2012 10:24 am

How do they not cancel out? When there are no non-specular bounces within a medium, connections must use an eye subpath that enters and leaves the medium the same number of times, so has equal numbers of (e1/e2)^2 and (e2/e1)^2 in the adjustment for asymmetry along this eye subpath. These mathematically cancel each other out. Please note you only apply this correction during refraction, not reflection (or absorption).

My understanding is that this correction scheme only matters if you connect or merge paths within a medium, but I would appreciate being corrected if this is not a valid assumption.

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by ingenious » Thu Sep 06, 2012 11:54 am

For most paths, the IOR correction above is unnecessary, and Veach mentions that the cases that do need the correction are rare. The reason is that the correction cancels out for all paths that enter and exit the medium. But there's a catch - the cancellation occurs only if the whole segment inside the medium has been generated by the same random walk. Problems will occur when you connect eye and light sub-paths inside the medium. This happens in photon mapping and with e.g. diffuse inter-reflections inside the medium.

And there's another catch, if I remember correctly. If your camera and light source are in media with different IORs, then you need the correction as well.

The verdict is, in a unidirectional path tracer where the light and camera are always in media with same IORs, you don't need the correction. But of course, adding it in your forward BSDF ensures you're good in all cases.

And again applause for Eric Veach :)
Image Click here. You'll thank me later.

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Source of non-symetric scattering : refraction ?

Post by apaffy » Thu Sep 06, 2012 12:05 pm

Thanks ingenious, we agree then. :)

So has anyone implemented basic radiance in their approach (so also using basic solid angle measure everywhere) or is it normal to just handle the asymmetry manually?

Post Reply