Re: PhotonGI cache
Posted: Tue Mar 19, 2019 6:18 pm
Cool!In particular, it greatly accelerate the rendering of multi-scattering volumes and it is indicated for SSS rendering.
Show your work, get help, participate in development
https://forums.luxcorerender.org/
Cool!In particular, it greatly accelerate the rendering of multi-scattering volumes and it is indicated for SSS rendering.
I have exposed this property, it replaces the indirect maxsize.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:
The log output of the process looks like:Code: Select all
# Default 5% path.photongi.indirect.haltthreshold = 0.05
It will trace more and more photons until when the halt condition is met.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 ...
The GUI should offer a combo with 3 settings:
It seems to work very well and may speed up the pre-process because it avoids to trace any additional (excessive) amount of photons.
- Preview (error 15%)
- Final render (error 5%)
- Custom (user input error)
Oh, yes, it is now 100,000,000 for LuxCore: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L751
Are cache entries only stored on homogeneous/hetereogeneous volumes, or in clear volumes as well?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.
I have changed the default to 20 million.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.
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.
Code: Select all
Many, MANY, M A N Y T H A N K Y O U A L L ! ! !