Russian roulette in a white cornell box

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

Russian roulette in a white cornell box

Post by spectral » Wed Jan 16, 2013 11:07 am

Hi All,

I'm just experimenting some stuffs...

Imagine I have a 'closed' cornell box where all the materials are diffuse and white (reflectance = 1).

If I use a simple Russian Roulette, then the stop condition is : RND() > BSDF.Reflectance()

But the reflectance is 1 and so the RR will never stop the random walk ! At the end my path will be infinite !

Do you have a solution (I don't play with max-path-length) ?

Thx
Spectral
OMPF 2 global moderator

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

Re: Russian roulette in a white cornell box

Post by ingenious » Wed Jan 16, 2013 11:35 am

The solution is simple - make the scene physically plausible by putting materials with albedo less than one :)

And yes, you have to have a max path length! What if your number generator goes crazy? What if you use some deterministic sequence that will always choose to continue the path, even if all materials have albedo in the open range (0.5, 0.9)? Has happened to me with Halton sequences!
Image Click here. You'll thank me later.

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

Re: Russian roulette in a white cornell box

Post by spectral » Wed Jan 16, 2013 1:03 pm

Sure, the albedo has to be plausible :-P

But does someone has an idea of the maximum value of "max-depth" that should be allowed ? 100 seems enough to me ! Not sure that I will face some scenes with more !

BTW, it seems to me that a default max-depth can be between 10 and 15, right ?

Thx
Spectral
OMPF 2 global moderator

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

Re: Russian roulette in a white cornell box

Post by ingenious » Wed Jan 16, 2013 1:21 pm

It depends on the scene, of course. I think most people/renderers use max path length of about 25. But I'm not 100% sure. Anyone?
Image Click here. You'll thank me later.

Thammuz
Posts: 22
Joined: Mon Nov 28, 2011 8:36 am
Location: Stockholm

Re: Russian roulette in a white cornell box

Post by Thammuz » Wed Jan 16, 2013 1:59 pm

I think I use 10000 (need to check again at home), mostly just to ensure that it'll stop bouncing at some point for anomalous paths (like ingenious mentioned this can happen with qmc). Then again, I'm a bit OCD with the correctness thing, I want to allow all sorts of path lengths. Btw, I haven't seen this impacting performance all that much.

@spectral
You can model your RR probabililties pretty much any way you want, just make sure that you weigh your paths correctly just as usual. You could base it on the luminance of the color, on the max component, the average , the accumulated path throughput or simply just use a constant termination probability that you start applying after a couple of bounces, like 0.5. Experiment! All these methods differ from each other and some of them produce more noise than others.

Btw, I remember someone doing a survey on different rr methods and posting the resulting images and error images but I can't seem to find it on google. I think the scene was two reflective spheres and a box, in a cornell box. Does anyone know where to find it or have the link? It was interesting because it also include the "Efficiency-optimized Russian roulette" method proposed by Veach.

Thammuz
Posts: 22
Joined: Mon Nov 28, 2011 8:36 am
Location: Stockholm

Re: Russian roulette in a white cornell box

Post by Thammuz » Wed Jan 16, 2013 2:09 pm


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

Re: Russian roulette in a white cornell box

Post by spectral » Wed Jan 16, 2013 5:14 pm

Thanks

A question about SmallVCM, in the vertexcm.hxx line 775, you compute lightCont for the Russian Roulette.
You include this probability in the pdf wrt dA... and finally you compute the contribution.

But, is it enough to include the RR method and avoiding to trace too much shadow rays ?

Thx
Spectral
OMPF 2 global moderator

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

Re: Russian roulette in a white cornell box

Post by ingenious » Wed Jan 16, 2013 6:12 pm

I don't understand the connection you're making between the RR probability in the MIS weights and avoiding tracing shadow rays... :roll:
Image Click here. You'll thank me later.

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

Re: Russian roulette in a white cornell box

Post by spectral » Thu Jan 17, 2013 8:44 am

Right, it has no relation with the shadow ray ! Sorry, I haven't read the code correctly :-P

At first time I have think it was your implementation of "Reducing the number of shadow rays in bidirectional path tracing" : http://www.researchgate.net/publication ... th_Tracing

BTW: I don't talk about RR in case of a SSS material or volume rendering of course... theses are handled another way :-)
Spectral
OMPF 2 global moderator

Post Reply