MIS BPT with Russian Roulette

Practical and theoretical implementation discussion.
apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: MIS BPT with Russian Roulette

Post by apaffy » Tue Aug 21, 2012 10:09 pm

It would have been more helpful of me earlier to recommend you add some ability to save out images as follows:
* A weighted image for each (s,t) combination
* A weighted image for each path length (i.e. s+t)

The first suggestion is so that you can ensure that combinations are zero/non-zero as expected and that the variance is where you expect (e.g. SDS paths that hit a light source). The second suggestion is because you can directly compare these images for different MIS techniques. This can be useful to narrow down which path lengths have bugs. Here's an example I just generated for another box scene:
mis_sanity_check.jpg
mis_sanity_check.jpg (84.74 KiB) Viewed 5737 times
Rows are for each path length, starting at s+t=2. The light subpath length s increases from left to right in each row, with the image on the far right being the sum for that path length. You can see that the noise in the uniform case is for paths that hit the light source and paths with very short connecting segment. You can also see that the per-technique images do not match between MIS techniques, but the sums for each path length do.

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

Re: MIS BPT with Russian Roulette

Post by spectral » Wed Aug 22, 2012 7:49 am

Hi Shocker,

So, it seems that the test you've done show the problem, it is related to the G term.
It is normal that, with this correction, the image does not converge to the correct solution, it is biased this way !

What I think is that you have a problem with the MIS computation, because there is one |x-x'| that is NOT canceled !
(It is like using Uniform weight !)

So, are you sure that you correctly avoid the x(0) vertex in the MIS computation ?

BTW, it seems that you have a lot of redundant code ! It will be fine to avoid this ;-)
Can we doawnload your renderer somewhere, this way we can debug it and help you ?
Spectral
OMPF 2 global moderator

shocker_0x15
Posts: 75
Joined: Sun Aug 19, 2012 3:24 pm
Contact:

Re: MIS BPT with Russian Roulette

Post by shocker_0x15 » Wed Aug 22, 2012 7:53 am

Thank you apaffy. :)
According to you, I tried to output per-technique images and got these results.
These contains per-technique images and the sum of them for each path lengths.
The images of the center column consist of MIS and Uniform images.
The left half of image is the sum of techniques weighted MIS, and the right half is that of the uniform.

In the first image, I set the minimum subpath lengths to 3.
In the second, I set it to 1.
MISvsUniform_min3.png
MISvsUniform_min3.png (524.23 KiB) Viewed 5711 times
MISvsUniform_min1.png
MISvsUniform_min1.png (612.91 KiB) Viewed 5711 times
Depending on your browser, the full width of the images may not be displayed.

In the first image, It seems to be different between two weightings from length 5.
However in reality, they may have different results from length 4.
But the weight of the probability that a eye subpath directly hit a light source may be very small.
So, we are not probably able to see some error caused by RR.

In the second image, due to smaller minimum subpath length, it seems to be different from length 3.
because of the same reason, in reallity, they have different results from length 2.

Meanwhile, between two uniform weightings, there is no difference except for noises.

From these results, MIS computation must be the cause, but I cannot discover exact location of bugs.

shocker_0x15
Posts: 75
Joined: Sun Aug 19, 2012 3:24 pm
Contact:

Re: MIS BPT with Russian Roulette

Post by shocker_0x15 » Wed Aug 22, 2012 11:37 am

Thank you spectral.

I sent you my renderer source code link by Private Message.

The code in my first post was modified to show the essence of this problem.
So, sent code is slightly different from the code that I presented in my first post.

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

Re: MIS BPT with Russian Roulette

Post by spectral » Wed Aug 22, 2012 11:52 am

Just a suggestion,

Have you try to account for the x(0) point (MIS and camera plane intersection ?)
Spectral
OMPF 2 global moderator

shocker_0x15
Posts: 75
Joined: Sun Aug 19, 2012 3:24 pm
Contact:

Re: MIS BPT with Russian Roulette

Post by shocker_0x15 » Wed Aug 22, 2012 1:11 pm

Certainly, t = 1 paths are important for capturing caustics.

However, there is too little information for me to implement the light image consideration. :(
(In the Veach's equation I_j ~= (|D| / N) I_L^j + I_E^j, what is |D| ? It is said as the area of image region. but what space is it in ? What is N ? Is it the number of samples which are in a corresponding pixel ?...)

At this time, I want to resolve this problem without considering the light image.

shocker_0x15
Posts: 75
Joined: Sun Aug 19, 2012 3:24 pm
Contact:

Re: MIS BPT with Russian Roulette

Post by shocker_0x15 » Thu Oct 04, 2012 8:24 am

Thanks to advices on another thread, I could have implemented the light image.
But the problem still remains...

So, I draw my understanding as the figure.
Here, let me assume that there are 3 light vertices and 4 eye vertices.
And we are calculating weighted contribution of a (2, 2) strategy.

p_{s, t} denotes a probability of a strategy in which a path consists of s light vertices and t eye vertices.
RR starts from the 2nd bounce with probability 0.5.

Is this formulation correct ?
It may be bothersome to see, but it would make me happy if you point out some wrong thing.
Image

Thank you.

Post Reply