When rendering using mental ray for Maya, you can select the Unified Sampling mode under the Sampling Mode attribute of the Quality tab of the Render Settings window.
With legacy sampling methods, you must adjust many different attributes to control your sampling, for example, Motion Blur Time Samples, shader samples, light samples, shadow samples, and Volume Samples. With Unified Sampling, however, you primarily only have to adjust the Quality slider. You can still make adjustments to shaders and lights when necessary, or increase the Max Samples if you see artifacts even after the maximum number of samples have been reached.
If you are loading a legacy scene (Maya 2013 and below), and you want to render with Unified Sampling, you should lower the local sampling settings on shaders and lights to their default values to avoid very long render times. Specifically, adjust the following:
- under the light shape node Attribute Editor, expand the Shadows section, Raytrace Shadow Attributes subsection, and set Shadow Rays to 1.
- under the area light shape node Attribute Editor, expand the mental ray section, under Area Light, set High Samples to 8.
- under the mental ray material Attribute Editor, set Glossy Samples to 8.
The rendering time may be slightly longer than that of the legacy sampling methods, but the render result is much improved.
Tip: Hair and fur renders may benefit from use of the Legacy Rasterizer Mode. Volume rendering may be slower when unified sampling is used. In this case, use the legacy sampling modes instead.
For more information regarding the Unified Sampling mode options, see Quality tab.
Diagnostic framebuffers
You can generate a diagnostic framebuffer in the form of a
diagnostic.exr file that includes the following channels:
- mr_diagnostic_buffer: a beauty pass of your render
- mr_diagnostic_buffer_error: demonstrates the variance in irradiance among all samples. A lower variance implies convergence.
- mr_diagnostic_buffer_samples: demonstrates the number of samples for each pixel
- mr_diagnostic_buffer_time: demonstrates the amount of time required to render each pixel
To generate the diagnostic framebuffer
- Select Unified Sampling under the Rendering Settings: Quality tab, under the Sampling section, from the Sampling Mode drop-down list.
- Enable Diagnose samples under Sample Options.
To view the diagnostic framebuffer
- In the Render View window, select File > Load Render Pass > Diagnose samples to load the diagnostic.exr in imf_disp.
Alternatively, the diagnostic.exr file is also located in the renderData\mentalray folder of your project directory.
- In imf_disp, select Layer > mr_diagnostic_buffer_* to view the various channels of the framebuffer.