This page provides information about adaptive sampling as implemented by V-Ray.
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:
|
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 values1. Internally, V-Ray uses global values for an adaptive threshold, adaptive amount and a minimum number of samples2 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.
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.
More information on deterministic Monte Carlo sampling for computer graphics can be found from the sources listed below.
|