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 »

Racleborg wrote: Wed Feb 20, 2019 10:48 am Under what sort of circumstances should I turn OFF the 'USE PHOTON GI CACHE', in the Material Output node?

Thanks
Hopefully you wouldn't need to and this option should not be exposed in my opinion...
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: PhotonGI cache

Post by Racleborg »

Hopefully you wouldn't need to and this option should not be exposed in my opinion...
Ok, thank you.
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI cache

Post by provisory »

Dade wrote: Wed Feb 20, 2019 10:39 am Can you post a test scene causing the crash ?
Currently I'm AFK, maybe later.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

Racleborg wrote: Wed Feb 20, 2019 11:08 am
Hopefully you wouldn't need to and this option should not be exposed in my opinion...
Ok, thank you.
It a safe net if something is not working well. It should be never required (but it is better to have it as last resort).
Support LuxCoreRender project with salts and bounties
frank_yifei
Posts: 16
Joined: Fri Mar 09, 2018 1:46 pm

Re: PhotonGI cache

Post by frank_yifei »

Dade wrote: Wed Feb 20, 2019 10:04 am
frank_yifei wrote: Wed Feb 20, 2019 2:27 am For a test scene, I tried to make the caustic result look smoother so I increase lookup radius. I found a problem.
using opencl + photonGI, setting caustic lookup radius higher will crash blender. The error message is "ERROR: clEnqueueWriteBuffer
Error: Unrecognized Exception". Path cpu works well with caustic, i can set lookup radius to any value, like 100.
Indirect cache can have lookup radius at any value, under opencl or cpu
My computer have 4 core intel cpu, nvidia 1060 6gb.
Your test scene is working fine here on my Linux+GTX980. Making the radius larger, it will make also the rendering slower. May be, it becomes too slow and the driver kick in and kill the GPU kernel execution.

Given a radius causing the crash, can you try to cut in half (even multiple times) the caustic cache size ? Reducing the size will increase the rendering time again, so if my theory is correct, it should stop crashing at some point.

I'm working on this "larger radius => slower rendering" problem.
I did what you said and it worked very well. Thank you for adding this feature, it is very useful.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

ok, so came home and tried some latest update aaaand. Is it possible to make coating material not use cache but base material use cache?
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: PhotonGI cache

Post by Racleborg »

It a safe net if something is not working well. It should be never required (but it is better to have it as last resort).
Thank you. It's nice to have the option!
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: Wed Feb 20, 2019 2:05 pm ok, so came home and tried some latest update aaaand. Is it possible to make coating material not use cache but base material use cache?
Nope (but why ?)
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 »

Dade wrote: Wed Feb 20, 2019 4:19 pm
lacilaci wrote: Wed Feb 20, 2019 2:05 pm ok, so came home and tried some latest update aaaand. Is it possible to make coating material not use cache but base material use cache?
Nope (but why ?)
coating is usually very low in roughness so material with coating will pretty much always fall bellow 0.2 threshold for using cache. I also seem to have problem with darker textures and cache. Everything is near black in cache... Will post some testscene tomorrow when I'll be able to replicate the issues with small scene.
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 introduced a new stage in PhotonGI caustic cache pre-processing. It merges near photons coming from the same directions. This allows to greatly reduce the number of clustered/overlapped entries in the cache and to greatly improve the rendering speed (especially for larger radius).

This is a rendering without merge phase (0.93M samples/sec):

c1.jpg

and this with with merge phase (5.15M samples/sec):

c2.jpg

So it is 5 times faster. It is a bit a trade off between caustic sharpness/pointiness and blurring but I prefer the second and the 5x speed increase is worth it.

For a comparison, this is BiDir+Metropolis:

bidir.jpg

The caustic is sharper but look how much better is the PhotonGI rendered cube with SDS paths (something plain BiDir can not render).
Support LuxCoreRender project with salts and bounties
Post Reply