Page 8 of 11

Re: PhotonGI caustic cache re-factoring

Posted: Tue Oct 01, 2019 3:55 pm
by lacilaci
Dade wrote: Tue Oct 01, 2019 3:35 pm
lacilaci wrote: Tue Oct 01, 2019 12:37 pm Are you sure lighttracing is working at all now?
Yes, it does, left caustic with light tracing and right reflected caustic with caustic cache:


sds2.jpg

lacilaci wrote: Tue Oct 01, 2019 12:37 pm here is +lighttracing(hybrid), again the table shadow on the table shouldn't be dark - it should be caustics and it worked with lighttracing before
hybrid.jpg

So it seems to me that now I can have cache doing sds only, but lighttracing isn't doing anything.
It is very hard to say by looking only at (the out of focus) image. You have to check if the table material has a low roughness (so it is considered nearly specular) and/or where the light of that caustic is coming from: it looks like a "ripple" caustic so it may be light reflected from the water :?:
It's from sun(using sun and sky). I don't get caustics coming through glass and also no reflected caustics from water itself. Only sds work.

For now, I can render at least some shots. Will investigate further in the morning (I use weak dispersion and I see faint colored noise over scene that goes away, but no caustics appear)

Re: PhotonGI caustic cache re-factoring

Posted: Tue Oct 01, 2019 10:46 pm
by kintuX
It really feels good, better than PSR. 8-)
Took latest daily for a spin. Nothing special, pool test scene with few changes. Didn't found any problems. :?
The attachment pooltester.jpg is no longer available
LuxCore Scene:
pooltester.jpg
@ 2040x1080px went up to 2200 samples in 900sec (15min).

Q: Is there an option to use OIDN within LuxCoreUI?

Re: PhotonGI caustic cache re-factoring

Posted: Wed Oct 02, 2019 3:32 am
by lacilaci
hm. I can make it work in a simple scene, but in my main scene lighttracing isn't adding any caustics... still not sure why

EDIT: Nevermind, it started working again after restarting.

Re: PhotonGI caustic cache re-factoring

Posted: Wed Oct 02, 2019 5:41 pm
by provisory
Dade wrote: Sun Sep 29, 2019 1:35 pm 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.
Yes, I know this, and it doesn't really bother me, because it can be easily work around with a plane of glass with IOR 1.0, but here it wasn't my point.
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:
It's logical, and based on your advice I tried with small enclosing boxes, but couldn't get usable results even with them, so I'm afraid, it practically means, that caustic cache can't work with scattering volumes.

Re: PhotonGI caustic cache re-factoring

Posted: Wed Oct 02, 2019 8:03 pm
by Dade
kintuX wrote: Tue Oct 01, 2019 10:46 pm Q: Is there an option to use OIDN within LuxCoreUI?
You can create an additional image pipeline inside LuxCoreUI but it is a lengthy and annoying process. You can just edit your .cfg file and duplicate the existing pipeline, for instance:

Code: Select all

#
# First image pipeline
#
film.imagepipelines.0.0.type = NOP
film.imagepipelines.0.1.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.1.exposure = "0.01"
film.imagepipelines.0.1.fstop = "16"
film.imagepipelines.0.1.sensitivity = "100"
film.imagepipelines.0.2.type = "GAMMA_CORRECTION"
film.imagepipelines.0.2.value = "2.2"
to:

Code: Select all

#
# First image pipeline
#
film.imagepipelines.0.0.type = NOP
film.imagepipelines.0.1.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.1.exposure = "0.01"
film.imagepipelines.0.1.fstop = "16"
film.imagepipelines.0.1.sensitivity = "100"
film.imagepipelines.0.2.type = "GAMMA_CORRECTION"
film.imagepipelines.0.2.value = "2.2"
#
# Second image pipeline with OIDN
#
film.imagepipelines.1.0.type = INTEL_OIDN
film.imagepipelines.1.1.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.1.1.exposure = "0.01"
film.imagepipelines.1.1.fstop = "16"
film.imagepipelines.1.1.sensitivity = "100"
film.imagepipelines.1.2.type = "GAMMA_CORRECTION"
film.imagepipelines.1.2.value = "2.2"

Re: PhotonGI caustic cache re-factoring

Posted: Thu Oct 03, 2019 2:24 pm
by kintuX
Dade wrote: Wed Oct 02, 2019 8:03 pm
kintuX wrote: Tue Oct 01, 2019 10:46 pm Q: Is there an option to use OIDN within LuxCoreUI?
You can create an additional image pipeline inside LuxCoreUI but it is a lengthy and annoying process. You can just edit your .cfg file and duplicate the existing pipeline, for instance...
Thanks, will do so and see how it goes.

Re: PhotonGI caustic cache re-factoring

Posted: Fri Oct 04, 2019 8:20 am
by Dade
BTW, there is a case when you have to use Caustic cache for normal caustics too: TILEPATH. If you use tile rendering, caustic cache is the only way to render caustics, light tracing can not work with tile rendering.

Re: PhotonGI caustic cache re-factoring

Posted: Thu Oct 10, 2019 3:25 pm
by B.Y.O.B.
Hi,

I'm currently checking how best to integrate this in the Blender addon.
At the moment I'm a bit lost, not sure how to set the properties for these configurations:
Dade wrote: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
Is there a property to tell the caustic cache to only do SDS paths, or does this happen automatically?
Should radius reduction be used, or is this not recommended?
Are the properties in the first post still up to date? (the SDL wiki page has not been updated yet)

When using light tracing + SDS cache, I wonder a bit about the CPU usage. Can I specify that half the cores should do light tracing and the other half SDS cache? Or should I leave it to the OS scheduler to distribute the work?

Re: PhotonGI caustic cache re-factoring

Posted: Thu Oct 10, 2019 5:25 pm
by epilectrolytics
I'd suggest to leave the UI implementation as it is and just complement the old caustic cache properties with the new ones like min radius and radius reduction.
When light tracing and caustic cache are both activated it should switch to SDS-only automatically (could be indicated in tooltips).
(Or is it possible to switch between "caustic cache" and "SDS-cache" labels in Blender dependent on light trace setting?)

Probably periodic and persistent settings for caustic cache can be removed because periodic will be default and there is no reason to disable it.

About CPU load:
Currently I think the render alternates between Hybrid (PathOCL+LightCPUcaustics) and cache building on CPU (with GPU idle).
This is not optimal but ATM the present settings (partition in light trace settings and CPU cores in performance) should be sufficient.

Re: PhotonGI caustic cache re-factoring

Posted: Thu Oct 10, 2019 5:52 pm
by Dade
B.Y.O.B. wrote: Thu Oct 10, 2019 3:25 pm Is there a property to tell the caustic cache to only do SDS paths, or does this happen automatically?
It is not necessary, the path tracing code will do it automatically if you enable the caustic cache and the light tracing at the same time.
B.Y.O.B. wrote: Thu Oct 10, 2019 3:25 pm Should radius reduction be used, or is this not recommended?
I would start by just exposing the properties one on one and than we will see.
B.Y.O.B. wrote: Thu Oct 10, 2019 3:25 pm Are the properties in the first post still up to date? (the SDL wiki page has not been updated yet)
The properties are defined here, with their default values: https://github.com/LuxCoreRender/LuxCor ... es.cpp#L84

Code: Select all

path.photongi.caustic.enabled = 0
path.photongi.caustic.maxsize = 100000
path.photongi.caustic.updatespp = 8
path.photongi.caustic.updatespp.radiusreduction = 0.96
path.photongi.caustic.updatespp.minradius = .003
path.photongi.caustic.lookup.radius = 0.15
path.photongi.caustic.lookup.normalangle = 10.0
"path.photongi.caustic.updatespp.minradius" is the only really new properties and some of the old one have been removed.
B.Y.O.B. wrote: Thu Oct 10, 2019 3:25 pm When using light tracing + SDS cache, I wonder a bit about the CPU usage. Can I specify that half the cores should do light tracing and the other half SDS cache? Or should I leave it to the OS scheduler to distribute the work?
Caustic cache is used during eye tracing so it is used by the GPU, not the CPU (if it is doing light tracing). There no threads count to be set.