Upgrading from mental ray 3.6 to 3.7
What's new in Version 3.7
Scene Description Language
Shader Writing and Integration
Incompatible Changes

What's new in Version 3.7

Here is a summary of some of the new features and feature improvements in version 3.7 of mental ray. Please refer to the release notes for more details and for other changes which are not mentioned here.

Native MetaSL Shader Support

mental ray now supports shaders written in MetaSL language to be used for software rendering. This is handled by integrated support for automatic compilation and/or linking on the target platform, see MetaSL shaders.

The shader code generation is performed by so-called MetaSL back-ends. mental ray currently provides two back-end alternatives :

The C++ back-end is currently the default.

The .NET back-end is optional, because it has several known limitations in the current implementation. It is using the .NET Framework from Microsoft, version 2.0 or higher, available for all modern Windows platforms.

For shading trees defined in mental ray scene files, mental ray supports a first version of shading tree flattening. This operation allows to generate a single final shader from a source shading tree or phenomenon by resolving all parameter connections and compilation to a composite shader. This is possible for shading trees or phenomena which consist only of MetaSL shaders, i.e. not mixed with C/C++ shaders. The flattening can be enabled by setting the {_MI_REG_METASL_FLATTEN} mental ray registry variable to a non-empty value.

Progressive Rendering Mode

In the progressive rendering mode, the image is not rendered in tiles each at full sampling quality any more. Instead, few samples are placed sparsely over the full image initially and more samples are taken over time until a desired quality is reached. During rendering the image is available for display at any time which allows to implement interactive rendering applications with mental ray. This mode even works with the regular but slower DISP stream protocol that is used when connecting imf_disp to a running mental ray. Various options allow to tune either for faster response or better quality. The progressive rendering can be controlled to run endlessly until explicitly stopped by the user, or until a certain sampling quality or error threshold is reached.

This version of mental ray supports traditional mental ray shaders and the existing rendering algorithms like finalgathering (in particular, with progressive finalgather precomputation) and photon mapping. Future versions may provide further optimized and faster converging solutions fully based on importance sampling and BSDFs.

Progressive mode can be controlled from the command line and with scene options.

Progressive Final Gathering

The final gathering algorithm has been improved to provide much faster early feedback which is progressively refining during the pre-computation phase, to support interactive rendering applications based on mental ray. The tile display ordering has been adjusted to match the tile order used during regular rendering, giving the impression of doing a single rendering that improves progressively. This mode can be combined with progressive rendering mode for best interactive behavior. It has no effect with "exact" final gathering.

The finalgather display during pre-computation gets enabled with the -finalgather_display on command line option or with the miRENDER_DISPLAY_FG bit in the rendering mode mask. The pre-computation is now split into several passes, each one refining the previous ones. Furthermore, it also respects the order of tile computations specified with mi_rc_set_taskorder() function call.

The number of FG precomputation passes can be specified with the string option "finalgather passes", or with the command line option -finalgather_passes <int>. The default value is 3.

In the current implementation, the maximal value of finalgather passes is 8. Only 2 most recent one apply adaptivity in the raster sampling, the purpose of others is to provide progressive rendering report. I.e. for the number of passes larger or equal to 3 the final image does not change.

For compatibility with mental ray 3.7 and prior, the single pass finalgather display can be enabled with the string option "finalgather precomp legacy".

Finalgather Point Selection

For final gathering, implemented a way to restrict finalgather map lookup to a specified subset of finalgather points. In particular, this feature may be used for rendering of objects with multiple semi-transparent surfaces where explicit separating of layers is more efficient than limiting interpolation distance or increasing the density of the finalgather map.

The miIrrad_options structure passed to mi_compute_avg_radiance() function has been extended with the integer field "id". The default value for id is zero. The id is stored with each finalgather point. For interpolation, the id passed to the interpolation call is taken into account: if zero, all finalgather points are potentially accepted. If non-zero, only finalgather points with the same id are accepted.

Backwards and forwards binary compatibility of mental ray shaders and finalgather map files is maintained.

Native Image Based Lighting (IBL) Support

mental ray provides a built-in solution for image-based lighting (IBL) with optimized performance and quality. It works for regular scenes which have a camera environment shader installed, no matter if that shader takes color values from a texture image or generates them procedurally. mental ray is pre-sampling the environment and creating lookup acceleration data structures to support importance-driven adaptive sampling during the lighting computations in shaders. The illumination from the IBL is automatically added to all material shaders which perform regular light sampling.

The IBL mode can be controlled with scene options.

IBL can be used in progressive rendering mode.

Irradiance Particles

This version adds a novel and alternative global illumination technique called Irradiance Particles (short: IP), which is in many cases superior to finalgather and/or photon mapping in terms of image quality, usability and performance. It is based on importons which are shot to the scene from the camera before rendering starts. Their hit positions with information on the amount of direct (and possibly indirect) illumination coming at their position (hence the name "irradiance particles") are combined into a map. Optionally, one or more passes of indirect illumination can be computed. By the nature of the algorithm, this computation is importance-driven. During rendering, Irradiance Particles are used to estimate the irradiance for every shading point: if just direct illumination was collected for irradiance particles, this is equivalent to one bounce of indirect lighting. Irradiance can also be interpolated from precomputed values found at nearby particle positions.

Native BRDF/BSDF Support

Support for built-in illumination models represented by a Bidirectional Scattering Distribution Function (BSDF, commonly known as BRDF for non-transmitting materials) has been added to mental ray. In the current version, mental ray provides the most common Lambert, Mirror, Phong and Ashikhmin BSDFs, as well as an Architectural BSDF to closely simulate the behavior of the respective advanced mental ray shader. More BRDF/BSDF standard models will follow in future versions.

With BSDF shaders, it is possible to omit photon shaders. For materials with a BSDF shader but no photon shader specified mental ray automatically uses the BSDF shader and use its sample function to simulate photon shader behavior. For the future version, this fallback into BSDF will be enabled for other indirect illumination techniques.

BSDFs may be split into up to 6 components (reflection and refraction, with diffuse, glossy, and specular components each). The eval function evaluates all BSDF components, or a subset thereof, for a pair of incoming and outgoing directions. The Bsdf interface also provides a sample function, which allows importance sampling of outgoing directions for a given incoming direction. In addition, this function provides information about the sampled component and the sample weight. The latter can easily be combined with Russian roulette for absorption, which could be used e.g. for writing photon shaders.

A BSDF shader may be attached as material shader into miMaterial. In this case, mental ray takes care of simulating a material shader based on the BSDF.

An instance of a BSDF shader with given parameters may be specified with the usual shader syntax. Input parameters of a BSDF shader can be specified as the result of other shaders, allowing conventional shading trees and phenomena to be used.

Map Container

Initial support for generalized Map containers has been added. Maps are particle systems in N dimensional space. Each particle has a position and set data assigned.

mental ray provides functionality for creating, accessing and editing of Maps, as well as loading them from files and saving them to files. An efficient nearest neighbor lookup functionality is implemented, utilizing either euclidean distance or arbitrary distance functor provided by user. The distance functor may implement rejections by returning the miHUGE_SCALAR value.

Particle data may be any structure consisting of the common types including scalars, integers, vectors, colors and transforms. All particles in a single map have identical layout. The position of a particle is an N-dimensional float vector, where N varies in range from 1 to 6 in the current implementation.

In this version, Maps need to be created or loaded by applications or geometry shaders. Tutorials are added to mental ray releases.

Catmull-Clark Mesh Features

Implemented adaptive tessellation for Catmull-Clark meshes. Each region can now have a different refinement level. t-vertices with neighbor regions having different refinement levels are fixed with triangle fans. Positions are always computed on the limit surface.

For the Catmull-Clark meshes, improved texture seams quality by implementing spline-rule evaluation.

Hair Approximation

Added approximation for hair. In addition to the old approximation syntax which directly specifies the number of approximating segments, it is now possible to specify adaptive length, distance, angle approximation including view-dependent approximations. Parametric approximations depending on the degree of the hair curves are supported as well.

Especially for curved hair and hair at higher viewing distance, the new approximation criterion allows to have high approximation resolution restricted to the area where needed. The lower number of hair segments result in reduced memory consumption and increase rendering speed.

In order to get benefit from curvature-dependent approximations, hair needs to be modelled appropriately with hair degree > 1.

Motion Blur Displacement

For moving polygonal objects with displacement, added functionality to automatically control the quality of displacement according to the amount of visual motion. For fast moving objects, images with comparable visual quality may be achieved with fewer displacement tessellation details compared to static or slow moving objects. Though it is also possible to tweak displacement approximation on a per-object basis, this would require a lot of manual efforts and is rarely done in practice. Per-object granularity may also be not fine enough for object having different amount of motion in different parts. The new approximation motion factor provides an automatic way for adjusting the displacement quality according to the amount of motion for a given object part.

For view-dependent fine poly displacement the adaptive subdivision checks motion length in screen space. The measured motion length is used to modify the use of the approximation constant. Geometry is reduced only in areas of the object with strong motion.

A new option can be used to modify the amount of geometry reduction compared to static case. The feature is enabled by default at a rather conservative setting, which reduces displacement quality only for very fast moving objects.

OpenEXR Features

For OpenEXR textures, added ability to use display window. If the registry setting _MI_OPENEXR_WINDOW is set to "display" (in contrast to "data"), then the OpenEXR display window will be used. Note that display window is not compatible with mipmap pyramids for filtered local textures.

The OpenEXR version as been updated to 1.6.1.

OpenEXR library is linked statically. On an attempt to link mi_openexr.dll, a warning message is printed.

Network Rendering

Added IPv6 support for mental ray multi-hosting rendering. In the .rayhosts file, as well as on the command line, IPv6 addresses may be specified. Host names and IPv4 addresses are still supported. IPv6 addresses need to be put into the ][ ] brackets following common URL convention. Note that if slave host is specified on the command line, the [ ] brackets may need encapsulation depending on the shell used.

mental ray master host tries to establish connections to slaves using either TCP or TCPv6 protocol, whatever is available and applicable to a slave host (if a slave host is given by name, both TCP and TCPv6 protocols are tried out, the order depends on operating system used and OS configuration).

Added IPv6 support for the socket layer of mental ray DISP protocol (immediate display of tiles as they rendered). mental ray would listen for connections done with either TCP or TCPv6 on the same port id. The imf_disp tool would try to get the connection with any of TCPv6 and TCP protocols.

Scene Description Language

The following changes were made in the .mi scene description syntax:

Shader Writing and Integration

Incompatible Changes

Copyright © 1986-2010 by mental images GmbH