PhotonGI caustic cache re-factoring

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 caustic cache re-factoring

Post by Dade »

I added the support for OpenCL.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI caustic cache re-factoring

Post by Dade »

provisory wrote: Sun Sep 29, 2019 10:27 am Are you sure that caustic cache works with volumes?

It didn't seem to me in my scene, so I made a simple test case.

BiDir + metro:
CCvsVol-bidir.jpg

PT Sobol + Light Tracing:
CCvsVol-lt.jpg

PT Sobol + Caustic Cache:
CCvsVol-cc.jpg
Light tracing (or the cache) is used only "under" the sphere because the caustic is only there, over the sphere, normal path tracing will be used and your light source is very hard to find for a path tracer: just render with normal path tracing to have an idea.

About the cache, the problem is here:

Code: Select all

[LuxCore][0.613] PhotonGI visibility lookup radius: 0.0169757
[LuxCore][0.613] SceneVisibility trace thread count: 12
[LuxCore][2.121] SceneVisibility hit rate: 0.2408%
[LuxCore][2.153] SceneVisibility total entries: 1063240
The scene visibility has an hit rate of 0.2408% but this isn't really surprising: you are trying to cover an infinite 3D space with cache entries. Your volume is the world default and you have an open scene :!:

The cache can cover only a finite amount of space, try to enclose your scene in a box or to use a box volume :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 caustic cache re-factoring

Post by lacilaci »

Dade wrote: Sun Sep 29, 2019 1:35 pm
The scene visibility has an hit rate of 0.2408% but this isn't really surprising: you are trying to cover an infinite 3D space with cache entries. Your volume is the world default and you have an open scene :!:

The cache can cover only a finite amount of space, try to enclose your scene in a box or to use a box volume :idea:
Product design showcase might often be happening in a very open scene, can't we have bounced photons killed once they exit scene bounding box? Wouldn't this help focus cache where it needs to happen?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI caustic cache re-factoring

Post by Dade »

lacilaci wrote: Sun Sep 29, 2019 1:52 pm Product design showcase might often be happening in a very open scene, can't we have bounced photons killed once they exit scene bounding box? Wouldn't this help focus cache where it needs to happen?
The above scene bounding box is really small (i.e. it would truncate the visible volume scattering under the sphere, with no volume caustic at all). However this is a quite corner case: the use of default scene volume imply a infinite scene size, this is somewhat incompatible with using a finite (volume) cache.
Support LuxCoreRender project with salts and bounties
evacnoc
Posts: 12
Joined: Sun Sep 29, 2019 6:33 pm

Re: PhotonGI caustic cache re-factoring

Post by evacnoc »

Hi,
I'm new to Luxcore and just started testing the last build.
What settings should I modify to get light passing through water plane when the camera is below it? :)
Attachments
caustics test 01.jpg
caustics test 02.jpg
caustics test 03.jpg
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI caustic cache re-factoring

Post by Dade »

evacnoc wrote: Sun Sep 29, 2019 6:49 pm What settings should I modify to get light passing through water plane when the camera is below it? :)
You have to set the camera volume to "water" otherwise the ray will start with default scene volume (I assume it is "air"). In general, you have to be careful setting up the object volumes or you can end with some odd result.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI caustic cache re-factoring

Post by Dade »

I have added the option to use the caustic cache only for SDS paths:

Code: Select all

path.photongi.caustic.useonlyforsds = 1
And this is a rendering with Hybrid forward/backward path tracing and caustic cache used only for SDS paths:

sds.jpg

This is some serious beauty :D
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI caustic cache re-factoring

Post by lacilaci »

Dade wrote: Mon Sep 30, 2019 8:46 am I have added the option to use the caustic cache only for SDS paths:

Code: Select all

path.photongi.caustic.useonlyforsds = 1
And this is a rendering with Hybrid forward/backward path tracing and caustic cache used only for SDS paths:


sds.jpg


This is some serious beauty :D
Oh, yes...
Can I assume that since cache is sds only it will be faster?
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI caustic cache re-factoring

Post by Sharlybg »

This is some serious beauty
What an achievement you have done so far :ugeek:
Can I assume that since cache is sds only it will be faster?
This need to be benchmarked.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI caustic cache re-factoring

Post by Dade »

lacilaci wrote: Mon Sep 30, 2019 8:51 am Can I assume that since cache is sds only it will be faster?
What do you mean ? Faster compared to ? The cache look up is done only for SDS paths so there are a lot less cache look up (I assume you mean this). However the cache creation time (and update) is exactly the same (a caustic is a caustic and I can not know if it will be seen trough a specular surface or not).

This is a v2.3 manifesto:

luxv23.jpg

If you remove glass dispersion from the first one, you have a Cycles rendering :mrgreen:
Support LuxCoreRender project with salts and bounties
Post Reply