Direct Light cache: how to avoid splotches?

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci »

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
Developer
Posts: 4146
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. »

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.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Direct Light cache: how to avoid splotches?

Post by Dade »

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
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Direct Light cache: how to avoid splotches?

Post by lacilaci »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Direct Light cache: how to avoid splotches?

Post by Dade »

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
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Direct Light cache: how to avoid splotches?

Post by marcatore »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Direct Light cache: how to avoid splotches?

Post by Dade »

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
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Direct Light cache: how to avoid splotches?

Post by marcatore »

Sent PM
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Direct Light cache: how to avoid splotches?

Post by marcatore »

@Dade
I think that DLSC should have more love. Using it together with PGI is a nice combo to take down rendertime but, in my opinion, should be developed further to correct splotches.

I have a scene where, adding a normal map to a material (that before this it worked) broken all the DLSC calculation.
I've played with many settings with no result.
Post Reply