Page 81 of 109

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 11:08 am
by lacilaci
Dade wrote: Tue Mar 12, 2019 11:05 am I'm pretty sure the problem is triggered by the light source having 480 triangles. This is over the 256 threshold used to disable direct light sampling.

I will check and fix the code to handle this case but using light sources with hundred of triangles is not efficient.
There has to be a way to make it work with complex lights...
Also, I tried force disabling and enabling DLS for that lightsource material and it didn't change anything...

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 11:15 am
by Dade
lacilaci wrote: Tue Mar 12, 2019 11:08 am There has to be a way to make it work with complex lights...
It is not a complex light, it is just a huge waste of resources to model a spot light source with 480 triangles. Just use a spot light inside a architectural glass surface.
lacilaci wrote: Tue Mar 12, 2019 11:08 am Also, I tried force disabling and enabling DLS for that lightsource material and it didn't change anything...
Switch the light strategy from LOG_POWER to POWER and it will work fine.

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 11:37 am
by lacilaci
Dade wrote: Tue Mar 12, 2019 11:15 am
lacilaci wrote: Tue Mar 12, 2019 11:08 am There has to be a way to make it work with complex lights...
It is not a complex light, it is just a huge waste of resources to model a spot light source with 480 triangles. Just use a spot light inside a architectural glass surface.
lacilaci wrote: Tue Mar 12, 2019 11:08 am Also, I tried force disabling and enabling DLS for that lightsource material and it didn't change anything...
Switch the light strategy from LOG_POWER to POWER and it will work fine.
We're back at the problem that I cannot make lightbulb look like it's a lightsource if I cannot apply emission material to it. I would use the workaround with invisible real light and visible fake light but luxcore doesn't allow for that at this moment.

And by the way switching to power just forces meshlight cache over enviro light cache entries:

power
power.jpg
logpower
logpower.jpg
This has to be a bug, and a pretty bad one. Caches are excluding each other. Processing is fast and if you look at meshlight entries there is enough of them, they just kill other entries.

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 11:46 am
by lacilaci
:lol:
This is happening with all lightsources it seems, I tried to remove meshlight and used spotlight. If I compare cache debug with spotlight off it is relatively clean, if I enable spotlight cache starts to look like trash.... I wouldn't be surprised if it's even sunlight partially having problems... it's just that this meshlight makes the problem much more visible. IT'S A BUG!

nospotlight:
nospotlight.jpg
spotlight:
spotlight.jpg
more spotlights more fun.... 12 spotlights look quite a lot like my meshlight issue.... just getting worse:
morespotlightfun.jpg

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 11:53 am
by marcatore
lacilaci wrote: Tue Mar 12, 2019 11:37 am We're back at the problem that I cannot make lightbulb look like it's a lightsource if I cannot apply emission material to it. I would use the workaround with invisible real light and visible fake light but luxcore doesn't allow for that at this moment.
Exactly this. I completely agree with you.
For example, today is quite common to use LED stripes and due to the flexibility is quite possible to have some curved and complex light shapes. How should we workaround this? We should approximate the curved shapes with an array of area lights?

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 2:58 pm
by lacilaci
It's happening with area lights too...
I don't know if it's all the lights competing with each other or just all lights vs enviro lighting though. I'm also not sure if sun and sky are having this conflict aswell.

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 3:24 pm
by Fox
Ain't there sort of firefly clamping from glossy reflection, maybe?

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 5:25 pm
by Dade
I still have the feeling there something fishy: I'm pretty sure to have got different results out of the same test.

Anyway, for some unknown reason, the code of "POWER" light strategy was ignoring light source power when emitting particles out of light sources. It was used in all other cases. So I fixed this problem and I get the expected result with "POWER" light strategy:

RGB_IMAGEPIPELINE_0.jpg

To give you an idea of in numbers on the table, out of 1,000,000 of photons, only ~500 are traced from the area light source (after all it is the sun Vs a 3Watt light source :!: ).

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 5:36 pm
by lacilaci
But it is one thing that it is weak lightsource that doesn't contribute to scene much and it is something different if that lightsource, or multiple of them are taking away stronger photons from stronger lightsource. Your test doesn't look too clean too. try copy the weak light source couple of times and see if the cache won't fall apart.

I tried different light strategies and lightsources and everytime you have multiple lightsources and sun and/or sky cache starts looking pretty bad and in case of my office scene it is completely useless.

Re: PhotonGI cache

Posted: Tue Mar 12, 2019 8:11 pm
by Dade
lacilaci wrote: Tue Mar 12, 2019 5:36 pm But it is one thing that it is weak lightsource that doesn't contribute to scene much and it is something different if that lightsource, or multiple of them are taking away stronger photons from stronger lightsource. Your test doesn't look too clean too. try copy the weak light source couple of times and see if the cache won't fall apart.

I tried different light strategies and lightsources and everytime you have multiple lightsources and sun and/or sky cache starts looking pretty bad and in case of my office scene it is completely useless.
This:
Anyway, for some unknown reason, the code of "POWER" light strategy was ignoring light source power when emitting particles out of light sources. It was used in all other cases. So I fixed this problem.