Best V-Ray Settings – DMC Sampler
Hello, all V-Ray users!
In the previous tutorial from the Best V-Ray settings series, we chose the best engines for calculating GI in V-Ray for rendering our scenes. It is time to get acquainted with the V-Ray’s system settings responsible for the speed and quality of the rendering process.
This tutorial answers the following questions:
- What is adoptability of V-Ray and what are its advantages?
- What is the V-Ray DMC Sampler?
- How does the DMC Sampler work?
- What is the actual number of samples for blurry effects calculation in V-Ray?
- How to setup DMC Sampler?
- What is the difference between the noise threshold and adaptive amount parameters?
- What effects are influenced by global subdivs multiplier?
- How to control the quality of rendering in V-Ray?
- How to speed up V-Ray rendering?
- How to setup V-Ray draft render?
Global V-Ray Quality and Speed Settings
All rendering artists eventually have to deal with the settings of the rendering engine. The first thing everyone wants to know is how to set up the most beautiful rendering to be generated as quickly as possible. Ironically, after the first trial setups, all come to the conclusion that “there is no such thing as a free lunch.” :)
To put it concretely, clear, beautiful images are possible only at fairly high rendering settings. Fortunately, there are tradeoffs while working with V-Ray. After all, we measure the quality of each rendering by eye and taste, not by some absolute scale. The exact situation of each rendering is also important here. For example, sometimes noise will be unimportant, and other times the appropriate look should be cinematic.
The main issue is whether we really need to waste hours locally reconfiguring each material, the light source in the scene, and the GI rendering algorithms to affect slightly (and sometimes not slightly) the rendering speed.
Being a modern and flexible program, V-Ray's renderer has special tools that make it easy to control the global quality of rendering. In particular, we can use them to control the accuracy and speed of the rendering of blurry effects, which require very large computational resources. We can adjust the adaptability of the calculations, the main feature of V-Ray. These blurry effects, from glossy reflections to soft shadows from light sources, are vital for the photorealism of rendered images. The adaptive algorithm for the calculation of these effects is called the DMC Sampler. This tutorial deals with the DMC Sampler and its setup.
DMC Sampler Features
Many people understandably try to crack the mystery of the DMC Sampler. The "DMC" abbreviation alone can confuse many rendering artists, especially novices, because of the involuntary association with something very complex and incomprehensible.
The DMC Sampler is nonetheless a very important tool in the arsenal of any experienced 3D rendering artist, from both practical and theoretical points of view. Despite its apparent complexity during first acquaintance, it is quite logical and unmysterious.
Most of the calculations carried out by V-Ray are based on a special algorithm, Monte Carlo, which is used for the simulation of mathematical and physical systems in science. The essence of the Monte Carlo algorithm is that it performs repeated random sampling to determine the final result. V-Ray uses a modified algorithm, the Deterministic Monte Carlo (DMC) sampling. The DMC, in contrast to the classic Monte Carlo, makes not random, but deterministic sampling, which allows us to obtain results that do not change from render to render. In practice, DMC lets us to load the scene, render an image, close it, open it again, run the rendering, and get the exact same image.
The DMC Sampler embodies the main feature of V-Ray, its ability to adapt to the conditions of a particular scene. It is based on the principle of determining the insignificant areas on the final image and reducing the accuracy of their calculation.
Backbone of V-Ray Adoptability
Rendering of blurry effects by the DMC Sampler involves several key factors:
- Original number of samples, set for any aforesaid effect
- Importance of this exact effect in a particular image area
- Degree of algorithm adaptability
- Allowable samples difference threshold
Based on these core issues and two additional factors, the DMC Sampler decides how many samples are enough to render a particular effect.
From this, it follows that a number of samples established by the Subdivs parameter for any particular effect will not necessarily be the exact number of samples used in rendering. For ease of understanding, we can consider the set number of samples for any blurry effect only as an "order" of samples number. If we tune some material, such as VRayMtl, and set 25 Subdivs for reflection glossiness, then we can think that we have ordered 252, or 625, samples for the calculation of this effect. However, V-Ray can reduce this number during rendering. To learn why and how this happens, read further.
When rendering, the special algorithm comes into action and takes into account the different conditions. It estimates the degree of importance of the image area by itself. If this algorithm considers any zone of render unimportant, it automatically reduces the set number of samples for this zone effects calculation. It takes into consideration such parameters as material color, strength of the blurry effect, illumination of the object, and distance from the light source. This is the adaptability backbone of the V-Ray DMC Sampler. Despite the fact that it is a self-reliant and powerful algorithm, the settings of the DMC Sampler allow us to contain it.
Controlling the DMC Sampler
Controls of the DMC Sampler are in the V-Ray:: DMC Sampler rollout, which is in the Settings tab of the Render Scene (F10) window.
Screenshot of a rollout V-Ray:: DMC Sampler of a System tab in the Render scene window of main 3ds Max rendering options. Here present six numeric parameters: Adaptive amount, Noise threshhold, Min samples and global subdivs multiplier; One checkbox Time independent; and one drop-down list Path sampler.
The adaptive amount is the first parameter that controls the work of an adaptive algorithm. It determines the degree of adaptive sampling techniques to be applied. This parameter is crucial in determining the initial maximum number of samples sufficient to render effects. In our example, the adaptive amount is the degree of "trust" in the self-reliant adaptability algorithm. In other words, the value set here determines how much we trust the automatic determination of zones of little importance and thus serves as an automatic samples reduction. By setting the value of 1 (one), we tell the sampler that we have full confidence in its determination of unimportant areas and that it has the right to reduce the number of ordered samples to the extent it sees sufficient. A value of 0 (zero) indicates that we do not trust this function of the sampler, and therefore zero equals a total absence of adaptability. Intermediate values allow us to choose a mean, allowing the sufficient adaptability with a significant savings of computational resources while allowing us to get rid of the inevitable inaccuracies inherent in almost any automation. In the optimal V-Ray configuration, the default value of the adaptive amount equal to 0.85 should be left unchanged.
Let us continue to follow our example of set 625 samples to reflection glossiness. Suppose, based on the importance of the zone where this effect takes place and the degree of our trust in the adaptive algorithm, the DMC Sampler considered the ordered 625 samples excessive under these exact conditions, and so reduced the maximum. At this stage of our calculation of the blurry effect, we are left with a maximum of 500 samples.
Noise threshold is the second key factor that controls the behavior of the rendering engine. This parameter specifies when to use the so-called early termination technique. In other words, the noise threshold determines when to stop the repeating samples calculating. As the previous adaptive amount option predetermines the maximum number of samples required for a satisfactory rendering, the noise threshold decides during calculating each new sample when it already has enough samples. It is important to note that the noise threshold works according to factual data. It examines the dynamics of change in the results with each new sample. If, for example, the 145th sample of the previously defined 500 has not made sufficient changes in the effect’s resulting value, the DMC Sampler believes that further "clarification" is unreasonable and stops rendering, despite having the 500 samples set as the maximum. So here is one more way to save computing time.
We specify the noise threshold in relative units. The higher the noise threshold value, the more severe will be the difference considered as the basis for early termination of calculation, and, consequently, fewer samples will be used for rendering blurry effects. A high noise threshold value will appear as noise in the rendering, regardless of the importance of its zones. Conversely, a low noise threshold value will allow the DMC Sampler to start early termination only when the newly received "clarification" is quite insignificant. The default value of noise threshold, equal to 0.01, is the value recommended for use in the Best V-Ray settings.
Therefore, after the entrusted estimation of importance and the early termination technique do their work, our effect was calculated using only 145 samples instead of 625.
The adaptive amount and noise threshold, along with the originally set Subdivs parameter to a blurry effect, allow us to control the adaptability and hence the speed and quality of rendering. In addition to these parameters, the DMC Sampler contains a few extra settings that allow us to control its work further.
Additional DMC Sampler Parameters
A number of next parameters of the V-Ray:: DMC Sampler rollout are not that important in everyday practice, but can have a significant impact on the quality and rendering speed configuration in some situations.
The min samples parameter sets the minimum number of samples for each blurry effect in the scene. This parameter tells the renderer that, regardless of the circumstances, it does not have permission to allocate the number of samples below this minimum. It does not matter how many samples the adaptive DMC Sampler assesses for any effect or if the noise threshold were reached. The effect will be rendered with the minimum of samples specified in this parameter. For the optimal V-Ray settings, the min samples value of 8 samples is sufficient if the DMC Sampler tends to use few samples to cut down the time.
The global subdivs multiplier is the parameter globally affecting the Subdivs in the scene. This option is literally a global Subdivs factor. If you set the value of the global subdivs multiplier to 2, the locally installed 25 Subdivs for reflection glossiness in our example material will be 25 × 2 = 50 Subdivs during the rendering.
This is the simplest and most intuitive option of the V-Ray:: DMC Sampler rollout, but it can cause confusion because, despite its global name, not all Subdivs obey it.
The global subdivs multiplier is a multiplier for the following blurry effects:
- Glossy reflections/refractions
- Irradiance map
- Brute force
- Area lights
- Area shadows
- Motion blur
However, because of the use of independent algorithms of adaptability or its principle impossibility, the global subdivs multiplier does not affect the Subdivs parameters in such algorithms as:
- Light Cache
- Photon map
Remember, in the universal V-Ray settings, the global subdivs multiplier factor must be equal to 1 (one).
The time independent parameter is useful for animation rendering. Essentially, it enables rigorous, independent from the camera position, deterministic sampling that allows us to have constant noise from frame to frame. This saves the animation from the effects of flicker. This setting does not significantly affect the performance of the renderer. In the Best V-Ray settings, the time independent parameter should be kept activated.
The final configuration of the V-Ray:: DMC Sampler rollout is the dropdown list path sampler, in which V-Ray gives us a selection of the samples generation method: Legacy, Latin super cube, and Schlick sampling. These methods have their own mathematical properties in obtaining samples. We do not need to go deeply into these without the necessity. By default, the Schlick sampling is best, and it should be used in universal V-Ray settings.
Practical Control of Speed and Quality of V-Ray Rendering
Once we have reviewed all the settings of the V-Ray:: DMC Sampler, we can return to our main subject of how to adjust the speed and rendering quality globally by using the DMC Sampler tools.
Simply put, the default values are sufficient for photo-realistic rendering. In this case, the quality and realism of the generated images is rather determined by local scene setups, such as lighting, materials, and composition.
One rarely needs to raise the DMC Sampler settings and reduce its adaptability. Sometimes it is useful to raise the global subdivs multiplier because it is easier than spin-up Subdivs at each light source or the material of the scene. This is especially true if the scene is large.
The test rendering can be discussed separately. When creating thumbnails and draft renderings, the DMC Sampler settings are indispensable. In such cases, the final thing that concerns the rendering artist is the quality of the generated image. The first aspect of this is just the speed. We can reasonably consider decreasing each local setting for test rendering a waste of working time. It is much easier just to use the four DMC Sampler parameters to make the normally configured scene suitable for testing.
As you may assume, for a test render it is enough to raise the adoptability value adaptive amount and threshold of early sampling termination noise threshold, and lower the min samples together with a global subdivs multiplier.
Without doubt, this will worsen the quality of the visualization to a test-only level, but it also significantly speeds up the rendering process.
In this tutorial, we learned the principle of the adaptive DMC Sampler, the way the renderer saves computational resources on rendering unimportant areas of the image, and how to manage the rendering quality and time easily.
We sincerely hope that, after reading this tutorial, you are much closer to understanding the essence of V-Ray adoptability. We also hope that all important aspects of global quality and speed settings are clear. Understanding the key settings of the V-Ray:: DMC Sampler rollout allows even novice rendering artists to take precise control over the speed of rendering.
This tutorial helps you save time. In the next tutorial, we will show how to prevent frustration and save money by avoiding the RAM lack issue by V-Ray settings alone. Of course, we are talking about the settings of V-Ray:: System rollout, raycasting, and acceleration data structure.
Everyone, have fast and beautiful renderings!
The tutorial is written and prepared by:
Anton (RenderStuff)3d rendering artist at Ren3d with more than eight years of experience in photorealistic 3d rendering. Author of all RenderStuff rendering tutorials and much of the CG images on this site.
Your questions and suggestions regarding this tutorial feel free to write in comments below.