Page 1 of 1

DLS and material settings

Posted: Wed Dec 05, 2018 10:30 am
by lacilaci
So I have a few materials that have emmisive node(just so that they look like light source/very weak) and I disabled DLS in material/emmisive node property, however even with DLS disabled I see in terminal that DLS is calculated for the same ammount of lightsources and I guess the fact that some lights have DLS disabled is ignored.

I tested this on beta3 in linux.
Can someone confirm that disabling DLS (in emmisive node) is actually working??

Re: DLS and material settings

Posted: Wed Dec 05, 2018 11:09 am
by B.Y.O.B.
I think the direct light cache still uses light sources with direct light sampling disabled.
Maybe this could be considered a bug in the direct light cache?

By the way, LuxCore also includes lights with disabled DLS in it's "GetLightCount()" method, which is not ideal I think.

Re: DLS and material settings

Posted: Wed Dec 05, 2018 2:25 pm
by Dade
B.Y.O.B. wrote: Wed Dec 05, 2018 11:09 am I think the direct light cache still uses light sources with direct light sampling disabled.
Maybe this could be considered a bug in the direct light cache?
Yes, it had no harm but it was a waste of time so the light sources, with DLS disabled, are now skipped when filling DLSC information.
B.Y.O.B. wrote: Wed Dec 05, 2018 11:09 am By the way, LuxCore also includes lights with disabled DLS in it's "GetLightCount()" method, which is not ideal I think.
This is debatable: one thing is direct light sampling and another the the total light source count; even with DL disabled they are still light sources so I consider the result returned by "GetLightCount()" correct. It may be worth to add a new method "GetDLSEnalbedCount()" if someone need that information for some reason.

Re: DLS and material settings

Posted: Wed Dec 05, 2018 2:32 pm
by lacilaci
Dade wrote: Wed Dec 05, 2018 2:25 pm
B.Y.O.B. wrote: Wed Dec 05, 2018 11:09 am I think the direct light cache still uses light sources with direct light sampling disabled.
Maybe this could be considered a bug in the direct light cache?
Yes, it had no harm but it was a waste of time so the light sources, with DLS disabled, are now skipped when filling DLSC information.
B.Y.O.B. wrote: Wed Dec 05, 2018 11:09 am By the way, LuxCore also includes lights with disabled DLS in it's "GetLightCount()" method, which is not ideal I think.
This is debatable: one thing is direct light sampling and another the the total light source count; even with DL disabled they are still light sources so I consider the result returned by "GetLightCount()" correct. It may be worth to add a new method "GetDLSEnalbedCount()" if someone need that information for some reason.
Ok, so now I'm confused. I've just realised it DLS is direct light sampling, not cache... So What I thought I'm doing is that disabling DLS in emmision would actually dissable DLCS to be computed for given lightsource.. I guess that's not what is happening right? If so, then what is the purpose of DLS?

Re: DLS and material settings

Posted: Wed Dec 05, 2018 2:42 pm
by B.Y.O.B.
Dade wrote: Wed Dec 05, 2018 2:25 pm It may be worth to add a new method "GetDLSEnalbedCount()" if someone need that information for some reason.
I think this is a good idea.
With this I could show better information and warnings in BlendLuxCore, because it doesn't really matter if there are a few thousand light sources with DLS disabled in the scene, but it is a huge problems if they have DLS enabled.
lacilaci wrote: Wed Dec 05, 2018 2:32 pm Ok, so now I'm confused. I've just realised it DLS is direct light sampling, not cache... So What I thought I'm doing is that disabling DLS in emmision would actually dissable DLCS to be computed for given lightsource.. I guess that's not what is happening right? If so, then what is the purpose of DLS?
It should be explained in the tooltips:
https://github.com/LuxCoreRender/BlendL ... ion.py#L16

Re: DLS and material settings

Posted: Wed Dec 05, 2018 2:51 pm
by lacilaci
B.Y.O.B. wrote: Wed Dec 05, 2018 2:42 pm
Dade wrote: Wed Dec 05, 2018 2:25 pm It may be worth to add a new method "GetDLSEnalbedCount()" if someone need that information for some reason.
I think this is a good idea.
With this I could show better information and warnings in BlendLuxCore, because it doesn't really matter if there are a few thousand light sources with DLS disabled in the scene, but it is a huge problems if they have DLS enabled.
lacilaci wrote: Wed Dec 05, 2018 2:32 pm Ok, so now I'm confused. I've just realised it DLS is direct light sampling, not cache... So What I thought I'm doing is that disabling DLS in emmision would actually dissable DLCS to be computed for given lightsource.. I guess that's not what is happening right? If so, then what is the purpose of DLS?
It should be explained in the tooltips:
https://github.com/LuxCoreRender/BlendL ... ion.py#L16
Oh it does explain it in the tooltip, but for some reason I automatically thought this is new property related to DLCS. And I disabled it cause I have "high poly" fake emmiters that slow down DLCS calculation terribly and contribute near nothing to the scene :!:

So maybe a suggestion: DLS as a checkbox where enabled also follows "auto" limitations, disabled disables DLS, and another checkbox that enables/disables direct light caching.. Is this reasonable?(if caching is enabled - also override "auto" DLS limitations)

Re: DLS and material settings

Posted: Wed Dec 05, 2018 2:55 pm
by lacilaci
lacilaci wrote: Wed Dec 05, 2018 2:51 pm
B.Y.O.B. wrote: Wed Dec 05, 2018 2:42 pm
Dade wrote: Wed Dec 05, 2018 2:25 pm It may be worth to add a new method "GetDLSEnalbedCount()" if someone need that information for some reason.
I think this is a good idea.
With this I could show better information and warnings in BlendLuxCore, because it doesn't really matter if there are a few thousand light sources with DLS disabled in the scene, but it is a huge problems if they have DLS enabled.
lacilaci wrote: Wed Dec 05, 2018 2:32 pm Ok, so now I'm confused. I've just realised it DLS is direct light sampling, not cache... So What I thought I'm doing is that disabling DLS in emmision would actually dissable DLCS to be computed for given lightsource.. I guess that's not what is happening right? If so, then what is the purpose of DLS?
It should be explained in the tooltips:
https://github.com/LuxCoreRender/BlendL ... ion.py#L16
Oh it does explain it in the tooltip, but for some reason I automatically thought this is new property related to DLCS. And I disabled it cause I have "high poly" fake emmiters that slow down DLCS calculation terribly and contribute near nothing to the scene :!:

So maybe a suggestion: DLS as a checkbox where enabled also follows "auto" limitations, disabled disables DLS, and another checkbox that enables/disables direct light caching.. Is this reasonable?(if caching is enabled - also override "auto" DLS limitations)
Or, let's think in advance. At some point we might have ray/visibility options for objects and lights. Then, having emmision node disabled for diffuse rays could also disable DLCS calculations for given light...?