Env. Light Visibility Cache

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Env. Light Visibility Cache

Post by lacilaci »

This is looking really nice, won't it fall apart with more complex situation/obstacles? Is it fully automated solution?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Env. Light Visibility Cache

Post by Dade »

lacilaci wrote: Sun May 26, 2019 3:10 pm This is looking really nice, won't it fall apart with more complex situation/obstacles?
I don't know, there are millions of possible combinations to tests.
lacilaci wrote: Sun May 26, 2019 3:10 pm Is it fully automated solution?
Yes, you can control the resolution of the visibility maps to use more/less memory (and have more/less accurate maps) but it is pretty much automated.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Env. Light Visibility Cache

Post by Sharlybg »

Bravo this look really like the kind of improvement provided by PGI impressive.

Do the current state work with other light type ? Or it is only HDRi.
And at tje end can this replace DLSC ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
kintuX
Posts: 810
Joined: Wed Jan 10, 2018 2:37 am

Re: Env. Light Visibility Cache

Post by kintuX »

Prominent results, but how does it behave with small opening/s (ie. Camera Obscura or 2-3 small window size openings)?
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Env. Light Visibility Cache

Post by Sharlybg »

kintuX wrote: Mon May 27, 2019 9:20 am Prominent results, but how does it behave with small opening/s (ie. Camera Obscura or 2-3 small window size openings)?
guessing at how fast it is on open scene i think small openning will be even faster ;)
can't wait to test it .
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Env. Light Visibility Cache

Post by lacilaci »

Will this cache go through glass or translucent materials? Can I benefit from this when I have huge curtain covering windows?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Env. Light Visibility Cache

Post by Dade »

I have merged the experimental branch with the main one. This feature will be available on daily build now on (CPU-only, OpenCL still to do).

The new cache is available for infinitelight, constantinfinite and sky2 light sources. The related properties are:

Code: Select all

scene.lights.<light source name>.visibilitymapcache.enable = 1
scene.lights.<light source name>.visibilitymapcache.map.width = 128
scene.lights.<light source name>.visibilitymapcache.map.height = 64
scene.lights.<light source name>.visibilitymapcache.map.samplecount = 4
scene.lights.<light source name>.visibilitymapcache.map.sampleupperhemisphereonly = 0
scene.lights.<light source name>.visibilitymapcache.visibility.maxsamplecount = 1048576
scene.lights.<light source name>.visibilitymapcache.visibility.maxdepth = 4
scene.lights.<light source name>.visibilitymapcache.visibility.targethitrate = 0.99
scene.lights.<light source name>.visibilitymapcache.visibility.radius = 0.0
scene.lights.<light source name>.visibilitymapcache.visibility.glossinessusagethreshold = 0.05
Just enabling the cache should be enough for most scenes:

Code: Select all

scene.lights.<light source name>.visibilitymapcache.enable = 1
If you are seeing some artifact, try to increase the map resolution and/or sample per pixel:

Code: Select all

scene.lights.<light source name>.visibilitymapcache.map.width = 256
scene.lights.<light source name>.visibilitymapcache.map.height = 128
scene.lights.<light source name>.visibilitymapcache.map.samplecount = 8
If you want to reduce the memory usage, reduce instead the map resolution. If you want to reduce the pre-processing time, try to reduce the samples per pixel and/or the map resolution too.

This is a 50 samples per pixel rendering without the cache:

normal.jpg

and this with cache enabled:

cache.jpg
The difference in penumbra areas can be really huge.

Everything is still untested/unknown. The 2 scene renderings posted in this thread are literally the only scenes ever rendered up to now.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Env. Light Visibility Cache

Post by lacilaci »

Wow the difference is really big, but I do see some artifacting around the area of direct sun exposure, looks a lot like DLCS artifacting actually.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Env. Light Visibility Cache

Post by lacilaci »

I also wonder, why is the sunlit area noisy? Shouldn't that part be like instant clean?
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Env. Light Visibility Cache

Post by Sharlybg »

lacilaci wrote: Tue May 28, 2019 7:32 am I also wonder, why is the sunlit area noisy? Shouldn't that part be like instant clean?
wonder the same. it is strange that the are that is directly illuminated stay so noisy :?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
Post Reply