Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides information on the Anti-Aliasing options in the Sampler tab of the V-Ray Renderer.

 


Overview

...

Section
Column
width50%

In V-Ray, an image sampler refers 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. This calculation might seem straightforward, but But within a single pixel there might be multiple colors, which may come from various objects or parts of a detailed texturemultiple objects whose edges intersect at the same pixel, or even different brightnesses difference in brightness on the same object due to changes in object shape or falloff and/or shadowing of light sources. The differences between these colors might be subtle or abrupt. If a pixel consists of multiple colors at the sub-pixel level, some work has to be done to determine the best color for that particular pixel in the rendered image.

To determine the right color for such a To determine the best color for an individual pixel, V-Ray can look looks at (or sample) colors from or samples) colors from different parts of the pixel , and even itself as well as the pixels around it. This process is called called image sampling. V-Ray offers includes two main sampling types for renders: Progressive sampling and Bucket samplingimage samplers, each with its own approach to sampling and its own parameters: Progressive and Bucket.

 
Column
width5%


Column
width45%

Image Added Image Removed
Image courtesy of Tuna Unalan

 


Multiple colors within a single pixel. What color should the pixel be? 

 

UI Path

||V-Ray Shelf|| > ROP Parm > Renderer tab > Sampler tab

||out Network|| > V-Ray > V-Ray Renderer > Renderer tab > Sampler tab

V-Ray menu > Render Settings > Sampler tab

 

...



...


What is Anti-Aliasing?


One of the functions of image sampling is anti-aliasing, which is the reduction of jagged

...

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. The left images are jagged around the edges of the sphere, while the right are smooth. 

Here we have an example of a gray sphere against a blue background. If only one sample is taken for the each of the pixels around the edge of the sphere, the choice of pixel color is limited to the dark gray at the edge of the sphereobject, or the blue (white) background. Using one of these colors (iei.e. taking only one sample) makes the image look jagged around the perimeter of the sphere. This . 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 sphere object end up being a color in between the dark gray of the sphere and the blue background. These in-between colors make the sphere object appear smoother in the final rendering.

 


Section
 
Column
width10%
20%


Column
width40%60%
Before after
afterLabel24
darktrue
beforeLabel1
Panel

Image Added

Panel

Image Added

Image Removed
No anti-aliasing (1 sample or subdiv per pixel)

 

Image Removed
Column
width40%
20%


Anti-Aliasing

...

aliasing on (minimum of -1 and maximum of 2 samples per pixel) 
Section
Column
width10%50%

 

Section
Column
width10%

 

Column
width40%

Image Removed
No anti-aliasing (1 sample or subdiv per pixel)

 

Column
width40%

Image Removed
Anti-aliasing on (minimum of -1 and maximum of 2 samples per pixel)

 

Column
width10%

 

Anti-Aliasing

This section covers common parameters for all sampler types. For parameters that are specific to each sampler, see the following sampler sections below.

Type – Specifies the image sampler type. Specific parameters for the selected type appear at the bottom of this rollout.

Progressive – Progressively samples the entire image. See the Progressive Sampler for additional parameters.
Bucket – Takes a variable number of samples per pixel depending on the difference in the intensity of the pixels. See the Bucket Sampler section for additional parameters. 

Min. Shading Rate – Controls the number of rays shot for AA versus rays for other effects like glossy reflections, GI, area shadows, etc. Higher values mean that less time is spent on AA and more effort is put in the sampling of shading effects.

Render Mask – Enables the render mask feature. The render mask allows you to define which pixels of the image are calculated. The rest of the pixels are left intact. This feature works best with the V-Ray frame buffer and the Bucket image sampler. The following types are available:

Disable – The render mask is not used.
Texture – Uses a black & white texture to limit rendering to the white areas of the texture only. You can also use animated texture sequences by specifying an Image File VOP using the op: synthax (e.g. /mat/imageFile). Note that the Type of Image File VOP's UV must be set to Environment, and the Mapping Type to Screen
Object – Only the specified objects are rendered.
Object ID – Only objects with the specified object IDs are rendered. You can list more than one object ID as a space-separated list. To add IDs to the Geometry nodes, add V-Ray Object Properties using the V-Ray menu.

For more information, see the Render Mask example below.

Clear Mask on Render Stat – Available when the Render Mask is enabled. When disabled, the masked region is overlaid on top of the previous image in the VFB. This can be used for draft renders or fast shader previews provided that the camera does not move. Note: When rendering an animation, the image clearing is forced on

Section
Column
width50%

This section covers common parameters for all sampler types. For parameters that are specific to each sampler, see the following sampler sections below.

Type – Specifies the image sampler type. Specific parameters for the selected type appear at the bottom of this rollout.

Progressive – Progressively samples the entire image. See the Progressive Sampler for additional parameters.
Bucket – Takes a variable number of samples per pixel depending on the difference in the intensity of the pixels.

Min Shading Rate – Controls the number of primary rays shot for AA (anti-aliasing) versus secondary rays for other effects like glossy reflections, GI, area shadows, etc. Higher values mean that less time is spent on AA, and more effort is put in the sampling of shading effects. This approach is especially useful with the Progressive image sampler. Note: Not available when using a GPU-based Production engine.

Render Mask – Enables the render mask feature. The render mask allows you to define which pixels of the image are calculated. The rest of the pixels are left intact. This feature works best with the V-Ray frame buffer and the Bucket image sampler. The following types are available:

Disable – The render mask is not used
Object ID – Only objects with specified Object IDs are rendered, you can list more than one by using commas to separate them.

For more information, see the Render Mask example below.

Object IDs – Specifies a list of object IDs to be used for the render mask, when the Render mask is set to Object ID.

AA Filter Type – Specifies the filter type to be used for anti-aliasing. V-Ray supplies eight types of Anti-aliasing filters: Box, Area, Triangle, Lanczos, Sinc, Catmull-Rom, Gaussian and Cook Variable. Each has advantages and disadvantages, which make them useful for different tasks. For more information, see the Anti-aliasing Filters example and the Anti-aliasing Filters and Moire Effects example below.

Filter Size – Determines the size of the filter in pixels. Higher values yield blurrier results.  For For more information, see the Anti-aliasing Filters example and the Anti-aliasing Filters and Moire Effects example below.

Column
width5%

 


Column
width45%

Image Removed

...

Image Added


Anchor
antialiasingFilters
antialiasingFilters

...


...


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 is not the same as rendering without a filter and then blurring 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%. 


Section
Column
width25%

 


Column
width50%
Image slider
Panel
borderStylenone

Filtering is off

Panel
borderStylenone

Lanczos filter, size 2.5

Panel
borderStylenone

Triangle filter

Panel
borderStylenone

Sinc filter, size 2.5

Panel
borderStylenone

Box filter, size 2.5

Panel
borderStylenone

Area filter, size 2.5

Panel
borderStylenone

Catmull-Rom filter

Panel
borderStylenone

Cook Variable filter, size 2.5

Panel
borderStylenone

Caussian filter, size 2.5

Drag the slider to change the filter type.

 
Column
width25%

 



Anchor
moireEffects
moireEffects

 

...


ExampleExample: Anti-aliasing Filters and Moire Effects

...

The scene is very simple: 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 to the pixel values. Note that the image looks quite different depending on the filter:

Section
 
Column
width25%


Column
width50%
Image slider
Panel
borderStylenone

No Filter

Panel
borderStylenone

Box filter

Panel
borderStylenone

Area filter, size 1.5

Panel
borderStylenone

Area filter, size 4.0

Panel
borderStylenone

Triangle filter, size 1.5

Panel
borderStylenone

Lanczos filter

Panel
borderStylenone

Catmull-Rom filter

Panel
borderStylenone

Gaussian filter, size 1.5

Panel
borderStylenone

Gaussian filter, size 6.0

Drag the slider to change the filter type.

 
Column
width25%


Anchor
renderMask
renderMask

 

...


Example: Render Mask

...


Section
 
Column
width10%
8%

Column
width40%

 Image Added

Image Removed The original image

 
Column
width
4%


Column
width40%

 Image Added

Image Removed The same image, only objects with chrome material were re-rendered

 

 
Column
width10%
8%



Section
 
Column
width10%
8%

Column
width40%

 Image Added

Image Removed The actual render mask image - RGB channels

 
Column
width4%


Column
width40%

 Image Added

Image Removed The actual render mask image - Alpha channel 

Column
width10%8%

 

 



Anchor
ProgressiveSampler
ProgressiveSampler

...

Section
Column
width50%

This section provides information specific to the Progressive Sampler Type. The Progressive sampler renders the entire image progressively in passes.

The advantage of this sampler is that you can see an image very quickly, and then let it refine for as long as necessary as additional passes are being computed. This is contrast to the bucket-based image samplers, where the image is not complete until the final bucket is done.

A disadvantage is that more data needs to be kept in memory, especially when working with render elements. Also, when using distributed rendering, because of the continuous refinement, frequent communication between the client machine and the render servers is required, which may reduce the CPU utilization on the render slavesservers. This effect can be controlled to some extent using the Ray bundle size parameter.

Min Subdivs – Controls the minimum number of samples that each pixel in the image receives. The actual number of the samples is the square of the subdivs. Note: Not available when using a GPU-based Production engine.

Max Subdivs – Controls the maximum number of samples that each pixel in the image receives. The actual number of the samples is the square of the subdivs. If zero, the number of samples is not limited.

Noise Threshold – The desired noise level in the image. If this is 0.0, the entire image is sampled uniformly until either the Max. subdivs value is reached or the Render time limit is reached.

Max. Render Time (min) – The maximum render time in minutes. When this number of minutes is reached, the renderer stops. This is the render time for the final pixels onlywhole frame; it does not include includes any GI prepasses like light cache, irradiance map, etc. If this is 0.0, the render is not limited in time.

Ray Bundle Size –  (CPU) – Useful for distributed rendering to control the size of the chunk of work that is handed to each machine. When using distributed rendering, higher values may help to utilize CPUs on the render servers better.

Ray Bundle Size –  (GPU) – Controls the number of samples to transfer over the network for RT-GPU. Available when using RTX rendering. 

Rays Per Pixel – Controls the number of samples per pixel for RT-GPU. Available when using GPU/RTX rendering.

UI Text Box
typenote

Avoid using the  Progressive  sampler the Progressive sampler with sharpening image filters (Catmull-Rom, Mitchell-Netravali) as this may slow down the rendering - additional image samples are required to resolve sharpening filters properly. V-Ray prints a warning in this case in the V-Ray messages window.

Column
width5%

 


Column
width45%

Image RemovedImage Added

 



...


Example: Stages of Rendering with the Progressive Sampler


Section
 
Column
width25%

Column
width50%
Image slider
minLabel1 pass
maxLabel256 passes
Panel
borderStylenone

Image after 1 pass

Panel
borderStylenone

Image after 16 passes

Panel
borderStylenone

Image after 64 passes

Panel
borderStylenone

Image after 256 passes

Column
width25%



Anchor
AdaptiveDMCSampler
AdaptiveDMCSampler
 
Anchor
AdaptiveDMCSamplerbucketAdaptiveDMCSampler
bucket

Bucket Sampler

...

Section
Column
width50%

This section covers information specific to the Bucket Sampler Type.

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 Procedural Fur for example) and/or blurry effects (DOF, motion blur, glossy reflections, etc.).

The diagram above shows visually the way V-Ray is placing 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.

Column
width5%

 


Column
width45%

 

 

 



Section
Column
width50%

Lock Subdivs – Sets a fixed number of samples taken for each pixel.

Min Subdivs – Determines the initial (minimum) number of samples taken for each pixel. You will rarely need to set this to more than 1, except if unless you have very thin lines that are not captured correctly, or fast moving objects if you use when using motion blur. The actual number of samples is the square of this number (e.g. 4 subdivs produce 16 samples per pixel).

Max Subdivs – Determines the maximum number of samples for a pixel. The actual maximum number of samples is the square of this number (e.g. 4 subdivs produces a maximum of 16 samples). Note that V-Ray may take less than the maximum number of samples, if the difference in intensity of the neighboring pixels is small enough.

Threshold – The threshold that is used to determine if a pixel needs more samples. For more information, see The Threshold Parameter example below.

Column
width5%

 

Column
width45%

Image Removed 

 

 

...

Example: The Threshold Parameter

 

This example deals with texture anti-aliasing and the effect of the color threshold for the Bucket sampler.

By default V-Ray anti-aliases everything in the image, including textures. This is especially useful for textures with small details or noisy bump maps. The Threshold parameter controls the extent to which texture anti-aliasing is performed. The effect of this parameter is most noticeable with low min rates. For the four images below, min/max rate of -3/2 was used:

Section
Column
width25%

 

Column
width50%
Image slider
minLabel0.1
maxLabel10
Panel
borderStylenone

Image Removed

Threshold 0.1

Panel
borderStylenone

Image Removed

Threshold 1.0

Panel
borderStylenone

Image Removed

Threshold 5.0

Panel
borderStylenone

Image Removed

Threshold 10.0

Column
width25%

 

Note that the edges of the object in those images are always sharp.

small enough.

Noise Threshold – The threshold that is used to determine if a pixel needs more samples.

Adaptivity Clamp – Specifies an intensity limit for the adaptive bucket to avoid excessive sampling of overexposed areas. Lower values mean a lower limit and potentially noisy overexposed areas. Higher values produce more samples in overexposed areas.

Firefly Removal – Removes fireflies from the render and optimizes the render times. Further, it removes the flickering effect in animations. Valid values are between 0 and 1. Larger values remove more fireflies but may start to remove details from the render. This option is available in Bucket Sampler type only.

Column
width5%


Column
width45%

Image Added

If you set the Threshold to a high value, you are effectively telling V-Ray not to anti-alias textures. You can use this fact to speed up the rendering of complex materials. Note however, that this disables anti-aliasing of V-Ray shadows, reflections etc as well.

...


Textures

...

Section
Column
width50%

This rollout is active only when rendering on GPU/RTX.

Resize Textures – Determines Textures – Determines how textures' resolution/size are handled to help optimize memory usage. The possible values are:

Full Size – Textures are loaded at their original size.
Resize – Adjusts the size of high-resolution textures to a smaller resolution to optimize render performance. The GPU engine loads as much texture tiles on the GPU as it can, then swaps the ones that are needed between GPU RAM and CPU RAMresolution textures to a smaller resolution to optimize render performance.
Mipmapping – Instead of loading all the texture files at their default resolution (original or resized), V-Ray loads the textures as needed and automatically create mip-map tiles for them (regardless of their texture type). As a result, the GPU memory consumption could be decreased; textures that are not visible are not loaded, and textures that are further away from the camera are loaded with a lower resolution. During the texture-detection process, V-Ray GPU renders slower. Once it detects that all textures are loaded, it switches automatically to the traditional, faster mode, and a message about modes changing displays in the V-Ray log. This option is only available in the Production Rendering Modeof their texture type). As a result, the GPU memory consumption could be decreased; textures that are not visible are not loaded, and textures that are further away from the camera are loaded with a lower resolution. During the texture-detection process, V-Ray GPU renders slower. Once it detects that all textures are loaded, it switches automatically to the traditional, faster mode, and a message about modes changing displays in the V-Ray log. This option is only available in the Production Rendering Mode.
Compressed – Textures are loaded with compression to decrease GPU memory consumption. This texture mode sacrifices some texture quality to make the texture smaller (roughly ~75% reduction in memory usage). As a result, you need much less memory for textures enabling renders of bigger scenes. Not all textures are compressed using this option and exceptions are made based on the bitmap usage:

Fancy Bullets
typecircle
    • If a bitmap is used for both normal/bump and color maps, as compression for normal maps is generally not good for color maps, and vice versa;
    • Bitmaps used for displacement;
    • Bitmaps used for lens effects.
UI Text Box
typenote

Compressed mode is supported on Windows and Linux only. On Apple devices the rendering will fallback to Full Size.

Size – When GPU Resize textures is enabled, this value specifies the resolution to which the textures are resized.

Format – Controls the file format of the material textures used in GPU rendering. The amount of bits per channel used to store the material texture information into memory. You can choose between 8 bit16 bit and 32 bit. This does not affect textures used for lights and displacement.

 
Column
width5%


Column
width45%

Image Removed

...

Image Added


Post Effects

...

Section
Column
width50%

Post Effect Rate Rate – The regularity of updates during the progressive rendering; roughly the percentage of the time effects like denoising and/or lens effects are allowed to take compared to the frame render time. Zero disables updates during the progressive rendering, while larger values cause the effects to be updated more frequently; 100 causes updates as often as possible. Values ranging from 5 to 10 are usually sufficient.

Column
width5%

 


Column
width45%

Image Removed 

...

Image Added

Anchor
Notes
Notes


Notes

...

Fancy Bullets
typecircle
  • A note on RAM usage: image samplers require substantial amount of RAM to store information about each bucket. Using large bucket sizes may take a lot of RAM.