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 »

Dade wrote: Fri Sep 27, 2019 9:12 am Try to set "path.photongi.caustic.lookup.normalangle" to something big like 90 degree, the default is 10 and is very small. It should help to smooth curved surfaces.
With small radiuses I don't see much difference using 90 degre(except brightness)... With larger radiuses it will start smooth, but as radius decreases, low frequency noise from photons appears anyway - which is problematic cause if you use like 75K photons and at pass 300 you start seeing small spots, those 75K photons per 4 passes is then too slow to clear them..
So one way or another you need a lot of photons and you need them at very small radius otherwise performance goes bad(and edges dark) since the initial smoothness is replaced and becoming forever noisy with those few photons per scene (it might work in a small scale scene though).

But I think those round/curved surfaces render "OK" with very small radius and a LOT of photons, it is still slow on the first sight, but I'm doing 5M photons per 4 passes so the noise level is close to equal, while I also get small curved surfaces covered properly and at the same time large sharp shaped caustics

this is 0.001 lookup and minradius (using 90 degree normalangle boost brightness some more but convergence is ~same as 10) and 5M photons
55samples.jpg
It is still apparent that floor is getting better caustics but even at 55 passes you start seeing caustics shapes on the sphere (instead of low frequency noise) but I'm a lot happier with what I'm seeing already with few parameters to control. Maybe curved/round surface is harder to render for some other reason, I don't know...


Dade wrote: Fri Sep 27, 2019 9:12 am
lacilaci wrote: Fri Sep 27, 2019 5:10 am I think it could be pretty awesome if we could have 50%cpu runnig VM sds, 50%cpu running lighttracing and gpu doing pathtracing :lol:
It is one of the 2 options:

1) uses the cache like now, both on CPU and GPU. Indeed this can be fast but the periodic update at each passes is detrimental for GPUs because they have to wait for the new pass data from the CPU. This slow down the renderings at low resolution (i.e. a lot of pass updates) but should have no real impact at higher resolutions where instead the GPU speed up will help a lot.
Remember that caustic cache look up is done with eye paths so it can be done on GPUs.

2) Have a dedicate process for SDS rendering on the CPU with a static partition of CPU with light tracing. However having a static partition (like 50% + 50%) isn't very elegant and can be sub-optimal.

At the moment I'm think more to #1 solution.
I'm afraid of two things if you use this for all the caustics...

1. fireflies, no matter how hard I try or if I shoot 500 000 000 photons (100 000 000 actually cast as console reported) I always get few isolated spots here and there - this doesn't happen with lighttracing and it seems it's a problem that appears with distand reflected caustics (oblect closer to water will have clear reflected caustics but further away it's fireflies always)

2. Vram, will I still be able to render 5M+ photons per few passes with gpu without sacrificing a lot of Vram?
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 9:43 am I'm afraid of two things if you use this for all the caustics...
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.

P.S. Lacilaci, you are using CPU-only rendering right ?
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: Fri Sep 27, 2019 10:00 am
lacilaci wrote: Fri Sep 27, 2019 9:43 am I'm afraid of two things if you use this for all the caustics...
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.

P.S. Lacilaci, you are using CPU-only rendering right ?
I use cpu only, I did try opencl and it rendered ~ok but frozen at the end :D I know you haven't done opencl yet so all results posted are cpu only

You say you won't expose caustic cache settings but what settings will you use? Your defaults are not working on my scene at all! I had to disable alpha and just use 0.001 and 5M photons to render properly... I'm however not sure if I would use this as universal settings cause in smaller scene it could demand different settings...
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI caustic cache re-factoring

Post by lacilaci »

Finaly a proper looking pool water

0.001 and 50M photons
poolwater.jpg
drinks are almost black though...
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI caustic cache re-factoring

Post by lacilaci »

and last test for today,

this is zoom out on 24mpix rendering (6000x4000) about 30min. (0.001 and 50M photons)
6x4.jpg
and this is 100% 1:1 zoom on the same render
6x4zoom.jpg
cpu only so I hope for a bit better performance in future (This could take up to 3+ hours to clean enough)
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 »

lacilaci wrote: Fri Sep 27, 2019 11:25 am Finaly a proper looking pool water

0.001 and 50M photons
poolwater.jpg

drinks are almost black though...
This is already a great achievement.

I'm pretty sure drink can be faked in this case. :geek:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI caustic cache re-factoring

Post by epilectrolytics »

lacilaci wrote: Fri Sep 27, 2019 11:25 am Finaly a proper looking pool water

0.001 and 50M photons
poolwater.jpg

drinks are almost black though...
Charly is right, this looks great already, I see no darkening problem any more!

About the drinks, it should be possible to have a cheap fake sss material that looks believable for simple shapes like spheres and cylinders, we should put that on the v2.3 suggestion list.
Currently it is done with unbiased volume multiscattering which is overkill and not feasible in this situation.
Last edited by epilectrolytics on Fri Sep 27, 2019 1:15 pm, edited 1 time in total.
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 »

Sharlybg wrote: Fri Sep 27, 2019 12:37 pm I'm pretty sure drink can be faked in this case. :geek:
Yes, it is not worth going crazy for 5x10 pixels, hybrid glass will do the trick.
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 10:07 am You say you won't expose caustic cache settings but what settings will you use? Your defaults are not working on my scene at all! I had to disable alpha and just use 0.001 and 5M photons to render properly... I'm however not sure if I would use this as universal settings cause in smaller scene it could demand different settings...
I mean: hide PhotonGI caustic setting as stand alone feature/panel, just show the configuration parameters only if you select "path tracing + light tracing + SDS cache", under a SDS cache configuration panel.
Support LuxCoreRender project with salts and bounties
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. »

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"?
Post Reply