When V-Ray renders an image, it determines the color of each pixel to produce the image at the specified resolution. A literal, pixel-by-pixel interpretation of the objects and materials would not result in the best image; abrupt changes in color from one pixel to the next would result in jagged edges, and any lines smaller than one pixel wide would not be represented.
In order to resolve these issues, V-Ray looks at colors at the sub-pixel level and performs sampling on the colors. Sampling is a method of looking at colors within and around each pixel and using this information to determine the best color for each pixel. The goal is to color each pixel in such a way that the final image represents the scene as realistically as possible.
In V-Ray, an image sampler is an algorithm for sampling colors and producing the final array of pixels that constitute the rendered image. V-Ray includes two main image samplers, each with its own approach to sampling and its own parameters. The optimal choice of image sampler varies according to scene elements, the level of detail in textures, and many other factors. The best way to choose the right image sampler for a scene is to understand how they work, and their strengths and limitations.
- Progressive – Progressively samples the entire image and refines the details over time.
- Bucket – Takes a variable number of samples per pixel depending on the difference in the intensity of the pixels.
- Adaptive Subdivision – this sampler divides the image into an adaptive grid-like structure and refines depending on the difference in pixel intensity.
Min shading rate – Controls the number of rays shot for Anti-aliasing (AA) versus rays for other effects like glossy reflections, GI, area shadows, etc. This setting is especially useful with the Progressive image sampler. Higher values mean that less time will be spent on AA, and more effort will be put in the sampling of shading effects.
Divide Shading Subdivs – When enabled, for each image sample V-Ray divides the number of samples for lights, materials, etc. by the number of AA samples in order to achieve roughly the same quality and number of rays when changing AA settings. For example, if you have 4 AA subdivs (=16 image samples) and 8 light subdivs (=64 shadow rays), V-Ray will trace 4 (=64/16) shadow rays for each image sample. This also means that in order to sample a particular blurry effect with more than one sample, its subdivs must be increased above (sometimes far above) those of the image sampler. However, some users (especially those coming from other render engines) might find this automatic division inconvenient. When this option is disabled, the subdivs of lights, materials, etc. specify the number of subdivs for each image sample, thus allowing for more precise control of the sampling for these effects. With this option disabled, the above settings of 4 AA subdivs and 8 light subdivs will trace up to 1024 (=16*64) shadow rays, although V-Ray will still try to reduce that amount depending on the DMC Sampler settings.The Min. shading rate parameter continues to be valid for convenience.
Use Local Subdivs – determines number of samples per pixel.
Render mask – Enables the use of a render mask to determine 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 as the render window and Type set to Bucket .
- Disabled – A render mask is not used.
- Texture – Render mask is a texture. Black values in the map define pixels which are not rendered. Pixels with any other values are rendered. The texture should use the screen mapping type.
- Objects – Renders only objects.
- Object IDs – Renders only objects with specified Object IDs. Separate Object IDs with a comma (,).
Filter On – Enables sub-pixel filtering of materials. When this option is disabled, an internal 1×1 pixel box filter is used. Using filters increases rendering time.
Filter – Specifies the filter type.
Filter Radius – Determines the size of the filter in pixels. Higher values yield blurrier results.
Blur – Smooths the result; available when Filter type is set to Mitchell-Netravali.
Ringing – Controls the edge-enhancement strength ; available when Filter type is set to Mitchell-Netravali. When it’s set too high ringing artifacts appear around geometry edges.
Note: Avoid using filters with negative components (sharpening filters) like Catmull-Rom or Mitchell-Netravali when using the Progressive sampler. Doing so might dramatically increase render time as the sampler needs to take additional image samples to resolve the filter.
Progressive Image Sampler
This rollout appears when the Type in the Image sampler (Antialiasing) rollout is set to Progressive. The Progressive sampler is similar to the Bucket sampler, but instead of rendering the image in buckets, it 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 in contrast to the Bucket image sampler, 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 slaves. This effect can be controlled to some extent by adjusting the Ray bundle size and Min shading rate parameters.
Note: In contrast with the Bucket image sampler, the Progressive sampler doesn’t have a mechanism to recover if a DR server goes offline during rendering before sending back the results from its calculations. The render process might hang indefinitely waiting for the missing data to arrive. This will be corrected in a future release.
Min. Subdivs – Controls the minimum number of samples that each pixel in the image will receive. The actual number of the samples is the square of the subdivs.
Max. Subdivs – Controls the maximum number of samples that each pixel in the image will receive. The actual number of the samples is the square of the subdivs.
Max. Render Time in Min – The maximum render time in minutes. When this number of minutes is reached, the renderer will stop. This is the render time for the final pixels only; it does not include any GI prepasses like light cache, irradiance map, etc. If this is 0.0, the render is not limited in time.
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.
Ray bundle size – Useful for distributed rendering in order 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.
Show AA mask – when enabled the user can see a mask that shows which parts of the image are currently being refined.
This rollout appears when the Type in the Image sampler (Antialiasing) rollout is set to Bucket. This sampler adaptively makes a variable number of samples per pixel based on the difference in intensity between the pixel and its neighbors.
Use Max Subdivision – switch on to use Max Subdivision option.
Min Subdivision – 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, or fast moving objects if you use motion blur. The actual number of pixels is the square of this number (e.g. 4 subdivs produce 16 samples per pixel).
Max Subdivision – Determines the maximum number of samples for a pixel. The actual maximum number of sampler 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 used to determine if a pixel needs more samples.
Per-pixel Filtering – enables the antialiasing filter
Adaptive Method – Switches between Legacy and New adaptive sampling. By Default V-RAYforC4D ses the new adaptive sampling method. Choose this option unless you are working with older scenes that require the Legacy method.
Show samples– if this is on, V-RAYforC4D will show an image where the pixel brightness is directly proportional to the number of samples taken at this pixel. This is useful for fine-tuning the antialiasing of the image.
Adaptive Subdivision – this is an advanced image sampler capable of under sampling (taking less than one sample per pixel). In the absence of blurry effects (direct GI, DOF, glossy reflection/refraction etc) this is the best preferred image sampler in V-RAYforC4D. 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.
Jitter– displaces the samples slightly to produce better antialiasing of nearly horizontal or vertical.
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 under sampled.
Object outline– this will cause the image sampler to always super sample object edges (regardless of whether they actually need to be super sampled). This option has no effect if DOF or motion blur is enabled.
Material ID– uses the material id pass (change of material) to antialiasing the transition from one to the next material on surface.
Z-Value– uses the z-depth pass (change of depth) to super sample the areas where a sudden depth change occurs.
Z-Value threshold– adjusts the threshold of the above depth sampler.
Show samples– if this is on, VrayC4D will show an image where the pixel brightness is directly proportional to the number of samples taken at this pixel. This is useful for fine-tuning the antialiasing of the image.