download - HERE
download - HERE
3x3 INITIAL SAMPLING
1 SAMPLE PER PIXEL
AFTER INITIAL SAMPLING RENDER
WILL RETURN COLOR FOR
BASED ON DIFFERENCE DEFINED BY
THRESHOLD, RENDER WILL CAST
MORE SAMPLES AT SOME PIXELS
AND COLOR WILL BE UPDATED
1 SAMPLE PER PIXEL
RENDER TIME: 1.9 SEC
100 SAMPLES PER PIXEL
RENDER TIME: 2 min 55 SEC
MINIMUM 1 MAXIMUM 100 SAMPLES
RENDER TIME: 1 min 1 SEC
SUBDIVISION SAMPLER WILL PLACE
INITIAL SAMPLES AT THE EDGE OF
Based on Clr Thresh defined in render options, VRay will check if
difference in color between samples from edges inside pixel is
higher than threshold value, if it is, it will cast more samples
inside that pixel, if it's not, it will finish sampling and it will
return final pixel color.
|EXAMPLE A |
initial samples are cast at the edge
of each pixel, color informations are
gathered. 1st pixel is very close to
color of 2nd pixel. Since color difference
is under threshold defined in
render settings, render will decide that
it's not worth adding more samples
to the pixels.
|EXAMPLE B |
Color difference between 1st and
2nd pixel is very high, over
Color Threshold, which means
render will send more samples
to those pixels. Maximum
number of samples allowed will
be defined by Max rate. 2 in
this case means maximum 16
additional samples per pixel, plus
those already cast at the edges.
ADAPTIVE SUBDIVISION SAMPLER
... for some pixels more samples are cast, for some less, it all depends on color contrast difference from samples inside and on the edge of the pixel. This example has Subdivision sampler set to Min 0 Max 2, which means 1 initial sample is cast per pixel, but since it's at the edge of pixel it's shared with surrounding pixels, and then based on color difference, oversampling can go up to 16 additional samples per pixel.
DECISION TO CAST...
... rays inside pixel is based on color information gathered at the edge of pixel. This is specific to Adaptive Subdivision sampler and can create problems when sampling a scene with high amount of details where knowing complete color information surrounding individual pixels would be more efficient.
|ADAPTIVE AMOUNT 0|
all reflection samples in material are taken for every eye ray that hits that floor
Maybe this doesn't sound so important, but it is, since it really helps to catch all the small details in the scene. Compared to DMC sampler, where initial samples are taken at the edge of the pixel, DMC sampler takes first samples at random points inside of each pixel, and if it decides to oversample one pixel it will not distribute samples based on regular grid like Adaptive Subdivision sampler, samples distribution in DMC will be more random without exactly defined pattern... although deterministic means it will follow some pattern but it will be based on low discrepancy numbers that has some form compared to QMC which was used in earliest version of Vray.
People are usually wondering what is the reason that DMC sampler can handle motion blur and DOF way faster than Subdiv sampler. The reason lies in the way DMC sampler controls and influences every single area of the scene where we need to do some oversampling (subdivs), and because of that you will cast lowest number of samples needed to get a clean pixel without oversampling some areas of the scene that won't influence the quality of the pixel in the end.
In technical terms this means that DMC sampler, based on maximum number of DMC samples set in DMC sampler rollout, will subdivide every single Subdivs value in scene (material, light, etc). This is not happening with subdivision sampler, and this is the main difference between these two samplers:
Let's repeat it again: if, for example, material X in the scene has glossy reflection and you set this to 40 subdiv, and light used in scene has smooth shadow that is using shadow subdiv of 10, by setting DMC max samples to 5, maximum number of glossy subdivs taken in that material (for one eye sample) will be 8 (40/5) and maximum number of subdivisions available for light shadow will be 2 subdivs. Remember, we are talking about number of sampler per every eye ray sent into the scene. But, if pixel that VRay is sampling needs more than 1 eye ray sample, and let's say we need maximum number of DMC samples which is 5 subdivs in this case (5x5=25 samples), it is still possible that VRay will use all 40 subdiv glossy reflection defined in that material, because for every eye ray sent into the pixel VRay will cast 8 subdivs (64 samples), and since it will cast Max 5 DMC subdiv samples (25 samples), 5x8 will make 40 reflection subdivs. Confusing?... maybe, it took me a couple of days to figure this out since it's not explained in Vray's documentation.
So now that we figured out how DMC subdivides every subdiv value in the scene, we can go over adaptiveness and how it's handled inside the scene subdiv values. This was straight forward in Adaptive subdivision sampler since that sampler didn't influence (divide) values around the scene.
Because of the way DMC works and how it subdivides every value in the scene that needs multisampling, adaptiveness options will play some role if you keep DMC Max samples really low. If you keep DMC Max Subdivs to 1 you will get same effect as with Subdivision sampler in terms of how much secondary samples will be cast for reflection, refraction, area shadows etc. But, since the nature of DMC algorithm, by raising Max DMC setting really high, let's say 50, adaptiveness will not play any role after some point and you can just forget about it. The reason for that is that if you set Max DMC to 50 (for example), Vray will subdivide every subdiv value in the scene to 1, which means for every ray sample sent to the scene you will be sending only 1 glossy sample for reflection, 1 for area light, motion blur etc. The reason why Vray is doing that is that it knows that it can cast 50 subdivs eye samples, which is around 2500 eye samples in the scene and it still can get nice glossy reflections coming from material even if for every eye ray it's casting only 1 sample for glossy reflection.
The reason why this is useful is that in the scenes with 3D DOF, Motion Blur, a lot of glossy reflections etc... Vray will try to cast minimum number of samples needed to get a clean result. In these kinds of situations it's best to keep DMC values really high... and if needed, you can always go into the scene materials and tweak those individually where needed. Usually, when object is in motion and is blurred you don't need to cast so many reflection samples in its material because everything is gonna be smeared in the end. Subdivision sampler doesn't know this and will try to cast high number of samples for every eye sample, even if that glossy reflection color doesn't play big influence in final result. Next example is one simple case where I used Adaptive subdivision sampler and DMC sampler and you can clearly see how DMC sampler outperforms Adaptive Subdivision.
The biggest flaw of DMC is that it can be really confusing and counter intuitive to setup. Sometimes in scenes with a lot of details, many lights, motion blur and DOF it's good to keep DMC settings really high like Min 1 Max 50 because having Max DMC set to low value like 4 can increase render time drastically. Let's go over few practical examples.
EXAMPLE 01: Hair
Hair can be a big problem to sample. It has huge amount of small details and most of the raytracers can't handle sampling of hair in efficient and fast way. Adaptive subdivision samples performs worse in these cases, it just can't decide where it needs to place more samples. DMC on other hand performs quite good, it can sample hair really fast and without artifacts that you get with Adaptive subdivision sampler (broken hair strings, flickering). Given same time frame DMC will outperform Adaptive Subdivision sampler, which is clearly visible in next image. Settings that I used were for DMC Min 1 Max 50 Color threshold 0.02, for Adaptive Subdivision Min 0 Max 2 Color Threshold 0.5. I use really high Threshold value for Adaptive Subdivision because when I used 0.1 or 0.05 which is what should be used for animation, Adap Sub estimated render time went to about 20 minutes.
Now we are left with the question of what settings should you use for Hair. I usually put DMC Minimum samples to 1 or 2, and Maximum to 50. If you have some problems detecting small details in animation, setting Min to 2 will probably fix that. Color threshold can be pretty low like 0.02 or 0.005. Forget about DMC sampler options in Setting tab because Adaptiveness are basically ignored because Max DMC was set to 50 which subdivided almost every subdivs value in scene to 1... which means for every eye ray, VRay will cast only 1 sample to calculate area shadows, 1 for glossy reflection etc. In this case this works great since you know that because of complexity of hair number of eye rays needs to be really high (sometimes more than 100-300).
As you see 3rd image works best. Everything looks smooth and I can assure you that you won't see a lot of flickering, even in animation. When working at Blur I usually setup our passes in the way that I render hair as separate pass with Min 1 and Max 50 samples with rest of geometry set as matte (VRay properties) and then I composite hair in postprocessing, because there is no point of using DMC Max 50 for the rest of the scene (in most of the cases).
EXAMPLE 02: Flat surfaces, glossy reflections
Funny thing is that in some other situations having DMC set to 4 can lead to a cleaner image in less time. This is true for images where you have flat surfaces with some glossy reflections and not so many details, so you are more concentrated on sampling materials than sampling geometry:
Let's see what's going on with the sampler and how when changing DMC Max from 5 to 50 you will see more eye samples cast into the scene.
Strange, isn't it? First image where DMC sampler Max is set to 5 has just a fraction of the samples compared to DMC Max 50. Remember when I was explaining how DMC Max subdivides every glossy value in the scene. Well, this is exactly what's happening over here. For glossy reflection in material I set Subdiv value to 50, which means, in 1st case where DMC Max is set to 5 for every eye ray that hits that glossy floor it will cast maximum 100 (10 subdivs) reflection samples, but when DMC is set to 50 it will cast only 1 sample. Which means, for DMC set to 50 VRay won't be able to get clean reflection with few eye ray samples so it needs to send more eye samples to the pixels even if we don't need more eye ray samples since some areas are just flat surfaces with reflection.
Second row uses DMC Max 50 but I was tweaking reflection subdivs in material for floor and walls... you can clearly see how by changing Refl Subdiv you take load of DMC sampler (eye rays)... so, in situations like these don't be scared to bump up Refl Subdiv to 300 because when subdivided by DMC Max 50 you will get only 6 subdivs per one eye ray, and this can actually speed up your render and you'll get a smoother reflection.
EXAMPLE 03: Subpixel mapping (V-Ray: Color mapping tab)
Most of the times I'm using subpixel mapping to render my scenes and animations. If you are doing still images you can turn this option off if you want to achieve the most realistic result, but in animation where you are using in camera 3D motion blur and DOF, it will be wise to turn it on because your render time will go down and you will need far less samples to clean up DOF or 3D motion blur. Difference between using subpixel mapping and not using it is that with subpixel on, every eye sample that render takes, when sampling pixel, will be tonemapped first and then averaged with next samples if VRay is oversampling that pixel. When subpixel is off all the samples will be taken and averaged first and then when you get final pixel color VRay will apply tonemaping. This process is shown in next image.
In practice it looks like this:
This is the reason why this difference is happening: when DMC is set to one, VRay will send one eye ray through pixel, it will hit that reflective floor and it will take 30 glossy samples for reflection... reflection samples are averaged together, they are merged with diffuse value of surface and tonemapped. Because VRay used those 30 glossy reflections in one reflection calculation we are keeping brightness the same as with subpixel mapping off. Compared to example where I set DMC to 50, which means glossy reflection subdiv will be degraded to 1 sample per eye ray sent through that pixel after which reflection sample is averaged with diffuse component and combined into sample and tonemapped. Because I was using Max DMC of 50, VRay will send a lot more eye rays into the scene to clean up that glossy reflection since for every eye ray sample it will get only couple reflection samples.
This can be compensated by going into material that's loosing its initial color and using higher number of glossy reflection samples. In my case if I had DMC set to 50 I can set reflection subdivs in material to something like 500, which means (remember that table?) that for every eye ray VRay will cast 10 reflection subdiv samples into the scene. This will keep reflection as bright as it was with subpixel mapping off but you will get all the benefits of having subpixel mapping on.
EXAMPLE 04: 10+ AREA LIGHS IN SCENE
For scenes with huge number of area lights, using DMC can help a lot especially if you are using motion blur and DOF in camera. Next two images show this, I'm using about 100 area lights and you can see how DMC sampler outperforms Adaptive Subdivision sampler. Amount of noise in the images is almost the same, some areas in DMC are cleaner some more noisier than with AS sampler, but then keep in mind that I used Max 50 samples for DMC sampler which is quite high. Turning Lightcache on for Glossy Reflection in scenes with so many lights can help a lot, so keep that in mind when rendering these types of scenes.
EXAMPLE 05: IRRADIANCE GI QUALITY IS CONTROLED BY DMC SETUP
One thing to remember when trying to eliminate noise or flickering in Irradiance Map is that IR Map is also controlled by DMC Sampler parameters in Settings tab.
The problem usually comes when Adaptive amount is set to 1 and, I assume, IR map is not casting so many initial fixed number of GI samples... so it won't be able to decide efficently if it needs to cast more rays or not. This can be compensated by lowering adaptive amount to some lower value than 1, which in second image is set to 0.5 and you can clearly see the difference in GI, or it can be fixed by raising Min samples to high value like 128.
Hopefully everything I wrote was easy to figure out although it get's confusing sometimes. I saw people confused about DMC sampler because of its unified core, and going back to subdiv sampler because it was more predictable, but believe me once you figure out the power of DMC sampler you will want to stay in that mode of thinking because you'll have complete control of your render engine sampling algorithm and you will be able to bring all the power of unified core to get faster render times and cleaner results. Happy rendering!
More of TOni's HERE.