PhotonGI caustic cache re-factoring

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

Post by lacilaci »

B.Y.O.B. wrote: Fri Sep 27, 2019 1:30 pm Are volumes supported yet by the modified cache? Wouldn't you need to store photons inside the 3D volume for it to work with the "orange juice scene"?
It works, but I have to use very high radius and low amount of photons to get it look good and also to have good performance. So I kinda have to decide if I want things like drinks to look good or if I want pool caustics to look good.

EDIT: Also open scenes have worse performance so I guess there is some issue there..

and since I would use higher radius the edges are kinda dark
glass.jpg
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI caustic cache re-factoring

Post by provisory »

I did some tests, and some caustics don't wanna show up with caustics cache.
(LuxCore version: https://dev.azure.com/LuxCoreRender/Lux ... uildId=801)

Light Tracing:
GlassSphere-lt.jpg
Caustic Cache:
GlassSphere-cc1.jpg

Settings:

Code: Select all

path.hybridbackforward.enable = 0
path.photongi.caustic.enabled = 1
path.photongi.caustic.lookup.normalangle = 90
path.photongi.caustic.lookup.radius = 0.0001
path.photongi.caustic.updatespp.rediusreduction = 0.95
path.photongi.caustic.updatespp.minradius = 0.0001
path.photongi.caustic.maxsize = 5000000
path.photongi.caustic.updatespp = 8

I tried larger radius too, but it was the same except the more blur:
GlassSphere-cc2.jpg
Attachments
GlassSphere.zip
(246.92 KiB) Downloaded 154 times
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI caustic cache re-factoring

Post by B.Y.O.B. »

Btw., shouldn't the property be named "radiusreduction" instead of "rediusreduction"? (a instead of e)
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: Fri Sep 27, 2019 2:06 pm I did some tests, and some caustics don't wanna show up with caustics cache.
Have you changed the photon path max. depth ? The default is something like 4...
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 »

lacilaci wrote: Fri Sep 27, 2019 1:53 pm It works, but I have to use very high radius and low amount of photons to get it look good and also to have good performance.
Filling a volume with cache entries requires a lot more work than a surface (i.e. 3D Vs 2D).
lacilaci wrote: Fri Sep 27, 2019 1:53 pm EDIT: Also open scenes have worse performance so I guess there is some issue there..
Shooting photons in the right direction in an open large scene from the sun is a lot harder than in a close small scene with an area light.

The visibility map (the place where cache entries are created), at the moment cover all visibile scene. If I use the cache only for SDS paths, I can use a visibility map of area seen trough only (nearly) specular surfaces (i.e. a lot smaller).
Support LuxCoreRender project with salts and bounties
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI caustic cache re-factoring

Post by provisory »

Dade wrote: Fri Sep 27, 2019 4:06 pm Have you changed the photon path max. depth ? The default is something like 4...
This was the solution, thanks!
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI caustic cache re-factoring

Post by provisory »

Dade wrote: Fri Sep 27, 2019 10:00 am No, no, I will still add an option for "use_caustic_cache_only_for_SDS_paths" so you use PATHOCL + Hybrid rendering + SDS Caustic cache to get the best of all modes.

From the UI point of view it should be just a combo box in Blender with:

1) path tracing
2) path tracing + light tracing
3) path tracing + light tracing + SDS cache

I would not expose PhotonGI caustic cache at all in Blender, I would use it internally only if #3 is selected.
If "normal" and SDS caustics will be treated differently, won't be a hazard that they will look differently?
E.g. caustics in a mirror will be lower resolution than the original caustics in front of it.
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: Fri Sep 27, 2019 5:03 pm If "normal" and SDS caustics will be treated differently, won't be a hazard that they will look differently?
E.g. caustics in a mirror will be lower resolution than the original caustics in front of it.
I doubt the difference will be noticeable in any real world scenario (and in vast majority of the tests).
Support LuxCoreRender project with salts and bounties
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: PhotonGI caustic cache re-factoring

Post by provisory »

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
CCvsVol-bidir.jpg (22.61 KiB) Viewed 4399 times
PT Sobol + Light Tracing:
CCvsVol-lt.jpg
CCvsVol-lt.jpg (7.34 KiB) Viewed 4399 times
PT Sobol + Caustic Cache:
CCvsVol-cc.jpg
CCvsVol-cc.jpg (5.92 KiB) Viewed 4399 times
Attachments
CCvsVol.zip
(68.44 KiB) Downloaded 145 times
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI caustic cache re-factoring

Post by lacilaci »

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
I use homogenous volume with .1 scattering in my pool so I guess I wouldn't see much if it didn't work.

But I think theres some problem when there isn't much in the scene to bounce photons (hdri+a glass will render extremely slowly) that's why I suspected that photons might be shooting into infinity never being killed...?
Post Reply