This page gives information about the V-Ray Render Elements Options render element.
The VRayOptionRE render element is a special render element that controls some internal settings for V-Ray that are otherwise inaccessible. This render element does not generate an image or data itself, but rather controls other render elements.
These settings will be moved to the main render settings in a future release.
||Render Setup window|| > Render Elements tab > Add button > VRayOptionRE
This render element is enabled through the Render Elements tab of the Render Setup window in 3ds Max and displays its parameters in a rollout at the bottom of the window:
vrayVFB – When enabled, the render element's parameters are put into effect.
unfiltered fragment mode – Specifies how to determine the final values for render elements for which filtering is turned off (such as. Z-depth and Object ID):
Best coverage – For each pixel, the final values for the render element are taken from the object that has the largest contribution to that pixel.
Closest to camera – For each pixel, the final values for the render element are taken from the pixel that represents geometry closest to the camera.
exr compression 1 – Specifies the compression method when writing OpenEXR files through the V-Ray raw image file option in the V-Ray frame buffer settings.
use dwa compression level – Enable this option to use the dwa compression level. If this option is disabled, the default value of 45.0 is used.
dwa compression level – When use dwa compression level option is enabled, you can control the compression level from here.
exr metadata – Allows additional OpenEXR attributes that will be written in the file. See below for a discussion of the format for the attributes.
exr data window – Specifies the way in which V-Ray will determine and write data window information to the OpenEXR file.
Render region – Saves the currently selected rendered region to the OpenEXR file.
Auto – Automatically determines and writes data window information to the OpenEXR file. The data window is determined from the pixels that have non-zero alpha values.
Whole image – Saves the whole image even when rendering region.
exr multipart – When enabled, V-Ray will save the multichannel OpenEXR files in a format that is read much faster. Note that this option is only compatible with OpenEXR 2 and above.
deep merge fragment mode – Controls the generation of deep data for deep OpenEXR 2 and VRST files. With the default setting of By render ID, V-Ray merges the deep fragments within a pixel that belong to the same object, in order to reduce the size of the deep data. This also allows for the perfect separation of the different objects if needed for post-processing purposes. However this might be undesirable, especially in cases with a single object that is a complex shape (i.e. one VRayProxy object that represents a large portion of the scene environment). In this case, setting this parameter to By Z-depth will cause V-Ray to separate the deep fragments based on the similarity of their z-depth values, rather than to which object they belong. With the By render ID and Z-depth option, deep fragments are merged if they belong to the same object and have similar z-depth values.
By render ID – Deep fragments within a pixel are merged based on the objects to which they belong (i.e. objects are differentiated based on their render ID as it appears in the render ID element).
By Z-depth – Deep fragments within a pixel are merged based on the similarity of their z-depth values. Use the deep merge ZDepth threshold parameter to control how close fragments need to be in order to merge them.
None – Deep fragments within a pixel will not be merged.
By render ID and Z-depth – Deep fragments within a pixel are merged if they share the same render ID and are within the deep merge Zdepth threshold.
deep merge ZDepth threshold – When deep merge fragment mode is set to By Z-depth or By render ID and Z-depth, this parameter controls how close the fragments need to be in order to merge them. This essentially controls the precision vs. size of the deep file. This value is relative to the pixel size. A value of 1.0 means that fragments that are within a block roughly the size of a pixel will be merged together. Lower values produce more precise deep data, but can lead to larger files. Higher values make the deep data less precise, but can make the resulting deep files much smaller. A value of 0.0 will store every single image sample separately (not recommended).
deep alpha colors – Determines the type of alpha information to be stored in the deep files:
Monochrome – Only a single alpha value is stored.
RGB – Three alpha components are stored (red/green/blue) for compatibility with deep files coming out of Houdini.
Monochrome + RGB – Both monochrome and color alphas are stored in the file.
Format for OpenEXR metadata attributes
The data in OpenEXR metadata attributes are of the format attr1=val1;attr2=val2;... where the values can be either integer or floating-point numbers, or lists of numbers in brackets representing vectors, matrices etc. For example:
If a value cannot be recognized as a number or a sequence of numbers, it is assumed to be a string value.
Metadata attributes can be dynamically set using MAXScript. An example with saving the animated camera ISO value in the .exr output is provided below:
- Prepare your scene. Set VRayPhysicalCamera (use its default name VRayCam001 or modify the script accordingly). Add VRayOptionRE render element. Enable V-Ray raw image file and specify .exr output file.
- In the MAXScript Listener consecutively type the two commands below, using Enter at the end of each line:
3. Render a sequence of frames with animated camera ISO. In the resulting .exr files you'll have the cameraISO attribute displaying the current ISO value of the rendering camera in each frame.