Introduction

mental ray is a general-purpose renderer to visualize 3D virtual scenes. It provides a very rich feature set aimed at rendering any visual effect in exceptional quality at highest possible performance. At the same time, it is extremely flexible and customizable making it easily adoptable by all kinds of applications.

mental ray is founded on advanced ray tracing algorithms to achieve the most realistic results and best visual quality. It combines established traditional rendering approaches with latest lighting and shading techniques seamlessly. That allows to visualize anything from purely stylistic and illustrative images with fast approximate shading models to highly realistic and physically accurate global illumination simulations. All of these effects may be used together in the final image.

The software exploits various sophisticated acceleration techniques to speed up rendering by trading memory, quality, or features. Such as the rasterizer engine, which implements a modern version of a scanline rendering algorithm for quick primary visible surface determination and fast motion blur, or the BSP (binary space partitioning) class of algorithms for efficient rendering of all ray tracing effects. These algorithms can be fine-tuned towards specific applications or scenes to gain even higher performance than the built-in scene analysis heuristics.

mental ray was one of the first commercial rendering engines introducing global illumination features, delivering never-seen-before realism in computer generated imagery. Nowadays, it offers a collection of GI solutions targeted at various use cases, from baked textures and pre-computed point clouds for games and animations to a fully simulated unbiased solution without any caching for lighting analysis and high fidelity reference. The Photon Map method built into mental ray supports the computation of typically expensive indirect lighting features. It is especially suitable to render caustics, light patterns generated by multiple reflections and refractions, or when passing through volumes. A complete, physically correct simulation of general global illumination is also supported: any combination of diffuse, glossy, and specular reflection and transmission can be simulated, such as color bleeding caused by diffuse inter-reflections, and multiple volume scattering.

mental ray has been designed from the ground up to take full advantage of parallel hardware, including thread parallelism on a local machine, as well as process level parallelism across networks of machines, or massively parallel distributed-memory systems. As a result, the rendering performance scales with the overall number of dedicated compute processors, local or remote, allowing to simply increase rendering throughput by dedicating more compute resources to mental ray. mental ray takes advantage of thread parallelism automatically; the use of other machines on the network as render slaves may be configured by the user or application. The renderer balances the computational load among the available processors using a shared database that distributes parts of the scene in optimal ways based and on demand only.

mental ray is open to integration with any other software. It provides a public programming interface with access to all the core functionality and rendering features. That makes it straight forward to embed it directly into modelling or animation applications of other vendors as a plugin or library component. Alternatively, the mental ray library may be coupled with a translator that reads the application vendor's native file format and converts it directly to the mental ray scene description. Finally, mental ray is available as a stand-alone program for batch rendering of exported .mi scene files on any platform independent of the authoring system, the typical use case in a render farm. That way, any capable content creation tool can be used together with mental ray via scene exchange using the standard .mi file format.

The native scene description format of mental ray is the .mi format. It can carry every native mental ray scene element with all its detail to the renderer, as well as the properties of custom shaders. This comprises geometry like polygon and triangle meshes, free-form surfaces with trimming, subdivision surfaces, or specialized primitives like hair and particles. All surface geometry may be procedurally displaced.

The illumination effects in mental ray are not hard-coded features but they are all defined by shaders, little programs typically coming in libraries that can be plugged into the renderer. New illumination features, or variations of existing features, can be added simply by writing new or modify existing shaders.

The material properties for shading and lighting of the geometric scene objects are defined by material shaders. The traditional material models provide a set of parameters to control properties like ambient, diffuse, and specular color, transmission and shadow colors, specular exponents, reflectivity parameters, and transparency coefficients. Modern materials like the standard physics shaders add more realistic global illumination effects and other physically plausible simulations such as indirect illumination, translucency, glossy reflections, accurate diffuse light transport (a sub-function of global illumination that is often called "radiosity"), and color bleeding. Popular shading tricks like bump mapping, but also texture driven displacement are supported as well. The material parameters may be tuned towards intended behaviour and then stored as a preset, or material instance, with its own name, which can then be applied to many different objects sharing the same properties. All such parameters may be driven by a textures or by another shader, by connecting shader inputs to other shaders' outputs, forming more more complex shader graphs. This way, artists can influence the look and behaviour of materials by painting texture maps.

The standard base, physics, and contour shader libraries coming with each release of the software are also available as source code from ftp://ftp.nvidia-arc.com/pub/shaders/ to help shader writers developing custom shaders and effects.

mental ray can generate a variety of output data in many formats, including common picture file formats, as well as special purpose formats for z-depth channels or custom information like object labels. Alpha channels are supported and written by default to capable image formats. Bit depths of 8 and 16 bits per component are supported, as well as latest 32-bit floating-point formats to save HDR (high dynamic range) images. Custom post-processing functions can be applied to the rendered image before it is written to disk.

mental ray supports efficient rendering of animations using incremental changes to the scene database. Only the parts of the scene that change from one frame to the next need to be redefined. This feature allows mental ray to optimize scene tessellation, preparation, acceleration data structure management, and network transfers, taking advantage of frame-to-frame coherency in the animation.

The functionality of mental ray may be extended through user-supplied subroutines, called shaders, written in programming languages like C, C++, or MetaSL. Shaders can be used to create geometric elements at runtime of the renderer, procedural textures, including bump and displacement maps, materials, atmosphere and other volume rendering effects, environments, camera lenses, and light sources. The developer has access to a convenient programming interface of convenient functions and helpful macros to ease the coding. The parameters of a custom shader can be freely chosen with name and type. Available parameter types include integers, scalars, vectors, colors, textures, light sources, arrays, and nested structures.

mental ray adds the concept of Phenomena, a framework to unify and simplify the use of visual effects. This is achieved by packaging and hiding complexity - all those seemingly disparate approaches, technical details, and tricks, most notably (but not limited to) the concept of a shader. The aim is to provide a comprehensive, coherent, and consistent foundation for the reproduction of all visual phenomena by means of rendering. A Phenomenon encapsulates one or more cooperating shaders or shader graphs. It publishes its properties through an "interface" that looks exactly like a regular shader to the outside, only exposing those few parameters to the user that are desired. mental ray takes care of integrating all aspects of such a phenomenon into the scene, which may include the introduction or modification of geometry, introduction of lenses, environments, and compile options, and other shaders and parameters.

mental ray is very well suitable for non-photorealistic rendering. As an example, contour lines can be created with mental ray easily. They can be placed at discontinuities of depth or surface orientation, between different materials, or where the color contrast is high, simply by using an appropriate contour shader. The contour lines are anti-aliased, and there can be several levels of contours created by reflection or seen through semitransparent materials. The contours can be different for each material, and some materials can have no contours at all. The color and thickness of the contours can depend on geometry, position, illumination, material, frame number, and various other parameters as determined by the shader. The resulting image may be output as a pure contour image, as a contour pass composited onto the regular image, or as a Postscript file.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.