I should have fixed the problem.happyboy wrote: Tue Aug 13, 2019 1:28 amThank you, alpistinho & Dade!Dade wrote: Mon Aug 12, 2019 1:09 pm The sample size is very wrong, I guess I forgot to update the value, it should 4 (unable to check the code at the moment). It is the number of samples required for each path vertex and +3 suggests it uses 4 values at the moment.
I'll use my own fix for now and wait for Dade back from holiday![]()
PhotonGI cache
Re: PhotonGI cache
Re: PhotonGI cache
It still crashes...you increased sampleStepSize, so sampleSize and sampleOffset increased in the same way?
Re: PhotonGI cache
Yes, look at the code:happyboy wrote: Wed Aug 21, 2019 12:06 pm It still crashes...you increased sampleStepSize, so sampleSize and sampleOffset increased in the same way?
Code: Select all
// Request the samples
const u_int sampleBootSize = 5;
const u_int sampleStepSize = 4;
const u_int sampleSize =
sampleBootSize + // To generate eye ray
params.maxPathDepth * sampleStepSize; // For each path vertex
[...]
const u_int sampleOffset = sampleBootSize + depthInfo.depth * sampleStepSize;
So if it still crash it should be something different, just re-run the new code under a debugger and post where the crash is.
Re: PhotonGI cache
My bad! for some reason the old version sits in the PATH before the new version so I was testing the old version ...Dade wrote: Wed Aug 21, 2019 1:41 pm So if it still crash it should be something different, just re-run the new code under a debugger and post where the crash is.
Now it doesn't crash anymore. Tried to render 10+ times. Thanks!!!
And looking closer at the code, I understood your fix: since depth starts from 0 instead of 1, sampleSize is always at least 4 larger than sampleOffset, so it will not crash at that point.
Re: PhotonGI cache
Is it a known issue or maybe intentional that PGI doesn't work on Mix Material, even if the mixed materials would work in themselves?
-
- Donor
- Posts: 813
- Joined: Thu Oct 04, 2018 6:06 am
Re: PhotonGI cache
Noticed that too.
Re: PhotonGI cache
It should work but depends a lot on what you are mixing: there are parameters like glossiness or if a material is only DIFFUSE/GLOSSY/SPECULAR, etc. that may disable PhotonGI. For instance, if you mix "matte" with "mirror, PGI will disable indirect cache on that material because it can be "SPECULAR".provisory wrote: Tue Sep 10, 2019 9:21 am Is it a known issue or maybe intentional that PGI doesn't work on Mix Material, even if the mixed materials would work in themselves?
If you post a test scene, I can tell you what is going on.
Re: PhotonGI cache
I have this idea that might be a bit stupid but maybe not:
Would it be possible to control after how many bounces is photongi used? Maybe this would help with some reflection artifacting or leaks?
So maybe have 1 or 2 bounces brute force and afterwards sample from cache(a control exposed to the user).
The reason is that sometimes luxcore performs well in interior even without photongi but some areas are a bit "too deep" in terms of gi so they could benefit from photongi. However enabling cache might bring some artifacting even to areas which were ok and fast before. So I have to pick between artifacts and speed...
In my head I think this could help protect areas exposed to few bounces but still give speedup for hard to reach areas.
Would it be possible to control after how many bounces is photongi used? Maybe this would help with some reflection artifacting or leaks?
So maybe have 1 or 2 bounces brute force and afterwards sample from cache(a control exposed to the user).
The reason is that sometimes luxcore performs well in interior even without photongi but some areas are a bit "too deep" in terms of gi so they could benefit from photongi. However enabling cache might bring some artifacting even to areas which were ok and fast before. So I have to pick between artifacts and speed...
In my head I think this could help protect areas exposed to few bounces but still give speedup for hard to reach areas.
Re: PhotonGI cache
Here you go and Thanks!
(I know, that there is no point in mixing Glossy with Matte. It came up in this topic: viewtopic.php?f=4&t=1372)
- Attachments
-
- PGIvsMixed.blend
- (535.57 KiB) Downloaded 382 times
Re: PhotonGI cache
Ok, the problem was that mix (and glossycoatting) report their glossiness as Min() of the referenced materials and any not GLOSSY material report a glossiness of 0.0: so the result when mixing not glossy materials was always 0.0 (and PGI was disabled).provisory wrote: Wed Sep 11, 2019 4:56 pmHere you go and Thanks!
(I know, that there is no point in mixing Glossy with Matte. It came up in this topic: viewtopic.php?f=4&t=1372)
I should have fixed the problem: now only the glossiness of GLOSSY materials is taken in account and this should fix the problem for mix (and glossycoatting).