PhotonGI cache

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

Re: PhotonGI cache

Post by lacilaci »

Dade wrote: Tue Feb 26, 2019 9:44 pm
lacilaci wrote: Tue Feb 26, 2019 8:51 pm Also cache size and photon count should be calculated to fill some criteria, maybe coverage in screen space or something, instead of guessing how much photons to cast and how big cache should be
Screen coverage would be a good criteria, the problem is in having a constant radius: one pixel covers 15cm at 1m of distance and 150m at 1km (random numbers, just to give you an idea of where the problem is).
but do you need good coverage at that distance? If a tree crown far away is represented by 50 pixels, I dont care if it contains 50 photons...

I think vray's lightcache is somehow resolution dependent too (not sure how it works, but something is controlled by resolution so screen space is controlling something)
User avatar
Dade
Developer
Developer
Posts: 5675
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

lacilaci wrote: Tue Feb 26, 2019 10:01 pm but do you need good coverage at that distance? If a tree crown far away is represented by 50 pixels, I dont care if it contains 50 photons...
That is exactly the problem, like I wrote, the radius is constant at the moment: pixels can cover 15cm like 150m in the same scene, do I pick 15cm or 150m as constant radius ? Do I pick the minimum covered area ? The average ? It is a bit arbitrary.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3104
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

Finally find time to optimized This kitchen here : https://blenderartists.org/t/lux-corona ... 1143996/57 for luxcore 2.2 and guest what :D
Note that the scene original rendertime was arround 1h45mn on Luxcore 30mn under corona and 45mn for Cycles (Due to lot of inappropriate settings and workflow).


Pure Path 20 mn 1080ti + i7 8700k

20mn Path Kitchen.jpg



PGI 5mn 1080ti + i7 8700k

5mn PGI Kitchen.jpg


PGI settings
Sett PGI.jpg
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI cache

Post by B.Y.O.B. »

Sharlybg wrote: Wed Feb 27, 2019 12:07 amPGI 5mn
Crazy, considering that this is how the indirect light cache looks like:
untitled.png
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

try glossiness at 0.0 ... just for fun
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI cache

Post by B.Y.O.B. »

(all images below rendered for 5 minutes plus export/init time)

When I render the scene for 5 minutes with Sharlybg's settings, I get no noticeable difference between PGI on and off. Even the samples/sec and rays/sample are nearly equal.
This seems to be caused by the fact that only very few surfaces fall above the glossiness threshold and are cached, as you can see in the post before.

The attachment PGI_off_430samples.png is no longer available
The attachment PGI_on_440samples.png is no longer available

I set the glossiness threshold to 0.03 to include more materials in the cache.
This makes the scene benefit a lot more from the cache (as you can see from the higher amount of samples in equal time), but note how the ceiling lights now directly show the cache in the reflections, making them wrong.

The attachment PGI_on_750samples_glossThresh0.03_debugview.png is no longer available
The attachment PGI_on_750samples_glossThresh0.03.png is no longer available

This can be fixed by setting the usage threshold scale from 1 back to the default of 4, which causes LuxCore to fallback to pathtracing for small details like these ceiling lights (another option would be to disable caching for the ceiling lights in the material output node settings).
However, note how you can see a rim around the black furniture on the right where it meets the wall - this is the border between brute-force pathtracing (where it meets the wall) and cache (everywhere else). This is the reason why the glossiness threshold is 0.2 by default, as this surface should not be included in the cache. In this scene, we could disable cache usage in the material output node settings.

debug view of lowered glossiness threshold
debug view of lowered glossiness threshold
edit: the last render was the denoised verison by mistake, I re-uploaded the raw version.
User avatar
Sharlybg
Donor
Donor
Posts: 3104
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

So it is AAAAMMMMAAAAAZING :shock:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
Sharlybg
Donor
Donor
Posts: 3104
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

Your last render hardware ? Also 5mn ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI cache

Post by B.Y.O.B. »

Sharlybg wrote: Wed Feb 27, 2019 12:07 pm Your last render hardware ? Also 5mn ?
Yes, all renders are 5min. Plus export (10s) and init (15s) which includes cache building. Since these are fixed costs regardless of the render time, I don't consider them too important here.
I used an RTX 2080 (only OpenCL, no CPU involved).
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Yes of course those extreme settings are wrong.
But this is near production quality at preview rendertimes. This is pure gold for archviz work cause you know exactly what are you working up to. Now imagine if we could have that times aand also problem free :D
Post Reply