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 » Fri Dec 18, 2020 3:27 pm

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 » 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.

BruceXu
Posts: 22
Joined: Wed Apr 15, 2020 7:16 am

Re: Problem understanding Material::Sample () behaviour

Post by BruceXu » Wed Jan 13, 2021 6:35 am

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
Posts: 3979
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Problem understanding Material::Sample () behaviour

Post by B.Y.O.B. » Wed Jan 13, 2021 11:06 am

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 » Wed Jan 13, 2021 12:14 pm

@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