Direct Light cache: how to avoid splotches?

Use this forum for general user support and related questions.
User avatar
lacilaci
Donor
Posts: 917
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci » Mon Dec 24, 2018 7:08 pm

Dade wrote:
Mon Dec 24, 2018 6:49 pm
Direct light sampling (and cache computation) is automatically disabled for meshes with more than X triangles (it should be something like 256 but I can not check at the moment).
It should be your case or are you using a lot of small meshes ?
It is a lot of small meshes but not sure if within 256 triangles (could be).
There is a DLS setting in emission node that is by default "auto' (256 triangle limit) but can be overriden to enabled or disabled/ is this also controlling caching or is caching always decided only by this triangle limit? Cause my emitors have DLS disabled manually(in the emission node) yet I'm still having very slow cache calculation...

Scene is relatively big with plenty rugs and so on, kinda hard to diagnose if it's the light count or just scene complexity overall making caching slow. I want to finish all the project rendering before new year so I'm not gonna dig deeper in this now. Maybe I'll try to setup another scene or project to utilize dlcs from the start...

BTW ,is the cache calculated through glass? Encapsulated light source..?

User avatar
B.Y.O.B.
Developer
Posts: 2243
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Direct Light cache: how to avoid splotches?

Post by B.Y.O.B. » Mon Dec 24, 2018 10:35 pm

lacilaci wrote:
Mon Dec 24, 2018 7:08 pm
BTW ,is the cache calculated through glass? Encapsulated light source..?
Only if direct light can pass through the material (archglass, or opacity < 1).
You can check this by rendering with path depth 1, which produces an image that only includes direct light.
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 917
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci » Tue Dec 25, 2018 8:14 am

B.Y.O.B. wrote:
Mon Dec 24, 2018 10:35 pm
lacilaci wrote:
Mon Dec 24, 2018 7:08 pm
BTW ,is the cache calculated through glass? Encapsulated light source..?
Only if direct light can pass through the material (archglass, or opacity < 1).
You can check this by rendering with path depth 1, which produces an image that only includes direct light.
Aha... Well I'll see if I can utilize the feature in another project, now it's way too late and iterations would be incredibly slow...

User avatar
Dade
Developer
Posts: 2116
Joined: Mon Dec 04, 2017 8:36 pm

Re: Direct Light cache: how to avoid splotches?

Post by Dade » Fri Dec 28, 2018 4:25 pm

lacilaci wrote:
Mon Dec 24, 2018 7:08 pm
It is a lot of small meshes but not sure if within 256 triangles (could be).
There is a DLS setting in emission node that is by default "auto' (256 triangle limit) but can be overriden to enabled or disabled/ is this also controlling caching or is caching always decided only by this triangle limit?
Yes, you can use this setting to enable DL sampling (and related cache) so it can be used to include/exclude mesh lights from the pre-processing stage (and greatly increase/decrease the time required by this step).

The other option is to group the light sources in a single mesh to go over the 256 (confirmed, I checked) threshold but it is a trick and it is a lot easier to just use the explicit (material) setting.

Disabling DL sampling is useful in cases like the signal in Marcatore's scene (where it happens automatically because it is made of more than 256 triangles):

Image
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 917
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci » Sat Dec 29, 2018 1:54 pm

There is a setting for dlcs, that's called max passes and default value is 1024. What does this do? Some quick tests show no visual difference between values 1024 and 1 other than default 1024 making dlcs calculation insanely slow

User avatar
Dade
Developer
Posts: 2116
Joined: Mon Dec 04, 2017 8:36 pm

Re: Direct Light cache: how to avoid splotches?

Post by Dade » Sat Dec 29, 2018 4:16 pm

lacilaci wrote:
Sat Dec 29, 2018 1:54 pm
There is a setting for dlcs, that's called max passes and default value is 1024. What does this do? Some quick tests show no visual difference between values 1024 and 1 other than default 1024 making dlcs calculation insanely slow
DLSC code tries to achieve a 1% accuracy (i.e. default convergence threshold parameter) for each cache entry OR a maximum number of 1024 iterations (i.e. max. entry passes).

It is a safeguard cap, to stop tracing rays after some point no matter of the results. Higher is the cap and more rays will be traced for each cache entry in the cases of hard to sample light sources (like HDR, etc.). Indeed, with some hard to find light sources, doubling the cap will double the computation time (but lower the risk of having some not accurate cache entry).
Support LuxCoreRender project with salts and bounties

marcatore
Posts: 184
Joined: Wed Jan 10, 2018 8:04 am

Re: Direct Light cache: how to avoid splotches?

Post by marcatore » Tue Jan 08, 2019 8:12 am

Dade wrote:
Sun Dec 23, 2018 3:43 pm
I was using a DLSC warmup samples value of 128-256 in my tests, can you try ?
I did it but with no a real success. Splothes again.
256warmup.png
And I've disabled the DLCS option in the sign material.

User avatar
Dade
Developer
Posts: 2116
Joined: Mon Dec 04, 2017 8:36 pm

Re: Direct Light cache: how to avoid splotches?

Post by Dade » Wed Jan 09, 2019 10:43 am

marcatore wrote:
Tue Jan 08, 2019 8:12 am
I did it but with no a real success. Splothes again.
I guess something has changed in the original test scene you have sent me because doesn't happen here, can you send me the latest version of your Scene ?
Support LuxCoreRender project with salts and bounties

marcatore
Posts: 184
Joined: Wed Jan 10, 2018 8:04 am

Re: Direct Light cache: how to avoid splotches?

Post by marcatore » Wed Jan 09, 2019 11:28 am

Sent PM

Post Reply