Sunday, June 7, 2009
1.29 Diagnostic modes
1.28 Global Illumination in Participating Media
1.27 Volume Caustics
"transmat" ()
shadow "transmat" ()
photon "transmat_photon" ()
volume "parti_volume" (
"scatter" 0.05 0.05 0.05,
"extinction" 0.05,
"lights" ["arealight-i"]
)
photonvol "parti_volume_photon" (
"scatter" 0.05 0.05 0.05,
"extinction" 0.05
)
end material
1.26 Final Gathering
1.25.3 Fine-tuning Global Illumination
1.25.2 Objects
1.25.1 Light Sources
"color" 700.0 700.0 700.0
)
origin 20.0 30.0 -40.0
energy 700 700 700
globillum photons 100000
end light
1.25 Global Illumination
1.24.5 Fine-tuning Caustics
caustic accuracy 200 1.0
1.24.4 Shader Functions
1.24.3.2 Physically Plausible Material Shaders
"dgs_material" (
"specular" 1.0 1.0 1.0,
"lights" ["arealight-i"]
)
shadow "dgs_material" ()
photon "dgs_material_photon" ()
end material
1.24.3.1 Softimage Material Shaders
1.24.3 Material Shaders and Photon Shaders for Caustics
1.24.2 Objects
1.24.1 Light Sources
1.24 Caustics
1.23 Memory-mapped Textures
1.22 Contours
1.21 Output Shaders
1.20 Color Calculations
1.19 OpenGL Acceleration
1.18 Sampling Algorithms
1.17 Motion Blur
1.16 Animation
1.15 Depth of Field
1.14 Lens Effects
1.13 The Camera
1.12 User-Defined Shaders
1.11.2 Elliptical Projection Filter
1.11.1 Pyramid Filtering
1.11 Texture Filtering
1.10 Texture, Bump, Displacement, and Reflection
1.9 Shadow Maps
1.8 Area Light Sources
1.7 Light Sources
1.6 Materials
1.1 Parallelism
1.5 Atmospheres and Volumes
1.4 Special Points and Curves
1.3 Edge Merging and Adjacency Detection Surfaces
1.2 Free-Form Surfaces
Saturday, June 6, 2009
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 the time
coherency of the animation.
The functionality of mental ray may be extended through runtime linking of user-supplied C or C++
subroutines, called shaders. This feature 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 user has access to a convenient
environment of supporting functions and macros for use in writing shaders. The parameters of a userprovided
shader can be freely chosen with name and type; user-defined shaders are not restricted to a list
of predefined parameters. Available parameter types include integers, scalars, vectors, colors, textures,
light sources, arrays, and nested structures. When a user-defined shader is called, mental ray will provide
parameter values according to standard C calling conventions.
The built-in material shaders provide a rich variety of parameters for describing material properties,
including ambient color, diffuse color, specular color, transmission and shadow colors, a specular exponent,
reflectivity, and transparency coefficients, and an index of refraction. These parameters are interpreted by
the shader specified for thematerial. All material parameters except the index of refractionmay be mapped
with one or more textures. Color textures include opacity information and if multiple textures are applied
to a single parameter they are composited. In addition, one or more bump, displacement, and/or reflection
maps may be associated with a material.
Light passing through the space surrounding objects, as well as light passing through solid objects,
is modified according to volume shaders, which allow the creation of effects such as fog and nonhomogeneous
transparency effects and visible caustics beams. In addition to standard material environment
maps, a global environment map can be specified that provides a solid background for rays leaving the
scene.
mental ray can generate a variety of output formats, including common picture file formats and specialpurpose
formats for depth maps and label channels. Alpha channels and both 8 and 16 bits per component
are supported, as well as a 32-bit floating-point component mode. User-supplied functions can be applied
to the rendered image before it is written to disk.
Contour lines can be placed at discontinuities of depth or surface orientation, between different materials,
or where the color contrast is high. 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.
The resulting image may be output as a pure contour image, a contour image composited onto the regular
image (in raster form in any of the supported formats), or as a PostScript file.
Phenomena consist of one or more cooperating shaders or shader trees (actually, shader DAGs; a DAG is
a directed acyclic graph). A phenomenon consists of an "interface node" that looks exactly like a regular
shader to the outside, and in fact may be a regular shader, but generally it will contain a link to a shader
DAG. mental ray takes care of integrating all aspects of the phenomenon into the scene, whichmay include
the introduction or modification of geometry, introduction of lenses, environments, and compile options,
and other shaders and parameters.
The Phenomenon concept is conceived to unify by packaging and hiding complexity all those
seemingly disparate approaches, techniques, and tricks, most notably (but not limited to) the concept of
a shader, which are characteristic for today's state of the art in high-end 3D Animation and in Digital
Special Effects production. The aim is to provide a comprehensive, coherent, and consistent foundation
for the reproduction of all visual phenomena by means of rendering. The Phenomenon concept provides
the missing framework for the completion of the definition of a scene for the purpose of rendering in a
unified manner.
This book describes versions 2.0 and 2.1 of mental ray. Features that are available only in mental ray 2.1
but not in mental ray 2.0 are marked with "
2:1".