Here is a summary of some of the new features and feature improvements in version 3.13 of mental ray. Please refer to the release notes for more details and for other changes which are not mentioned here.
With Light Importance Sampling enabled, further optimizations in the rendering core are possible when BSDF based materials are used, referred to as Multiple Importance Sampling. The prior knowledge of both light and material properties allows the renderer to make smarter decisions about the sampling strategy and necessary shading calls, reducing noise and rendering time even more. The Multiple Importance Sampling feature is currently disabled by default. It can be enabled and controlled with string options and on the command line of standalone mental ray.
The MDL materials are typically provided as .mdl
files
organized in a folder like module structure, providing other referenced data
like textures. Such files can simply be loaded into mental ray via regular
include statements. This will auto-create named scene materials that can be
applied to scene instances as usual. Both MDL materials and traditional
shaders can be utilized side by side within the same scene and will render
smoothly. However, MDL materials are closed entities for mental ray upon
loading. Parameter connections to other shaders or other MDL materials
are not supported.
The new global illumination engine is considered a prototype in this version because it is under continuous development. It currently runs only on CPU, but is planned to take advantage of the GPU going forward. It should work reliably with typical scenes and setups, and with most third-party shaders. It can be enabled and controlled with string options and on the command line of standalone mental ray.
A new, easy to use Ambient Occlusion Pass has been added that automatically computes AO in a separate render pass without the need to manipulate the scene or attach special shaders. This implementation can take advantage of a capable NVIDIA GPU for best possible speed, and otherwise uses the CPU with exactly the same algorithm to create identical results. It can be controlled with string options and on the command line of standalone mental ray.
The iray version 4.0 is a major update of this rendering mode built into mental ray. It adds support for the most recent NVIDIA GPU architectures, while retaining compatibility to previous generations of GPUs. This version also uses the latest CUDA runtime for best performance. The iray rendering core has been further optimized towards stability and scalability in multi-GPU and CPU/GPU setups.
mib_tiled_texture
. The shader is able to resolve
the individual tile texture files automatically by supporting established
indexing conventions, like UDIM. It then auto-creates and loads the tile
textures into mental ray on demand, making sure that only those tiles that
are actually accessed get loaded into memory.
The shader is part of a new package called
coreutil
, which collects essential
mental ray utilities and helper functions for easy integration with third-party
systems and external libraries of developing industry standards.
mental ray adds support for generating "deep" data and output to OpenEXR files. If the boolean attribute "deep" is set to true on a frame buffer, then the resulting image is saved in DeepTile form of OpenEXR 2.0 file format, storing additional information of the pixel colors along the Z axis. It is possible to save deep and classic data into different frame buffers during the same rendering.
The mental ray OpenEXR integration is now based on version 2.2 of
the OpenEXR library. It adds new lossy compression modes, called
"dwaa"
and "dwab"
. The compression ratio can be
controlled, ranging from 45 to 2000, for highest image quality down to most
lossy and smallest image size.
The mental ray shader for import of Alembic archives has been updated to the latest Alembic library release, and extended with new functions. The support for creation of mental ray "hair" from Alembic's ICurves has been added. Currently, linear segments and cubic curves with a uniform knot vector are supported. Also, custom vertex data on polymesh geometry are now respected. They get attached to the target trilist geometry in mental ray as one of the types color3, color4, point, normal, float, or int, respectively. Shaders may retrieve the values during rendering to create special effects.
Note, there is a new BSDF based version of a hair shader available as part of the Layering package, supporting new features like LPE render passes.
New LPE expressions for diffuse, glossy, and specular
reflection that is transmitted have been added. A new set of preset phenomena
has been created, delivered in the extra file layering_phen.mi
.
That includes, for example, a phenomenon for realistic hair shading constructed
from layering nodes that is inspired by the Marschner hair shading model,
called mila_layer_hair
.
The required hair utility shaders are all contained in the layering package.
mental ray adds Custom Color Profiles, opening its color management
pipeline to third-party developers and integrators. A new
type of shader has been introduced making fully programmable color
transformations possible while taking benefit of mental ray's established color
handling machinery. The existing .mi
scene syntax for color
profiles on textures and frame buffers is not affected by this change but can
simply reference the new vendor profiles by name.
This new delivery model allows to update mental ray core at any time, and independent of updates of the host application. It has other advantages, like avoiding symbol and version conflicts for common dependent libraries like zlib, and the possibility to use different compiler versions and options for building mental ray vs. the applications or plug-ins.
The following changes were made in the .mi scene description syntax:
"gi" "on"|"off" "gi rays" raysint "gi depth" depthintPlease see the scene options for more details.
$mdl ... $end
"ambient occlusion gpu devices" "ambient occlusion gpu cpu threads"The "devices" value is a bitmask which allows to specify which CUDA devices are to be used. The value 0 is interpreted as using CPU. (default: -1, all devices).
compression "dwaa" compression "dwab"Note, that the compression ratio in these modes can be controlled. As of now, the values recommended by OpenEXR authors are in the range of 45 (least lossy, largest file size, highest image quality) to 2000 (most lossy, smallest image size). The compression ratio can be specified using the
quality
attribute on mental ray frame buffers. The default is 45.
mib_tiled_texture
has been added.
declare shader color texture "mib_tiled_texture" ( integer "mode" default 0, integer "utiles" default 10, scalar "filter", string "colorprofile", vector "uvCoord", string "texture_dir", array struct "texture_info" { string "filename", vector "tile_coord" } ) end declareThe parameters have the following meaning:
colorprofiles
is available. Its declaration and instancing follows
the regular shader declaration rules. A shader declaration can now contain
apply colorprofile
flag. A colorprofile may now specify a shader
instance with the syntax:
colorprofile "profilename" ... shader <shader instance> ... end colorprofile
[<flags> <type>] texture <texture_name> [<colorprofile>] <file_name> [<image_type>]Note the optional
image_type
addition at the end. This way,
a low dynamic range 8-bit "rgb"
source texture that is used with a
color profile can be enforced to be stored internally as "rgb_h"
(half float), for example, to retain a higher precision resulting from color
transformations into high dynamic range (HDR).
mi_api_texture_file_size(0, 0, 0, image_type)
where image_type
is a result of calling
mi_api_texture_type_identify(mi_mem_strdup("<
image type string>"))
.
Unlike for earlier versions of mental ray, the
mi_api_texture_file_size()
function works with non-writable
textures.
mi_api_mdl_load_module()It allows to load a specific MDL module. All MDL materials are accessible in mental ray database. For convenience, they are kept in a separate scope
"mdl::"
.
miColor_profile.shader
is added, and a shader
instance tag can be assigned by translators.
miColor
in-out pointer, and
the shader is supposed to convert the color in the direction needed.
miRAY_COLOR_TO_INTERNAL
and
miRAY_COLOR_FROM_INTERNAL
. When a shader is called, the
miState::type
is set to one of these values. The former value
is used when a texture or texture tile is loaded into memory. The latter one
is used for output images, such as frame buffers.
miColor*
parameters
points to array of colors, and miState::count is initialized with the number
of elements in that array (at least one). A color profile may decide to
convert more than one. In that case, it return value should be the number
of element the shader has converted. In particular, a shader that is not aware,
or not implementing this extension would convert a single color and return
miTRUE
. As miTRUE == 1
, the kernel would interpret
this as a single element conversion. This SIMD optimization is only available
for C/C++ shaders/shading trees, not for phenomena.
"L.+<RD><TS>+E" "indirect_diffuse_transmitted" "L.+<RG><TS>+E" "indirect_glossy_transmitted" "L.+<RS><TS>+E" "indirect_specular_transmitted"
-echo callgeoshader
will force to call geometry shaders and
echo the generated content instead of the reference to geoshader.
This mode may be useful in analyzing procedural assets, or removing
dependencies on the geoshader components.
-echo callassembly
will evaluate callbacks of procedural
assemblies, and export the generated content to .mi
files
as one file per assembly.
miBoolean mi_geoshader_echo_tag_file( const char *file_name, /* file name */ miBoolean append, /* append or rewrite file */ const char *header, /* optional string to be written to file */ miTag tag, /* DB tag to echo */ miEchoOptions *options) /* echo options */Unlike
mi_geoshader_echo_tag()
function, it takes file name
and the file opening mode (append or overwrite). The file mode is only
relevant if the file already exists. Note that his function supports UTF8
file names, including WIndows platform.
mi_geoshader_echo_tag()
is deprecated as one of
its arguments, the FILE*
pointer, should not be passed across
dynamic library boundaries. This may cause conflicts if different compiler
versions or compiler options were used.
coreutil
. It collects mental ray auxiliary shaders that extend
the functionality of the core rather than doing actual shading.
This package currently holds the shaders
abcimport
for on-demand loading of Alembic archives,
mib_ptex_lookup_x
shader and mib_ptex_lookup
phenomenon to read Ptex textures,
mib_tiled_texture
shader to handle UV Tiling
textures automatically.
mi_api_texture_callback_def_x() mi_api_object_placeholder_callback_x() mi_api_data_callback_x()which take thee callback arguments. The third optional callback function is called when assembly/object/data block is deleted. Note, that mental ray can re-create data multiple times, which leads to zero, one or multiple create callback calls (#1) interleaved by the flush callback (#2) calls. At the end of the frame or rendering, the delete callback (#3) is called once. Thus, the parameters to the callbacks should be first released in that newly added delete callback.
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.