Page 2 of 2

Re: Problem understanding Material::Sample () behaviour

Posted: Fri Dec 18, 2020 3:27 pm
by julesmay
In the second case you are returning BLACK half of the times. How can the results be identical ?
Because the other half of the time I'm returning twice kt. 0.5 * kt * 2 + 0 == kt. Otherwise what is the point of glassmaterial multiplying its computed colour by pdfW?

Re: Problem understanding Material::Sample () behaviour

Posted: Fri Dec 18, 2020 4:38 pm
by julesmay
Found the problem. I was using forward-backward tracing. When I switched to backward-only, it worked fine.

Which points to a bug in the forward-backward processing I think.

Re: Problem understanding Material::Sample () behaviour

Posted: Wed Jan 13, 2021 6:35 am
by BruceXu
julesmay wrote: Fri Dec 18, 2020 4:38 pm Found the problem. I was using forward-backward tracing. When I switched to backward-only, it worked fine.

Which points to a bug in the forward-backward processing I think.
emmm, what is forward-backward tracing? light-tracing + ray-tracing?

Re: Problem understanding Material::Sample () behaviour

Posted: Wed Jan 13, 2021 11:06 am
by B.Y.O.B.
backward raytracing = rays start at the camera
forward raytracing = rays start at light sources

Re: Problem understanding Material::Sample () behaviour

Posted: Wed Jan 13, 2021 12:14 pm
by julesmay
@BruceXu There's a setting used in (.e.g) scenes/cornell/cornell-glass.cfg:

Code: Select all

path.hybridbackforward.enable = 1
which (when enabled) seems to cause the problem. It's not documented in the wiki, but it's definitely used in the code.

There is another setting in there:

Code: Select all

path.clamping.variance.maxvalue
, which is documented, and looks suspiciously like it might be causing the behaviour I'm seeing. I'll do a bit more investigation.