I’ve decided to once for all crush on DMC sampler and find out 100% what does it actually do in lab tests rather than testing it using work scenes and so on.
So basically 1st test. Using chrome-ich material + 2 self illuminating spheres. No lights and anything else in the scene.
AA settings 1-10 / threshold 10.0 - I assume this means that AA will not sample anything and all will come out of DMC sampler from shaders - all geometry not antyaliased.
1st:
adaptive amount = 0
shader gloss 0.2
shader samples = 512
render time 5.2 second
3rd
adaptive amount = 0.95
shader gloss 0.2
shader samples = 512
render time 3.6 secon - possibly as expected
4th
adaptive amount = 0.95
shader gloss 0.95
shader samples = 512
render time 3.4 secon - NOT AS EXPECTED
And here is what bugs me. Isn’t DMC sampler meant to be “smart” and don’t use all the samples in parts of shader/scene where he don’t need too? He don’t need to use all 512 (in fact he used around 425) when glossiness was at 0.95 in 4th test of the material. The 2nd test showed that it was just fine with 96 samples…
So if adaptive is at 0.95 then he traces all 512(or 95% of that number)? So where is the top end of the limit? I which setting control how much maximum is he going to use?
When adaptive is at 0.95, then 5% of the shader samples are traced initially. Depending on how different they are, additional samples are taken until the maximum samples specified in the shader are reached. In the case of 512 subdivs and 0.95 adaptive amount, V-Ray will trace 13107 rays initially (=512*512*0.05) and then continue adding samples until either the noise threshold is reached, or all 262144 rays are traced (=512*512).
So where is the top end of the limit? I which setting control how much maximum is he going to use?The shader subdivs determine the maximum.
Right so it sounds like this is exactly what I thought was happening. I just cant get to see it working when I type in the numbers.
Looking at this topic here http://forums.chaosgroup.com/showthread.php?76960-Adaptive-min-samples which I should’ve made together with this one I suppose… this is how it works.
Adaptive amount 0.95
Threshold 0.010
Adaptive Min samples = 16
light samples = 512
So basically when render starts Vray does this 512*512*0.05 = 13107 Then based on threshold of 0.01 he adds additional samples until threshold is happy. - with threshold as long as difference between pixels it bigger then the number he adds more samples until difference is less than the number or he reach max samples from light/material/gi/etc/etc.
So if I have 512 samples for light and threshold 0.9 the basically what vray should do is 512*512*0.05 13107 and given that the treshold is 0.9 he should pretty much use only around 13107 + few more samples and produce very noisy light image…
I have no idea how does the Adaptive Min Samples plug in to this equation. From previous posts it seems like its minimum samples before the Adaptive amount kick in so > Light has 512 samples my min samples has 16 which mean that. I start render. Vray traces 16(256 in total) samples per light/material/gi etc and after he has that data he starts DMC adaptive with 13107 samples. It sounds to me like the adaptive min samples is just a draft for vray to see whats where and how it is - very fast prepass render to do and the higher the value I type in the more accurate draft hell have to base his adaptive amount distribution of samples on ?
Then again I cant get to see what I expect with 512 samples per light and treshold of 0.9 so
I have no idea how does the Adaptive Min Samples plug in to this equation.In this particular set up, it has no effect at all since the initial samples determined by the adaptive amount (13107) is greater than 16 anyways.
Vray traces 16(256 in total) samples per light/material/gi etc and after he has that data he starts DMC adaptive with 13107 samples.No. V-Ray traces 13107 samples initially, and then continues to 512*512 if needed.
To step back a little bit, the idea of adaptive sampling is to start with a certain percentage of all samples that we are allowed to make, and then see if we need additional samples until we reached the maximum as specified in the light. This percentage is controlled by the “Adaptive amount” (whereas the “Noise threshold” is used to determine if we need additional samples after that). However, we don’t want to take too few samples - f.e. if our light has only 3 subdivs (=9 samples), and Adaptive amount is 0.95, this means that we would take 1 sample before the adaptive algorithm kicks in, and 1 sample is not enough to make a good initial guess for the value. So, the “Adaptive amount” itself is not enough to describe the number of samples that we want in our initial guess - we need some absolute minimum number of samples before we can start “guessing”. This number is the “Min. samples”.
Yes and no I did 2 tests. I wanted to test if by having high threshold I will have noisy image/light and if I have low threshold I will have smooth image/light.
So basically when vray is looking at light. He does 2 maths.
1. 512*512*0.05 = initial sampling count of 13107
2. adaptive min samples 16*16 = 256
If opt 1 is greater than option 2 then he is using option 1 for initial sampling and then based on threshold noise coming out of image hes adding samples until it reach sampling limit or threshold HOWEVER If option 2 samples are greater than option 1 samples then he is using option 2 for initial sampling and then based on threshold noise coming out of image hes adding samples until it reach sampling limit or threshold . - this is correct right?
Yup this is pretty much what I was thinking.That the min samples are there and are used to bottom limit the minimum of samples I get to use if I don’t get enough from shader/light after adaptive amount math… .Which makes me wonder if light or shader has max samples set to 32 and I use in adaptive min samples 64, Is the min samples overriding shader to 64 or is being capped at 32? - and then no matter what threshold I have I run at 32 samples?
Further more here is test scene I did. I named render layers with stuff I expected to see and behavior but it just dont happen. I’m not sure if I’m missing something or testing it the wrong way around or the test is too simple to show it…
So I did 3 render layers, L1 L2 L3
L1 = no adaptive amount, I set up the amount of samples for light that I expect to need for given scene. So 200 to get smooth nice look
L2 = Adaptive on at 0.95 amoun and 0.999 treshold. Which means that. Vray takes the 200 samples from light and does 200*0.05(I skipped the 200*200 as I guess if I just times it sampl*amount I get the same non square result?) So I get 10 samples. Which is more than Adaptive minimum samples 8 so The min samples are being ignored and vray is sending 10 samples to render. Then based on threshold of 0.999 I would expect vray to just trace 10 samples and render image very noisy.
L3 = adaptive on at 0.95 amoun and 0.001 treshold. Which means … same as above except that I expect the image to render just as smooth as in the case of using L1 but maybe quicker due to more accurate sample usage ? So he use 185 or something like that to clean up the image based on treshold.
Is this the correct thinking? If so why is my test not proving it.
I assume that Adaptive Treshold is not related to brightness of pixel but internal value of vray thats pluged to treshold for materials, gi, lights, etc etc that is being tweaked differently right ?
Thanks so much for your time and explanation Vlado ! testMinSample_03.zip (211 KB)
200 Subdivisions means that the maximum amount of samples that Vray will fire will be 200x200=40000
L1 - Adaptive Amount = 0 , Vray will fire all 40000 rays without any adaptation.
L2 - Adaptive Amount = 0.95(95% adaptive, only 5% of the samples will be fired) 40000x0.05 = 2000 samples not just 10 - that’s why the image still look smooth
L3 - Adaptive Amount - 0.95 Adaptive Threshold = 0.001 , Vray will fire initially 2000samples and then progressively fire more samples until the Threshold is reached or Maximum amount of samples specified in the light is reached. Threshold 0.001 is a very low value and most probably almost all samples will be fired 35000-40000.
Slightly related Svetlozar, what happens when a pixel is good enough for the DMC noise threshold but fails the aa noise threshold? Does another round of aa sampling happen with the non adaptive amount of secondary rays added again? Kind of an unlikely scenario admittedly!