Re: MIS BPT with Russian Roulette back

Board: Home Board index Raytracing General Development

(L) [2012/08/21] [ost by apaffy] [Re: MIS BPT with Russian Roulette] Wayback!

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:

[IMG #1 mis_sanity_check.jpg]


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.
[IMG #1]:Not scraped: /web/20200920213506im_/http://ompf2.com/download/file.php?id=77&sid=1e02adcd038c17d5f234358215fe16ed
(L) [2012/08/21] [ost by apaffy] [Re: MIS BPT with Russian Roulette] Wayback!

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
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.
(L) [2012/08/22] [ost by spectral] [Re: MIS BPT with Russian Roulette] Wayback!

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 [SMILEY ;-)]
Can we doawnload your renderer somewhere, this way we can debug it and help you ?
(L) [2012/08/22] [ost by shocker_0x15] [Re: MIS BPT with Russian Roulette] Wayback!

Thank you apaffy. [SMILEY :)]
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.

[IMG #1 MISvsUniform_min3.png]


[IMG #2 MISvsUniform_min1.png]

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.
[IMG #1]:Not scraped: /web/20200920213506im_/http://ompf2.com/download/file.php?id=80&sid=1e02adcd038c17d5f234358215fe16ed
[IMG #2]:Not scraped: /web/20200920213506im_/http://ompf2.com/download/file.php?id=79&sid=1e02adcd038c17d5f234358215fe16ed
(L) [2012/08/22] [ost by shocker_0x15] [Re: MIS BPT with Russian Roulette] Wayback!

Thank you apaffy. [SMILEY :)]
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_min1.png
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.
(L) [2012/08/22] [ost by shocker_0x15] [Re: MIS BPT with Russian Roulette] Wayback!

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.
(L) [2012/08/22] [ost by spectral] [Re: MIS BPT with Russian Roulette] Wayback!

Just a suggestion,

Have you try to account for the x(0) point (MIS and camera plane intersection ?)
(L) [2012/08/22] [ost by shocker_0x15] [Re: MIS BPT with Russian Roulette] Wayback!

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

However, there is too little information for me to implement the light image consideration. [SMILEY :(]
(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.
(L) [2012/10/04] [ost by shocker_0x15] [Re: MIS BPT with Russian Roulette] Wayback!

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.
[IMG #1 Image]

Thank you.
[IMG #1]:Not scraped: https://web.archive.org/web/20200920213506im_/http://dl.dropbox.com/u/66986767/BPT_Figure2.png

back