This page provides information about adaptive sampling as implemented by V-Ray.

**Overview**

V-Ray uses Deterministic Monte Carlo (DMC) — a variant of Monte Carlo sampling (MC) method for evaluating "blurry" values (anitaliasing, depth of field, indirect illumination, area lights, glossy reflections/refractions, translucency, motion blur, etc.).

The actual number of samples for the DMC sampler's blurry values are determined by these factors:

- The importance of the value – dark glossy reflections can do with fewer samples than bright ones; distant area lights require fewer samples than closer ones, etc. Basing the number of samples allocated for a value on importance is called
*importance sampling*. - The variance ("noise") of the samples for a particular value - fewer samples are required if the samples are not very different from each other. This works by looking at the samples as they are computed one by one and deciding, after each new sample, if more samples are required. This technique is called
*early termination*or*adaptive sampling*. - Historically, the subdivs value for a particular blurry effect was also used to determine the number of samples. Subdivs are automatically configured by V-Ray since version 5.

Deterministic Monte Carlo sampling uses a pre-defined set of random samples, which allows producing the exact same result when re-rendering an image. The difference with pure Monte Carlo sampling is that Monte Carlo uses pseudo-random numbers which are different for every evaluation and so re-rendering a single image will always produce slightly different results in the noise. By default, the Deterministic Monte Carlo method used by V-Ray is a modification of Schlick sampling, introduced by Christophe Schlick.

V-Ray is an adaptive sampling engine. This means that whenever V-Ray needs to compute a value, like the color of a pixel, or the light reflected from a surface, V-Ray will take a varying number of samples for that value, depending on the context. The adaptive algorithm that V-Ray uses is very straightforward: for any effect that requires several samples, V-Ray first computes a small amount of samples, and then, if the variance of the samples is too big, it continues to take more samples until the result is good enough.

The samples that V-Ray needs to compute can be broadly classified as image samples and shading samples. Image samples are those directly related to pixel values that compose the final image, including depth of field and motion blur effects. Shading samples are those taken to compute effects like glossy reflections, global illumination, area lights, etc. V-Ray employs adaptive sampling in both of these cases. The picture below shows one possible way that a light or a material may be sampled within a given pixel.

For each value that must be sampled adaptively, there is a certain **minimum number of samples** that V-Ray always computes, a **maximum number of samples**, and a **noise threshold** that controls how many samples between the minimum and the maximum would be actually computed. The minimum number of samples are needed because, like every adaptive algorithm, V-Ray's DMC sampler needs to gather a bit of information about the particular value that is being sampled before it can make any assumptions about it.

For image sampling, the three values - minimum samples, maximum samples and noise threshold - are directly specified by the user. The **VRaySampleRate** render element can show how many samples were actually performed, as percentage of the maximum. V-Ray then automatically determines the best number of shading samples to take for each blurry effect like glossy reflections, area lights, GI. The user is not required to specify any additional value**s ^{1}**. Internally, V-Ray uses global values for an adaptive threshold, adaptive amount and a minimum number of samples

**for the DMC sampler. Once the minimum number of samples are taken, the DMC sampler continues taking more samples either until the noise threshold is reached, or the maximum number of samples are taken.**

^{2}

**Notes**

**1** – Automated shading sampling was introduced with V-Ray 5. However, VRayDirt and VRayCurvature have their own Subdivs parameters which work independently from the Adaptive sampling settings.

**2** – These parameters are hidden in V-Ray 5. The most optimal values for them are set by default and they do not need to be changed in the majority of setups.

**References**

More information on deterministic Monte Carlo sampling for computer graphics can be found from the sources listed below.

- C. Schlick, An Adaptive Sampling Technique for Multidimensional Integration by Ray Tracing, in Second Eurographics Workshop on Rendering (Spain), 1991, pp. 48-56
*Describes deterministic MC sampling for antialiasing, motion blur, depth of field, area light sampling and glossy reflections.* - K. Chiu, P. Shirley and C. Wang, Multi-Jittered Sampling, in Graphics Gems IV, 1994
*Describes a combination of jittered and N-rooks sampling for the purposes of computer graphics.* - Masaki Aono and Ryutarou Ohbuchi, Quasi-Monte Carlo Rendering with Adaptive Sampling, IBM Tokyo Research Laboratory Technical Report RT0167, November 25, 1996, pp.1-5

An online version can be found at

http://www.kki.yamanashi.ac.jp/~ohbuchi/online_pubs/eg96_html/eg96.htm*Describes an application of low discrepancy sequences to area light sampling and the global illumination problem.* - M. Fajardo, Monte Carlo Raytracing in Action, in State of the Art in Monte Carlo Ray Tracing for Realistic Image Synthesis, SIGGRAPH 2001 Course 21, pp. 151-162;

An online version can be found at

http://cseweb.ucsd.edu/~viscomp/classes/cse274/wi18/readings/course29sig01.pdf*Describes the ARNOLD renderer employing randomized quasi-Monte Carlo sampling using low discrepancy sequences for pixel sampling, global illumination, area light sampling, motion blur, depth of field, etc.* - E. Veach, December, Robust Monte Carlo Methods for Light Transport Simulation, Ph. D. dissertation for Stanford University, 1997, pp. 58-65

An online version can be found at http://graphics.stanford.edu/papers/veach_thesis/*Includes a description of low discrepancy sequences, quasi-Monte Carlo sampling and its application to solving the global illumination problem.* - L. Szirmay-Kalos, Importance Driven Quasi-Monte Carlo Walk Solution of the Rendering Equation, Winter School of Computer Graphics Conf., 1998

An online version can be found at https://www.sciencedirect.com/science/article/abs/pii/S0097849399000308 (This page is no longer available)*Describes a two-pass method for solving the global illumination problem employing quasi-Monte Carlo sampling, as well as importance sampling using low discrepancy sequences.*