Page 12 of 109
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 10:09 am
by Dade
epilectrolytics wrote: Sat Jan 26, 2019 8:44 am
Don't know if it is a clamping issue, but for the caustic cache clamp value = 1 is required and in my test scene caustics are muted and the light balance is very different when compared with a bidir metro render.
There were few factors:
1) a PhotonGI bug causing fireflies (fixed);
2) another PhotonGI bug causing not correct (darker caustics) results for no-matte materials (fixed);
3) the very small radius used in the scene;
4) extreme clamping value;
5) I have also increased the number of photons used for computing the result (path.photongi.lookup.maxcount) in order to improve caustic look;
The rendering with the following properties:
Code: Select all
path.photongi.sampler.type = METROPOLIS
path.photongi.direct.enabled = 0
path.photongi.indirect.enabled = 0
path.photongi.caustic.enabled = 1
path.photongi.photon.maxcount = 100000000
path.photongi.photon.maxdepth = 16
path.photongi.direct.maxsize = 0
path.photongi.indirect.maxsize = 0
path.photongi.caustic.maxsize = 10000000
path.photongi.lookup.maxcount = 512
path.photongi.lookup.radius = 0.015
path.photongi.lookup.normalangle= 10.0
and 10 samples/pixel and
no clamping at all is now:
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 2:06 pm
by Dade
I have reworked again the full list of properties:
Code: Select all
static Properties props = Properties() <<
Property("path.photongi.sampler.type")("METROPOLIS") <<
Property("path.photongi.photon.maxcount")(500000) <<
Property("path.photongi.photon.maxdepth")(4) <<
Property("path.photongi.visibility.enabled")(true) <<
Property("path.photongi.visibility.targethitrate")(.99f) <<
Property("path.photongi.visibility.maxsamplecount")(1024 * 1024) <<
Property("path.photongi.visibility.lookup.radius")(.15f) <<
Property("path.photongi.visibility.lookup.normalangle")(10.f) <<
Property("path.photongi.direct.enabled")(false) <<
Property("path.photongi.direct.maxsize")(25000) <<
Property("path.photongi.direct.lookup.maxcount")(64) <<
Property("path.photongi.direct.lookup.radius")(.15f) <<
Property("path.photongi.direct.lookup.normalangle")(10.f) <<
Property("path.photongi.indirect.enabled")(false) <<
Property("path.photongi.indirect.maxsize")(100000) <<
Property("path.photongi.indirect.lookup.maxcount")(64) <<
Property("path.photongi.indirect.lookup.radius")(.15f) <<
Property("path.photongi.indirect.lookup.normalangle")(10.f) <<
Property("path.photongi.caustic.enabled")(false) <<
Property("path.photongi.caustic.maxsize")(100000) <<
Property("path.photongi.caustic.lookup.maxcount")(256) <<
Property("path.photongi.caustic.lookup.radius")(.15f) <<
Property("path.photongi.caustic.lookup.normalangle")(10.f) <<
Property("path.photongi.debug.type")("none");
I have separated visibility, direct, indirect and caustic cache lookup parameters because, most of the times you want to use a smaller lookup radius for caustic than for indirect.
To recap, 99% of the scenes you want to use indirect only cache. The other 1% is caustics rendering. For
Indirect cache
Something like:
Code: Select all
path.photongi.photon.maxcount = 100000
path.photongi.photon.maxdepth = 4
path.photongi.visibility.lookup.radius = <path.photongi.indirect.lookup.radius * 2>
path.photongi.direct.enabled = 0
path.photongi.indirect.enabled = 1
path.photongi.indirect.maxsize = 100000
path.photongi.indirect.lookup.radius = 0.075
path.photongi.caustic.enabled = 0
Caustic cache
Something like:
Code: Select all
path.photongi.photon.maxcount = 100000000
path.photongi.photon.maxdepth = 4
path.photongi.visibility.lookup.radius = <path.photongi.caustic.lookup.radius * 4>
path.photongi.direct.enabled = 0
path.photongi.indirect.enabled = 0
path.photongi.caustic.enabled = 1
path.photongi.caustic.maxsize = 1000000
path.photongi.caustic.lookup.radius = 0.025
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 2:11 pm
by Dade
Next step, try to use Kd-tree over BVH, it may be faster. After this we may be ready for an alpha0 release (aka open the hell's gate !).
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 2:58 pm
by Sharlybg
Dade wrote: Mon Jan 28, 2019 2:11 pm
Next step, try to use Kd-tree over BVH, it may be faster. After this we may be ready for an alpha0 release (aka open the hell's gate !).
Don't be afraid you already win the Race Dade

Re: PhotonGI cache
Posted: Mon Jan 28, 2019 3:12 pm
by marcatore
Dade wrote: Mon Jan 28, 2019 2:11 pm
... an alpha0 release (aka open
the hell's gate !).
Ahahahaha

I'ts true! We're devils

Re: PhotonGI cache
Posted: Mon Jan 28, 2019 3:52 pm
by epilectrolytics
Dade wrote: Mon Jan 28, 2019 10:09 amThere were few factors:
1) a PhotonGI bug causing fireflies (fixed);
2) another PhotonGI bug causing not correct (darker caustics) results for no-matte materials (fixed);
3) the very small radius used in the scene;
4) extreme clamping value;
5) I have also increased the number of photons used for computing the result (path.photongi.lookup.maxcount) in order to improve caustic look
Caustics look way better now, great progress, thanks Dade!
Finding the right lookup radius is very tricky: too small misses photons (dark spots appear) and too high causes a memory bottleneck and the render slows down dramatically. I guess this will become easier with OCL on GPU with faster RAM.
When the photon prepass is rendered in Blendluxcore hopefully getting at the right photon count becomes easier.
Now when I change the lamp to sun+sky (no clamping) in my file the fireflies are back:
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 4:47 pm
by Dade
epilectrolytics wrote: Mon Jan 28, 2019 3:52 pm
Now when I change the lamp to sun+sky (no clamping) in my file the fireflies are back:
I totally forgot of direct hits on infinite lights, I only fixed area lights, I will apply the same fix to infinite.
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 7:26 pm
by alpistinho
Dade wrote: Mon Jan 28, 2019 2:11 pm
Next step, try to use Kd-tree over BVH, it may be faster. After this we may be ready for an alpha0 release (aka open the hell's gate !).
I feel like just this PhotonGI feature would be enough for a final 2.2 release, no other additions needed.
Re: PhotonGI cache
Posted: Mon Jan 28, 2019 8:59 pm
by Dade
alpistinho wrote: Mon Jan 28, 2019 7:26 pm
Dade wrote: Mon Jan 28, 2019 2:11 pm
Next step, try to use Kd-tree over BVH, it may be faster. After this we may be ready for an alpha0 release (aka open the hell's gate !).
I feel like just this PhotonGI feature would be enough for a final 2.2 release, no other additions needed.
I have still to add PhotonGI support for AOVs, light groups, volumes, transparent materials and OpenCL. It is still a lot of stuff but, yes, I think v2.2 will be pretty much all about PhotonGI.
Re: PhotonGI cache
Posted: Tue Jan 29, 2019 10:39 am
by Dade
Dade wrote: Mon Jan 28, 2019 4:47 pm
epilectrolytics wrote: Mon Jan 28, 2019 3:52 pm
Now when I change the lamp to sun+sky (no clamping) in my file the fireflies are back:
I totally forgot of direct hits on infinite lights, I only fixed area lights, I will apply the same fix to infinite.
Ok, fixed.