Wednesday, June 25, 2008

VRay Image Sampler (Antialiasing)





VRay Image Sampler (Antialiasing)

General

In VRay, an image sampler refers to an algorithm for sampling and filtering the image function, and producing the final array of pixels that constitute the rendered image.

VRay implements several algorithms for sampling an image. All image samplers support MAX's standard antialiasing filters, although at the cost of increased rendering time. You can choose between Fixed rate sampler, Adaptive QMC sampler and Adaptive subdivision sampler.

Parameters


Fixed rate sampler

This is the simplest image sampler, and it takes a fixed number of samples for each pixel.

Subdivs - adjusts number of samples per pixel. When this is set to 1, one sample at the center of each pixel is taken. If this is greater than 1, the samples are generated from a low-discrepancy quasi-Monte Carlo sequence.

Note that due to clamping of samples to the [black, white] range for the RGB color channel, sometimes this sampler can produce darker results when used with blurry effects. The solution in this case is to increase the subdivs for the blurry effect, or to use the Real RGB color channel.

Adaptive QMC sampler

This sampler makes a variable number of samples per pixel based on the difference in intensity between the pixel and its neighbors. Note that this sampler is very strongy tied to the VRay QMC sampler. The sampler doesn't have its own threshold control; instead you should use the Noise threshold parameter of the VRay QMC sampler to control quality.

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). It also takes up less RAM than the Adaptive subdivision sampler.

Note that due to clamping of samples to the [black, white] range for the RGB color channel, sometimes this sampler can produce darker results when used with blurry effects. The solution in this case is to increase the subdivs for the blurry effect, or to use the Real RGB color channel.

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 you have very thin lines that are not captured correctly.

Max subdivs - determines the maximum number of samples for a pixel.

Adaptive subdivision sampler

This is an advanced image sampler capable of undersampling (taking less than one sample per pixel). In the absence of blurry effects (direct GI, DOF, glossy reflection/reftaction etc) this is the best preferred image sampler in VRay. On average it takes fewer samples (and thus less time) to achieve the same image quality as the other image samplers. However, with detailed textures and/or blurry effects, it can be slower and produce worse results than the other two methods.

Also note that this sampler takes up more RAM than the other two samplers - see the Notes below.

Min. rate - controls minimum number of samples per pixel. A value of zero means one sample per pixel; -1 means one sample every two pixels; -2 means one sample every 4 pixels etc.

Max. rate - controls maximum number of samples per pixel; zero means one sample per pixel, 1 means four samples, 2 means eight samples etc.

Threshold - determines the sensitivity of the sampler to changes in pixel intensity. Lower values will produce better results, while higher values will be faster, but may leave some areas of similar intensity undersampled.

Rand - displaces the samples slightly to produce better antialiasing of nearly horizontal or vertical lines.

Object outline - this will cause the image sampler to always supersample object edges (regardless of whether they actually need to be supersampled). This option has no effect if DOF or motion blur is on.

Normals - this will supersample areas with sharply varying normals. This option has no effect if DOF or motion blur is on.

Antialiasing filter

This section allows you to choose an antialiasing filter. All standard 3dsmax filters are supported with the exception of the Plate Match filter. See the Examples section for more information on antialiasing filters.

Notes

  • Which sampler to use for a given scene? The answer is best found with experiments, but here are some tips:
    • For smooth scenes with only a few blurry effects and smooth textures, the Adaptive subdivision sampler with its ability to undersample the image is unbeatable.
    • For images with detailed textures or lots of geometry detail and only a few blurry effects, the Two-level sampler performs best. Also in the case of animations involving detailed textures, the Adaptive subdivision sampler might produce jittering which the Two-level sampler avoids.
    • For complex scenes with lots of blurry effects and/or detailed textures, the Fixed rate sampler performs best and is very predictable with regards to the quality and render time.
  • 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. This is especially true for the Adaptive subdivision sampler, which stores all individual sub-samples taken within a bucket. The Adaptive QMC sampler and the Fixed rate sampler on the other hand only store the summed result of all sub-samples for a pixel and so usually require less RAM.

No comments: