This page provides information on the Image Sampler rollout in the Render Settings.
Overview
In V-Ray, an image sampler refers to an algorithm for calculating a pixel's color based on the colors within and around it.
Each pixel in a rendering can have only one color. To get the color of a pixel, V-Ray calculates it based on the object's material, direct light striking the object, and indirect lighting in the scene. But within a single pixel, there might be multiple colors, which may come from multiple objects whose edges intersect at the same pixel, or even differences in brightness on the same object due to changes in object shape or falloff and/or shadowing of light sources.
To determine the right color for such a pixel, V-Ray looks at (or samples) colors from different parts of the pixel itself as well as the pixels around it. This process is called image sampling. V-Ray includes two main image samplers, each with its own approach to sampling and its parameters: Progressive and Bucket.
Image courtesy of Tuna Unalan
Multiple colors within a single pixel. What color should the pixel be?
What is Anti-aliasing?
One of the functions of image sampling is anti-aliasing, which is the reduction of jagged edges in a rendering. The following example shows the basic difference between an image with anti-aliasing and one without.
If only one sample is taken for each pixel around the sphere's edge, the choice of pixel color is limited to the dark gray at the object's edge or the (white) background. Using one of these colors (i.e., taking only one sample) makes the image look jagged. This is the equivalent of no anti-aliasing at all.
If two or more samples are taken in each pixel, the colors are averaged, and pixels at the edge of the object end up being a color between the dark gray of the sphere and the background. These in-between colors make the object appear smoother in the final rendering.
Image Sampler
Example: Render Mask
Isolate Select Render Mask Video
The following short demonstration video helps explain how the new Isolate Select Render Mask type works.
Example: Anti-aliasing Filters
Here is an example briefly demonstrating the effect of different anti-aliasing filters on the final result.
Note that rendering with a particular filter differs from rendering without a filter and then blurs the image in a post-processing program like Adobe Photoshop. Filters are applied on a sub-pixel level over the individual sub-pixel samples. Therefore, applying the filter at render time produces a much more accurate and subtle result than applying it as a post-effect. The zoomed-in images below have been zoomed in and cropped 300%.
When the filtering is off, it internally applies a 1x1 pixel box filter.
The Catmull-Rom filter is an edge-enhancing filter often used for architectural visualizations. Note that edge enhancing can produce "moire" effects on detailed geometry.
Filtering is off.
Lanczos filter, size 2.5
Triangle filter
Box Filter, size 2.5
Area filter, size 2.5
Catmull-Rom
Cook Variable, size 2.5
Gaussian, size 2.5
Example: Anti-aliasing Filters and Moire Effects
This example demonstrates the effect anti-aliasing filters have on moire effects in your images. Sharpening filters may enhance moire effects, even if your image sampling rate is very high. Blurring filters reduce moire effects.
Note that moire effects are not necessarily a result of poor image sampling. Moire effects appear because the image is discretized into square pixels. As such, they are inherent to digital images. The effect can be reduced by using different anti-aliasing filters, but it is not entirely avoidable.
The scene is straightforward: a sphere with a very fine checker map applied. The images were rendered with a very high sampling rate (15 subdivs, or 225 rays/pixel). This is enough to produce quite an accurate approximation of the pixel values. Note that the image looks quite different depending on the filter:
Progressive Sampler
Unlike the bucket method, theProgressive sampler renders the entire image progressively in passes.
Example: Stages of Rendering with the Progressive Sampler
Bucket Sampler
This sampler makes a variable number of samples per pixel based on the difference in intensity between the pixel and its neighbors.
This is the preferred sampler for images with lots of small details (like VRayFur, for example) and/or blurry effects (DOF, motion blur, glossy reflections, etc).
The diagram above visually shows how V-Ray places samples when using the Bucket sampler. The black squares represent the pixels of the image, while the dots represent the individual samples. In the first pass V-Ray always places the minimum number of samples determined by the Min. subdivs parameter. Then, the color of the samples is compared, and more are added where needed in the following passes.
Notes
- A note on RAM usage: image samplers require a substantial amount of RAM to store information about each bucket. Using large bucket sizes may take a lot of RAM.