Problem understanding Material::Sample () behaviour

Discussion related to the LuxCore functionality, implementations and API.
julesmay
Posts: 7
Joined: Wed Dec 16, 2020 5:32 pm

Re: Problem understanding Material::Sample () behaviour

Post 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?
julesmay
Posts: 7
Joined: Wed Dec 16, 2020 5:32 pm

Re: Problem understanding Material::Sample () behaviour

Post 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.
BruceXu
Posts: 35
Joined: Wed Apr 15, 2020 7:16 am

Re: Problem understanding Material::Sample () behaviour

Post 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?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Problem understanding Material::Sample () behaviour

Post by B.Y.O.B. »

backward raytracing = rays start at the camera
forward raytracing = rays start at light sources
julesmay
Posts: 7
Joined: Wed Dec 16, 2020 5:32 pm

Re: Problem understanding Material::Sample () behaviour

Post 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.
Post Reply