Page 26 of 102

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 9:28 am
by epilectrolytics
Sharlybg wrote:
Mon Feb 11, 2019 9:02 am
What is that ? cache isn't working on glossy shader ?

strange. How Dade manage to get boost on the Bench scene ?
lacilaci wrote:
Mon Feb 11, 2019 9:05 am
Dade I can send you the scene in either .blend or exported from blender for luxcore. If you want to take a look
I think we need a test scene like lacilaci's office (though that is probably too big) with a shiny floor, white walls with very rough reflection, a diffuse ceiling and some items like chairs or something.
That may cover the standard for interior renders and if the PGI works with that it's time for the alpha release.

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 9:33 am
by Dade
lacilaci wrote:
Mon Feb 11, 2019 9:19 am
I think I found the issue, it seems glossy coating material will not use cache!
And I used it in almost every wood material :D
Yes, at the moment the cache is enabled only for:

Code: Select all

bool PhotonGICache::IsPhotonGIEnabled(const BSDF &bsdf) const {
	const BSDFEvent eventTypes = bsdf.GetEventTypes();
	if (((eventTypes == (GLOSSY | REFLECT)) && (bsdf.GetGlossiness() >= params.indirect.glossinessUsageThreshold)) ||
			(eventTypes == (DIFFUSE | REFLECT)))
		return bsdf.IsPhotonGIEnabled();
	else
		return false;
}
So the material must be "DIFFUSE | REFLECT" or "GLOSSY | REFLECT" with a glossiness >= of the threshold.

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 9:50 am
by lacilaci
Dade wrote:
Mon Feb 11, 2019 9:33 am
lacilaci wrote:
Mon Feb 11, 2019 9:19 am
I think I found the issue, it seems glossy coating material will not use cache!
And I used it in almost every wood material :D
Yes, at the moment the cache is enabled only for:

Code: Select all

bool PhotonGICache::IsPhotonGIEnabled(const BSDF &bsdf) const {
	const BSDFEvent eventTypes = bsdf.GetEventTypes();
	if (((eventTypes == (GLOSSY | REFLECT)) && (bsdf.GetGlossiness() >= params.indirect.glossinessUsageThreshold)) ||
			(eventTypes == (DIFFUSE | REFLECT)))
		return bsdf.IsPhotonGIEnabled();
	else
		return false;
}
So the material must be "DIFFUSE | REFLECT" or "GLOSSY | REFLECT" with a glossiness >= of the threshold.
I see, for future though:
Since coating will most likely be always very glossy I hope it will be using threshold from it's base material which will most likely be more rough. Otherwise every material having coating will fall outside threshold of glossiness for cache calculation.

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 10:15 am
by lacilaci
more testing (in multiple scenes) shows that cache somehow has less power, don't know if it's lack of bounces, entries, or where the power is lost.
Difference is pretty big

cache
cache.jpg
nocache
nocache.jpg

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 10:19 am
by Dade
lacilaci wrote:
Mon Feb 11, 2019 10:15 am
more testing (in multiple scenes) shows that cache somehow has less power, don't know if it's lack of bounces, entries, or where the power is lost.
Difference is pretty big
Can you post a test scene ?

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 10:25 am
by lacilaci
Dade wrote:
Mon Feb 11, 2019 10:19 am
lacilaci wrote:
Mon Feb 11, 2019 10:15 am
more testing (in multiple scenes) shows that cache somehow has less power, don't know if it's lack of bounces, entries, or where the power is lost.
Difference is pretty big
Can you post a test scene ?
here... Different lighting but same problem
Just switch off photongi or switch to opencl and compare results
00_concept_lux.zip
(5.12 MiB) Downloaded 30 times

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 10:28 am
by Racleborg
lacilaci

render-boards.jpg. How do you get lighting to look as good and natural as that? Any chance of a scene? or just the layout of the lighting? ;)

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 10:35 am
by lacilaci
Racleborg wrote:
Mon Feb 11, 2019 10:28 am
lacilaci

render-boards.jpg. How do you get lighting to look as good and natural as that? Any chance of a scene? or just the layout of the lighting? ;)
It's literally just a default sky (no sun)

Rest is in materials, and even those are very basic. a texture for diffuse, bump and for wood I added shiny coating with the same bump as material (probably wasn't even necessary)

Can't share scene publicly cause it contains bunch of non free content too.

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 11:55 am
by epilectrolytics
marcatore wrote:
Mon Feb 11, 2019 9:07 am
in one of my test scene, caching is slowing the rendering, both "samples/sec" and "sample rate" are lower with caching.

what should I do as settings to have benefit from caching?
I'm experiencing the same and I think it is memory interaction.
The bigger the cache and the lookup radius, the more often the processor will fetch cache data from RAM in order to proceed and this is slowing the rendering down.
What settings to use is dependent on the scene and I have not figured out a rule of thump.
Also PGI is constantly changing in development and old settings become obsolete.

Once it is finished and runs on GPU, the faster VRAM will help with this I hope.

Also the caching is meant to reduce lots of noise so that even rendering at half speed would have a benefit in converging.

Re: PhotonGI cache

Posted: Mon Feb 11, 2019 12:08 pm
by lacilaci
epilectrolytics wrote:
Mon Feb 11, 2019 11:55 am
marcatore wrote:
Mon Feb 11, 2019 9:07 am
in one of my test scene, caching is slowing the rendering, both "samples/sec" and "sample rate" are lower with caching.

what should I do as settings to have benefit from caching?
I'm experiencing the same and I think it is memory interaction.
The bigger the cache and the lookup radius, the more often the processor will fetch cache data from RAM in order to proceed and this is slowing the rendering down.
What settings to use is dependent on the scene and I have not figured out a rule of thump.
Also PGI is constantly changing in development and old settings become obsolete.

Once it is finished and runs on GPU, the faster VRAM will help with this I hope.

Also the caching is meant to reduce lots of noise so that even rendering at half speed would have a benefit in converging.
yes, smaller cache = faster rendering. Instead of relying on faster vram I'd like to have cache small but as high quality as possible, no random colors and dark spots etc... or maybe a step between cache and rendering to correct some samples.

I don't know how corona does it, but last time I remember rendering lightcache pass didn't look very good, and had some random looking spots... yet I've seen no errors, spots, in final rendering.

In luxcore if there is even a small spot that is very different (in color or power) it can show through in final rendering. Maybe highly different samples from neighbors could be filtered out?