PhotonGI cache

Discussion related to the LuxCore functionality, implementations and API.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: PhotonGI cache

Post by Racleborg »

In particular, it greatly accelerate the rendering of multi-scattering volumes and it is indicated for SSS rendering.
Cool! :D
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: PhotonGI cache

Post by Fox »

Dade wrote: Tue Mar 19, 2019 4:46 pm I added the support for volumes to PhotonGI. Now cache entries can be created and used on volumes too:
Very nice :)
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. »

Dade wrote: Mon Mar 11, 2019 11:48 am I have added the support for automatic indirect cache size. Now, if you set path.photongi.indirect.maxsize to 0, PGI will automatically estimate the cache convergence error and stop when it is under a threshold (default: 5%). There is a new property to set the threshold:

Code: Select all

# Default 5%
path.photongi.indirect.haltthreshold = 0.05
The log output of the process looks like:

Code: Select all

...
[LuxCore][10.364] PhotonGI trace photons thread count: 12
[LuxCore][11.480] PhotonGI additional indirect photon stored: 2276345
[LuxCore][11.480] PhotonGI additional caustic photon stored: 0
[LuxCore][11.480] PhotonGI total photon traced: 2000000
[LuxCore][12.599] PhotonGI additional indirect photon stored: 2276553
[LuxCore][12.599] PhotonGI additional caustic photon stored: 0
[LuxCore][12.599] PhotonGI total photon traced: 4000000
[LuxCore][12.682] PhotonGI estimated current indirect photon error: 329.82%
[LuxCore][13.801] PhotonGI additional indirect photon stored: 2275863
[LuxCore][13.801] PhotonGI additional caustic photon stored: 0
[LuxCore][13.801] PhotonGI total photon traced: 6000000
[LuxCore][13.879] PhotonGI estimated current indirect photon error: 4.32%
[LuxCore][13.879] PhotonGI building radiance photon data
[LuxCore][13.881] PhotonGI filtering radiance photons
...
It will trace more and more photons until when the halt condition is met.

The GUI should offer a combo with 3 settings:
  • Preview (error 15%)
  • Final render (error 5%)
  • Custom (user input error)
It seems to work very well and may speed up the pre-process because it avoids to trace any additional (excessive) amount of photons.
I have exposed this property, it replaces the indirect maxsize.
Maybe we should increase the default photon maxcount? In my tests the convergence test did not really kick in with 100,000 photons.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

B.Y.O.B. wrote: Thu Mar 21, 2019 11:29 am Maybe we should increase the default photon maxcount? In my tests the convergence test did not really kick in with 100,000 photons.
Oh, yes, it is now 100,000,000 for LuxCore: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L751

100,000,000 may be too much, consider this: the convergence test is run every 2,000,000 photons, how many max steps do we want ? I would say something in the 10-15 range so the cap should be something in the 20-30 millions range.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Log power is still default light strategy, shouldn't this be changed when cache has problem with it and only works well with multiple lightsources and power light strategy?
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. »

I have exposed the "use photongi" setting for volumes. It is available in the volume output node.
Dade wrote: Tue Mar 19, 2019 4:46 pm NOTE: for obvious reasons, covering with cache entries a 3D volume is more complex than a 2D surface so there may be cases, like a large air volume for a large open scene, where it is not practical. In that case, just check the disable PGI flag for that particular volume.
Are cache entries only stored on homogeneous/hetereogeneous volumes, or in clear volumes as well?
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. »

Dade wrote: Thu Mar 21, 2019 11:34 am Oh, yes, it is now 100,000,000 for LuxCore: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L751

100,000,000 may be too much, consider this: the convergence test is run every 2,000,000 photons, how many max steps do we want ? I would say something in the 10-15 range so the cap should be something in the 20-30 millions range.
I have changed the default to 20 million.
Also I have changed the multiplier from thousands to millions for easier input.
Attachments
2019-03-21_13-10-37.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

B.Y.O.B. wrote: Thu Mar 21, 2019 11:50 am Are cache entries only stored on homogeneous/hetereogeneous volumes, or in clear volumes as well?
Cache entries are stored on path vertices and you can have a path vertex only on surfaces or volume scattering points so clear volumes can not have entries (because they do not need). Yes, I guess you can hide the setting for clear volumes because it doesn't matter.
Support LuxCoreRender project with salts and bounties
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: PhotonGI cache

Post by FarbigeWelt »

Dade wrote: Tue Mar 19, 2019 4:46 pm I added the support for volumes to PhotonGI. Now cache entries can be created and used on volumes too:

Code: Select all

Many, MANY,  M A N Y   T H A N K   Y O U   A L L   !  !  !
@Dade et al
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

guys... so no one comments on the fact that logpower+photongi+multiple lights is broken but logpower is still default option!? Am I missing something here?
Post Reply