PhotonGI cache

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

lacilaci wrote: Sun Mar 10, 2019 11:05 am But the cause is definitely emission on material as you can see in the screenshots, where it only happens with emission plugged in.
I tried to replicate the setup but doesn't happen here. It may be the BlackBody texture :idea:
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 »

I think it's happening with image texture aswell. Will investigate tomorrow.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: PhotonGI cache

Post by Fox »

I have open world scene setup with no walls to photons bounce around.
Single light from infinite lightsource where float values go up to 1 600 000 000 aka normal gain.
2'th render i use mesh emitter (800 triangles) where also float values go up to 1 600 000 000 aka normal gain for camera to show correctly exposed image.

Caustic Cache, Hemi Infinity, normal gain
Caustic Cache, Hemi Infinity, normal gain.jpg
Caustic Cache, Hemi Infinity, gain10000
Caustic Cache, Hemi Infinity, gain10000.jpg
Caustic Cache, Mesh Emitter, normal gain
Caustic Cache, Mesh Emitter, normal gain.jpg
Caustic Cache, Mesh Emitter, gain10000
Caustic Cache, Mesh Emitter, gain10000.jpg
Indirect Cache, Hemi Infinity, normal gain
Indirect Cache, Hemi Infinity, normal gain.jpg
Indirect Cache, Mesh Emitter, normal gain
Indirect Cache, Mesh Emitter, normal gain.jpg
Caustic Cache, Hemi Infinity, gain10000, GlossinessT 0
Caustic Cache, Hemi Infinity, gain10000, GlossinessT 0.jpg
Caustic Cache, Hemi Infinity, gain10000, GlossinessT 4294967295
Caustic Cache, Hemi Infinity, gain10000, GlossinessT 4294967295.jpg
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

I created small isolated case here:
The attachment 00_concept_lux.zip is no longer available
the small selected object with material+emission will completely ruin photongi unless you hide it or unplug emission :!:

emission:
Screenshot from 2019-03-11 07-31-20.png
NOemission:
Screenshot from 2019-03-11 07-31-46.png
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI cache

Post by provisory »

I can't try it now myself, but maybe set the diffuse color of the emitter mesh to black.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

provisory wrote: Mon Mar 11, 2019 7:38 am I can't try it now myself, but maybe set the diffuse color of the emitter mesh to black.
This doesn't change anything.
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI cache

Post by provisory »

Then decrease emission's importance.
Luximage
Posts: 165
Joined: Sun Jan 14, 2018 8:01 pm

Re: PhotonGI cache

Post by Luximage »

Yes you can decrease the emission's importance to 0.01 , also your pendant emission light consists of many faces, if your light was simpler like a plane your cache would be better from the start.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

importance doesn't solve the bug, it just makes the problem much less apparent with a very weak light. However if you have low importance but strong light, you end up with the same issue. Lowering importance is not even a workaround, it's almost the same as disabling the emission.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

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.
Support LuxCoreRender project with salts and bounties
Post Reply