mental ray for maya

mental ray for Maya - ui tour 

Work in mental ray for Maya and render internally or externally from a prompt or work in mental ray for Maya and send the render out to the Standalone.

Let's get started.

Loading the plug-in ... automatically done with v6.0. 

 

You may want to set mental ray as the default renderer.

The mental ray for Maya UI - Render Globals window.

 

The Camera Attribute Editor.

 

The Shader Attribute Editor.

 

The Light Attribute Editor.

 

The miDefaultOptions node.

 

The mentalrayGlobals node (different than mental ray Render Globals)

 

and last but definitely not least, The Hypershade.

 



Scene setup

Essentially, when using mental ray for Maya work as you would normally. ie scene setup, modeling, animating, dynamics, shader creation and lighting are done as you would when using the Maya software renderer.

 

 


Optimizing renders and of Note

 

The following areas will be covered:

 

 

Sampling

Sampling in mental ray for Maya is adaptive, meaning that the algorithm attempts to use the fewest number of samples to achieve the best quality image. mental ray for Maya will only take extra samples or oversample when appropriate to compute high resolution, anti-aliased details. Sampling performance and quality is controlled by the Sampling Quality parameters in the mental ray for Maya’s Render Globals.

Contrast is an important tuning factor. Starting with the minimum level of sampling specified, an image is broken into blocks and sampled at their corners. The resulting samples are then compared with neighboring blocks. If the contrast between the sampled blocks is higher than the RGBA threshold values, further subdivisions are made. The process is repeated until either the contrast between each block is lower than the threshold values or the maximum sampling value has been reached.

For best results, in terms of render time, use the high threshold values with lowest possible sampling levels. The default values for RGBA are 0.1. Most usable values are in the range of 0.2 and 0.05. The A (alpha) value is an average of the R, G, and B contrast values. If alpha is not necessary, it’s recommended to set that value to 1.0.

Control the minimum amount of samples that will be taken as well as the maximum. If the sample limit is less than 0, there will be fewer samples taken than there are pixels. This is called infrasampling and is useful because of edge following. If the sample limit is greater than 0, there are more samples taken than there are pixels. This is called oversampling and occurs on an adaptive basis based on the minimum and maximum sampling value.

 

Diagnostics

mental ray diagnostics is a set of tools that is used to troubleshoot and refine render efficiency. These software renders provide visual, statistical information in the form of dots and lines etc. that can be used for render debugging and optimizing.

 

Diagnose Samples ...

This mode will result in a grey scale representation of sample density. 

White areas -  indicate maximum samples as described in Render Globals - Min and Max Sample Levels

Black Areas - no samples

Red lines - Task Size is indicated with a grid of red line lines. (24 the default)

 

Diagnose Grid (Object)

 

 

Diagnose Photon (Caustic Photon Density)

 

The Photon Density and Irradiance option provides a visual indication of the number of photons per unit surface area, or in the case of Irradiance, total incoming illumination. 

Blue areas - no photon density

Red areas - photon density values enterred

White areas - photon density that exceeds the enterred values

 

Diagnose Bsp (Depths of 40 and 24)

 

 

This mode gives a visual of the BSP (Binary Space Partition) tree. 

Blue areas - low recursion

Red areas - at maximum of recursion tree

 

Limits

mental ray Render Globals

Watch your limits!

Scanline On, Off, OpenGL and Rapid.

 

Translation

Equivalent to the - verbose flag with the standalone.

 

mental ray Area Lights

Very useful for soft lighting effects

 

mental ray Raytrace Shadows

 

Alias main entrance lobby with raytraced shadows. Use the Light Radius, Shadow Rays and Ray Depth Limit as per Maya software renderer.

 

Framebuffers

Scene Framebuffer control is in render Globals

Output shaders are accesable from the Camera AE

Output shaders - perform post-processing to the rendered image before a file is written. Output shaders are plug-ins that can perform compositing, motion blurring, DOF and addition of film grain etc.

 

Reflection and Refraction Blur

mental ray DGS material with v5.0 - now in the package with v6.0

An extra layer of realism with some blur:

The 'pills' image above also uses mental ray area lights for soft shadow effects.

 

Approximations 

Optional but should be used.

 

Global Override or Shape by Shape basis.

 

The Approximation Editor

subdivides a surface based on U and V. Each patch is subdivided into N triangles, where:
N = (U Subdivisions) * (V Subdivisions) * degree^2 * 2
Thus, with U Subdivisions set to 1.333 and V Subdivisions set to 4 on a degree-3 NURBS surface, each patch will be subdivided into 1.333*4*3*3*2 = 96 triangles.

 

also subdivides a surface based on U and V except when the entire surface is subdivided into N triangles, where: N = (U Subdivisions) * (V Subdivisions) *3

 

Length/Distance/Angle are adaptive - the surface is tessellated until certain criteria are met:


Length - a triangle is subdivided until no triangle has an edge longer than a certain length.

Distance - will subdivide triangles until they are not further than a certain distance from the NURBS surface.

Angle - will subdivide until the normals of neighboring triangles form an angle of less than a certain tolerance. 

View - View Dependent is On, the distance is expressed in pixels.

General rule of thumb use LDA with tree for non-design.

 

Offers advanced memory management caches unused tesselated pieces as required.  Running out of memory is not such problem. Very good for displacements and car renders. 

Careful of reflected geometry outside of the camera frustrum - it will be nickeled in reflections!

 

Spatial Fine 0 1 1.0 View Dependant ON

Spatial Fine 0 5 1.0 View Dependant ON

 

Styles ...

 

Memory Management

Bsp (binary space partition), Grid and Large Bsp raytace acceleration algorithms.

Bsp -  breaks down scene geometry (3D space) into an organized structure of recursively arranged voxels or volume elements. These voxels are placed by the algorithm into a “nested” or recursive pattern. From a conceptual standpoint this recursive structure resembles a tree with a main trunk (the initial voxel) and then the many branches as the geometry is recursively placed into voxels. This “adaptive approach” results in voxels only where they are needed. Each one of these voxels contains geometry triangles that are limited in size by the BSP Size attribute. This method of geometry organization lends itself to most scene arrangements.

Grid - where scene geometry is evenly placed, the grid acceleration method may be used. This acceleration method also breaks down the scene geometry into voxels, but not in an adaptive fashion. This method lends itself to large cityscape type scenes with uniformly complex geometry throughout 3D space. In such a situation, the adaptive, recursive breakdown of the Bsp algorithm may not be as efficient as the grid algorithm. The grid method can result in lower and more predictable memory usage.

Large Bsp - for **very**  large scenes.