mental ray Release Notes
Version 3.7.53.5
May 18, 2009
Copyright © 1986-2009 mental images GmbH,
Berlin
Introduction
These release notes list changes in mental ray since version 3.6.0.3.
Changes by Version
Note: Version 3.7+ and later versions of mental ray are binary
incompatible with mental ray versions 3.6/3.6+ and prior. Partial
compatibility with 3.7 is maintained.
- Some shaders compiled for previous versions may need recompilation to
be used with this version. Shaders compiled for mental ray 3.7 will work
with mental ray 3.7+, but not the other way round. This specifically
applies for the MetaSL generated shaders.
- Version 3.7+ cannot be combined with version 3.7 and earlier versions
in network rendering.
Changes in version 3.7.53.5
Bug fixes:
- Fixed possible crash in
ccmesh
object tessellation.
- Fixed a crash if progressive rendering is used in combination with
contours: disabled contour rendering. These two features are
algorithmically incompatible.
Changes in version 3.7.53.4
Bug fixes:
- For finalgather precomputation, the face flag for the eye ray has been
mistakenly initialized from the options block in a way, so that kernel
considered it as set by shader and gave it higher priority than the
object / instance flags, which thus have been ignored.
- For possible crash or database fatal for scenes which do not fit into
memory completely. A reference to subobject could stay in the kernel
after the complete object with subobjects was flushed for the second
time.
Changes in version 3.7.53.3
Shader changes:
- For architectural material shader, changes the installed callback calls
to unding the sample loop osurround the sample loop op of the light,
instead of surrounding the light loop. Adding light data to the callback
argument structure.
Changes in version 3.7.53.2
Bug fixes:
- For BSP2 acceleration used with
shutter_delay = shutter >
0,
fixed possible shadow artifacts due to the static BSP2 tree
used in this case. Note that with this fix, the memory allocated by the
BSP2 acceleration is increased, but stays below the memory required for
motion BSP2 acceleration.
- Fixes possible hangs and z-clipping artifacts in rendering of scenes
with motion blur with rasterizer. The precision of the z-clipping
computation is increased.
- For the debug version executable, fixed false assert in
finalgather.
Shader changes:
- For architectural material shader, fixed a performance regression in
case of multibouce finalgathering used in combination with "fake glossy
reflection" feature of the shader.
Changes in version 3.7.53.1
Feature improvements:
- For progressive rendering, added color profiles support for interactive
image output. Optimized pipeline for color profile image tile conversion.
In the case of progressive rendering, apply fast but slightly less
accurate conversion routines. Speedup general image conversion routine by
avoiding unnecessary function calls and memory allocations.
- For progressive rendering, adjusted the set of exposed string options
and command line commands:
-progressive <bool>
-progressive_subsampling_size <int>
-progressive_min_samples <int>
-progressive_max_samples <int>
-progressive_error_threshold <float>
Corresponding string options are "progressive"
,
"progressive subsampling size"
, "progressive min
samples"
, "progressive max samples"
and
"progressive error threshold"
.
The -progressive_subsampling
command line option has been
renamed to match the string option name.
The new options set allows usage of progressive rendering with
adaptive sampling. The "progressive min samples"
specifies
the minimal number of samples used. "progressive max samples" and
"progressive error threshold" specify the maximal number of samples and
estimated error level to be used per pixel before stop, whatever criteria
is reached first.
Bug fixes:
- For multiple bounce finalgathering, fixed wrong depth count for
secondary finalgather rays. Refraction limit has been applied instead of
reflections.
- For multiple bounce finalgathering, fixed wrong default
importance setting applied to the 3rd and higher diffuse bounces. This
resulted in a higher number of rays used, shifting the scene rendering
towards higher quality on the same settings.
- Path substitution rules have not been applied to the file names of
framebuffers. One of the effects of this bug was that the small stub file
for
imf_disp
interactive display has been created at the
correct location, but the framebuffer file has been saved somewhere else
or failed to save. Fixed.
- On Windows, fixed initialization of the noise table with changing
values for several mental ray invocations.
- For multihosted rendering, fixed possible crash at the end of the frame
for scenes using assemblies. Some scenes with BSP2 acceleration may be
affected as well.
- Fixed potential rare crash if mental ray was low on memory and flushed
parts of the scene.
- For integrated version of mental ray, fixed possible rendered tile
tag/memory leak in case of aborting rendering.
Shader changes:
- For architectural material shader, bump vector with zero first 2
component but not-zero 3rd component has not been applied, fixed.
Changes in version 3.7.53.0
Feature improvements:
- For the scene echo, if the value of an
miBoolean
is
neither miTRUE
nor miFALSE
, echo it as an
integer.
- Improved reaction time on rendering aborts, especially those during
finalgather precomputation stage displayed interactively. mental ray
kernel copies rendered tiles to the framebuffer asynchronously. The
outstanding tiles are no longer copied after abort signal.
- For progressive rendering, intercept invalid subsample size values
below 1.
- For MetaSL shaders, added support for light loops
light_dot_nl
, light_uv
,
light_area
and light_area_delta
state
variables.
- For MetaSL shaders, initialize
light_distance_limit
with
huge scalar.
- For MetaSL shaders, renamed some runtime header files.
- For MetaSL shader runtime, improve robustness of the tangent space
computation.
Bug fixes:
- Fixed a major memory leak regression in case of 8bit rendered images in
combination with virtual framebuffers (
-fb_virtual on
) and
interactive display (imf_disp
) attached.
- For hair rendering, fixed possible artifacts due to the hair radius not
taken into account when bounding boxes were computed.
- For ray-traced hair with motion blur, fixed possible rendering
artifacts due to too small bounding boxes used.
- Fixed rendering artifacts for objects with number of motion segments
higher than the global motion steps options.
- For scenes with assemblies, fixed possible freeze and memory leak on
assembly deletion at the end of the frame rendering.
- For ambient occlusion, fixed possible artifacts and assertion in the
debug version if a negative number of AO rays was requested or if a
negative importance factor has been used.
- For multihosted rendering used in heterogenous network, fixed possible
crashes when rendering scenes with finalgathering. The crash was due to
binary incompatibility of the network protocol for 32 and 64-bit
machines.
- For multihosted rendering, fixed possible rare crash due to
inappropriate pincounting.
- Fixed possible crash at shutdown if cached framebuffers (command line
-fb_virtual cache
) were used.
- For mental ray used with cached framebuffers (command line
-fb_virtual cache
) fixed possible short delays when multiple
tiles appears in display window in bunches. The tiles displaying is made
more uniformly in time.
- Fixed a regression in MetaSL compiler causing a crash during the
internal generation of shader declaration.
- For MetaSL shaders, added missing support for the
light_type
member of the light state
- For MetaSL compiler, fixed the order of handling for include files and
user types declared in such files.
- For MetaSL compiler, fixed generation of the code for matrix
operator*=
operators.
- For MetaSL compiler, fixed compilation of
Type t();
and
Type t=Type();
constructor expressions.
- For MetaSL shaders, fixed compilation of a shaders returning structs
containing substructs.
- For MetaSL CIL backend, fixed compilation of some matrix constructors
and 4-vectors constructed from a couple of 2-vectors.
- For MetaSL CIL backend fixed compilation of shaders with
int2
, int3
, bool2
and
bool3
parameters.
- For MetaSL shader integration, fixed possible memory corruption for
shaders and phenomena using textures and other parameters identified by
name.
- For MetaSL C++ backend, properly initialize array fields of structs in
the structs default constructor. This fixes a runtime crash if such
constructors were used.
- For MetaSL C++ backend, fixed illegal code generation: generate
user-defined types before functions defined in #include files.
- For MetaSL C++ backend, fixed possible illegal code generated for right
hand side swizzles.
Shader changes:
- For base and subsurface scattering lightmap shaders, significantly
reduced memory consumption for scenes with large triangles covering high
number of pixels in the lightmap mesh rendering.
- Fixed missing output passes in the
"mi_car_paint_phen_x"
phenomenon.
Changes in version 3.7.52.15
Bug fixes:
- Fixed conversion of scalar half-float textures.
- Added missing support for half-floats for pass files.
Changes in version 3.7.52.14
Feature improvements:
- On Windows platforms, avoid popup windows for integrated version of
mental ray library when external commands for shader compilation are
invoked. Affected are MetaSL shaders with CIL and C++ backend, as well as
shaders provided in form of C/C++ source code, as .obj object file and as
.lib static libraries.
When such external compiler, linker, CIL assembler or manifest
embedding is invoked, its output to stdout
is captured by
mental ray kernel and printed out as LINK module debug messages. The
output to stderr
is printed as LINK module error messages.
Some of the external tools put error-style messages into
stdout
, so for troubleshooting it is recommended to run
mental ray with debug output (-v 6
command line option for
mental ray standalone).
Bug fixes:
Shader changes:
- For MetaSL noise generation shaders, replaced currently not supported
swizzles in the parameter initializers with equivalent code without
swizzles.
Changes in version 3.7.52.13
New features:
Feature improvements:
- In mental ray options/camera info banner printed before rendering, use
semantics / name of the framebuffer instead of the framebuffer index.
- Improved performance of the DISP module in case
imf_disp
is attached to an image rendered with 16bit, float or half pixels. The
improvement is primarily relevant for progressive rendering. This
improvement does not apply to cached (tiled) framebuffers, which are not
recommended for usage with progressive rendering for general performance
reasons.
- For MetaSL C++ backend, implemented support for texture resources
specified as default MetaSL shader input parameter values.
Note that such textures need to be declared before including XMSL
files, like
filter 1.0 color texture "default.dds"
"MyDefaultTexture.jpg"
Due to the way mental ray parser works in the current version, it is
also required to explicitly terminate texture grammar before the
including msl/xmls files. This can be done with a "set
"
statement like:
set "MetaSL default textures provided" "on"
The latter limitation will be removed in the future versions
(fixed in 3.7.52.14).
- Output messages from MetaSL compiler are now given according to
compiler submodules, not "LIB" as in the previous versions.
- For MetaSL C++ backend, generate framebuffer access code only when
required. This removes frequent C++ compiler warning on unused
fb_index
variable.
Bug fixes:
- For mental ray 3.5 framebuffer compatibility interface, fixed wrong
handling of user framebuffers 6 and 7.
- For the second "talk" version of the DISP interactive display protocol,
fixed wrong image pixel depth. For the primary color buffer, the actual
pixel type used in the framebuffer is announced and sent through the
protocol.
If the primary framebuffer is known under multiple names, all names
are listed with the fb_list_name
command.
Fixed possible wrong indices for some framebuffers.
- For progressive rendering, fixed possible crash if rendering in a low
image resolution.
- For progressive rendering, fixed a crash if output shaders were
used.
- For standalone mental ray, fixed a crash if more than one
-texture_path
options was used on the command line.
- For recently added internal support for
half
type, added
missing clipping in mi_img_clip_color
function.
- For MetaSL compiler, fixed a crash if both input parameter initializer
and annotations were present.
- For MetaSL compiler, added missing constructors for Trace_options.
- For MetaSL compiler, fixed possible crash in nested switch
operator.
- For MetaSL compiler and backends, added missing
is_nan
and
is_finite
functions.
- For MetaSL compiler, fixed conversions between
float3
,
float4
, Color
and Spectrum
types.
- For MetaSL C++ backend, fixed possible broken generation of the code
for texture space access.
- For MetaSL CIL backend, fixed compilation failures for shaders using
ray types and light types.
- For MetaSL CIL backend, fixed compilation of shaders using
clamp
function.
- For MetaSL CIL backend, fixed compilation of shaders using
any
and all
functions.
- For MetaSL CIL backend, fixed compilation of shaders using
abs
function on integers and integer vectors.
- For MetaSL CIL backend, fixed string comparison operators.
- For MetaSL CIL backend, added support for member constructors and
destructors.
- For MetaSL CIL backend, fixed a regression for shaders using ray
types.
- For MetaSL shaders runtime, avoid asserts in creating local orthonormal
basis
- For MetaSL shaders runtime, request to unsupported value of type
float2
returned uninitialized value, added initialization
with zeroes.
Shader changes:
- Fixed MetaSL shader source code for shaders using reserved
keywords.
Known MetaSL limitations in this version:
- The following parts of MetaSL 1.0 specification are not supported by
mental ray 3.7+, and not planned to:
- Material Phenomena
- Techniques
- 3D and Cube textures
- MetaSL Spectrum is mapped onto mental ray color type
- Particle maps are not supported
- Some limitations on array and struct input/outputs apply. In
particular, output array parameters are not supported.
- Native functions
- Explicit shader invocation
- Derivatives and ray differentials
- mental ray shader parameter type is a subset of MetaSL type system. A
parameter type conversion mechanisms is applied which may result in
precision loss.
- Textures for default texture parameters need to be declared explicitly
before MetaSL shaders.
- MetaSL CIL backend has worse performance compared to C++ backend. C++
backend is the recommended solution.
- The following issues are known in this versions but planned to be fixed
in the mental ray 3.7+ final release:
- For input parameters of MetaSL shaders, initializers using swizzles
are not supported.
- Texture blur is not supported.
- Some of the light state members are not supported.
- CIL backend is less complete than C++ backend. For CIL backend,
default input texture parameters are ignored. Some of initializers
are not working properly.
- Switch between (precompiled) C++ shader backend and CIL backend is
global, not per shader.
Changes in version 3.7.52.12
Feature improvements:
- Implemented detection if a shader parameter has been assigned a value.
This mechanism is required in order to allow MetaSL shader input
parameter constructors which are not constant values. The order of
default values is:
- .mi file or mental ray API value of a shader
function.
- Default value of the input parameter in the MetaSL code.
- Default value of the input parameter in .mi file or mental ray API
shader declaration.
- Zero value / black.
In order to accommodate this changes, the i_is_connected
mi_is_connected
macro has been added. The
miFunction::has_connection
field has been added, which is
set if at least one shader parameter is connected.
Note that this change may affect shader binary
compatibility:
Old shaders using mi_eval
and mi_call
macro
for parameter evaluation will work with the new kernel without changes
and recompilation. For the performance reasons it is recommended to
recompile these shaders with the new shader.h
header
file.
Shaders which accessed internal ghost tags directly in order to check
for the connected parameters may require minor source code modification.
The mi_is_connected
macro should be used instead of direct
access.
- Implemented support for "half" (16-bit floats). Prior versions of
mental ray supported 16-bit-float OpenEXR textures, but the internal
representation used 32-bits. Native 16 bit representations saves almost
50% of memory occupied by textures.
Note that old .map textures of rgb_h/rgba_h image types are
binary incompatible with the new version of mental ray. If used,
such textures will be loaded into memory and converted, but they will not
be memory-mapped.
- For MetaSL C++ backend, implemented support for non-constant input
parameter initializers in MetaSL shaders.
- Reduced memory consumption of the MetaSL CIL backend code generator and
improved its performance.
Bug fixes:
- If compatibility framebuffer interface was used, user framebuffers 6
and 7 have not been written out correctly, fixed.
- For MetaSL compiler, add a warning for older MetaSL phenomena assigning
values to output parameters in XMSL files. These values are ignored.
- For MetaSL compiler, changes the names of texture samplers according to
the MetaSL specification.
- For MetaSL compiler, added missing implicit type conversion handling
for the conditional
"? :"
expressions.
- For MetaSL compiler, fixed a regression in compilation of
abs
, acos
and some other builtin functions.
- For MetaSL compiler, fixed comparisons operators for textures and
sampler.
- For MetaSL compiler, avoid assigning values directly to the xmsl
phenomena output parameters.
- For MetaSL compiler, fixed
operator %=
.
- For MetaSL compiler, fixed
vector *= matrix
and
matrix *= vector
operators.
- For MetaSL compiler C++ backend, fixed possible crash when arrays of
length zero were used.
Shader changes:
- For the
mip_render_subset
, fixed possible artifacts if
rendering of placeholder objects in combination with coverage framebuffer
filtering was used.
- For the production
mip_motionblur shader
, fixed possible
black stripe artifacts.
- For the paint shaders, the
mi_metallic_paint_output_mixer
was not linked into the library, fixed.
- For the architectural material shader, fixed possible NaN artifacts
originating from dot normal precision.
Changes in version 3.7.52.10
Feature improvements:
- Extended the second "talk" version of the DISP interactive display
protocol with the "fb_list_name" command. It lists currently active
framebuffers, one line per buffer:
fb_list_name: <framebuffer
index>,
<int image type> <image
type name with +-prefix, like +rgba>, <int
resolution_x> <int resolution_y>, <int
number of image components> <bits per pixel
component>, "<framebuffer_name>"
The framebuffer name is quoted. Also fixed a bug in
fb_list
command which did not list all the framebuffers.the
second version,
Bug fixes:
- For progressive rendering, fixed a possible crash in displaying
miscounted DISP tiles.
- For MetaSL shaders compiled with flattened enabled, fixed missing
compilation of light shaders.
- For MetaSL compiler, added missing implicit type conversion handling
for the conditional
"? :"
expressions.
- For MetaSL C++ backend, avoid a compiler crash if no main method is
present in a shader source.
- For MetaSL C++ backend, added missing support for shader static member
constructors.
- For MetaSL CIL backend, fixed wrong code generation for
switch
used with non-consecutive enum case
labels.
- For MetaSL CIL backend, fixed generation of the code for construction
of matrices from matricide of some other dimensions.
- For MetaSL CIL backend, fixed generation of the code with changed
capitalization of texture sampler methods, follows recent MetaSL
specification adjustment.
Shader changes:
- For the
mip_metallic_paint(_x)
shader, fixed wrong
illumination if multiple area light sources are present in the scene.
- For the production
mip_rayswitch_stage
shader, fixed
declaration apply mask.
Changes in version 3.7.52.9.
Bug fixes:
- Fixed a crash for MetaSL shaders using
Spectrum
type.
- For MetaSL shaders, added support for input initializers with direct
state variable assignments (like
input: a = normal;
). Note
that in this version such initializers may overwrite the explicit (not
connected) value for parameters provided by mental ray API / .mi
syntax.
- For MetaSL shaders, added support for default-to-state annotations.
Note that this mechanism is deprecated, support for shader parameter
initializers will follow.
- For MetaSL CIL backend, fixed possible running out of memory crash if a
large number of shaders need to be compiled.
- For MetaSL CIL backend, fixed broken code generated for matrix
constructors.
- For MetaSL compiler, fixed broken code produced for struct input
parameters containing textures.
Changes in version 3.7.52.8
Bug fixes:
- For multihosted rendering, fixed possible odd warning on unfreezing
camera.
Changes in version 3.7.52.7
Feature improvements:
Bug fixes:
- For builtin architectural material BSDF, fixed too low reflections
under the Fresnel layer.
- For MetaSL shaders, fixed usage of info,warning,error functions in free
(non-shader) functions.
- For MetaSL shader light loops, the
get_light_parameter()
function returned true even if the parameter did not exist. Fixed.
- For MetaSL shade light loops, pass light direction properly.
- For MetaSL shaders, fixed a regression in shadow shaders: the
transparency value was taken as a result instead of applying it as
multiplier.
- For precompiled MetaSL shaders, fixed generation of shader declarations
with no inputs.
- For precompiled MetaSL shaders, fixed generation of shader declarations
with inputs in "float a, b;" style.
- For MetaSL shaders, fixed compilation of implicit texture to boolean
conversion.
- For MetaSL CIL shaders, fixed wrong code generated for assignments to
vector elements selected by indexing.
- For MetaSL shaders compiled to C++, fixed possible broken generated C++
code in array initialization.
- For MetaSL compiler, fixed possible crash when an input parameter was
declared as an unsized array with no initializer.
- Fixed some memory leaks in MetaSL compiler.
Changes in version 3.7.52.5
Feature improvements:
- Improved error reporting for MetaSL phenomena.
Bug fixes:
- For multi-hosted rendering of scenes with BSP2 accelerations, fixed
possible crash in rendering of second and subsequent frames.
- On Windows platforms: for multi-hosted rendering of scenes with BSP2
acceleration, fixed possible freeze in rendering of second and subsequent
frames.
- Fixed a crash if photon map diagnostic was used in combination with
-photonmaps only
command line option or the corresponding
rendering mode for integrated versions.
- For precompiled MetaSL shaders, fixed normal connection for bump
shaders.
- For MetaSL shaders running in precompiled mode, fixed a crash for
phenomena having multiple outputs.
Changes in version 3.7.52.4
Feature improvements:
- Improved performance and scalability of progressive rendering.
- For MetaSL shaders, improved support for ray type.
Bug fixes:
- For ccmesh objects, improved possible artifacts originated from
insufficient numerical prevision of derivatives.
- Fixed double contribution of the environment lighting if finalgather
and IBL has been enabled.
- For progressive rendering, fixed wrong broken handling of events.
- For MetaSL BSDF shaders, avoid shooting unneeded rays in the rendering
kernel.
- For MetaSL compiler, fixed several bugs in MetaSL phenomena, including
crashes of loading of some
.xmsl
files.
- Fixed initialization of arrays inside of MetaSL phenomena. This affects
MetaSL internal nodes only, mental ray shader parameters do not support
initializers.
Changes in version 3.7.52.3
Feature improvements:
- For high resolution images rendered with finalgather, substantially
reduced the amount of continuous memory needed by multi-pass finalgather
precomputation. This allows for bigger images to be rendered if memory is
fragmented.
- For MetaSL shaders, MetaSL shader parameters of type
float2
are now mapped to mental ray API parameter type
miVector
. float4
maps to miColor
.
int2/3/4
and bool2/3/4
map to
miVector
(for 2 and 3 values) and miColor
(4
values), respectively. MetaSL matrices of all types are mapped to
miMatrix
.
- In the MetaSL CIL backend, a number of missing MetaSL features have
been implemented. This includes (but is not limited to):
- assignment to state variables
- fetching multiple outputs of a shader in a trace call
- texture members
- texture samplers
- ddx and ddy
Beyond this various bugs have been fixed, most notably in the code
generated for swizzles, the mapping of some types and operators, and in
the handling of implicit conversions.
- For precompiled MetaSL shaders, shading graph connections to normals
and positions are now supported to allow for effects such as bump mapping
and normal mapping.
Bug fixes:
- For multihosted rendering, fixed memory leaks on slave hosts that
occurred after frame 1 in case multiple frames were rendered. When BSP
acceleration was used, these leaks were significant.
- For multihosted rendering, fixed distribution of MetaSL CIL shaders. In
order to use the CIL backend, all slaves hosts must run under Windows.
- In the MetaSL compiler, fixed a possible memory corruption which
occurred in multihosted network rendering, or debug versions of the
compiler.
Changes in version 3.7.52.2.
Feature improvements:
- For MetaSL shaders, added support for Lambert BSDF.
- For the API consistency reasons, renamed classes called
Type_access
resp. Type_edit
to Access_type
resp.
Edit_type
. Corresponding typedefs are provided for
compatibility.
- In debug version of mental ray: for MetaSL CIL backend, generate
debugging information.
Bug fixes:
- Fixed possible shadow artifacts in Image Based Lighting (IBL).
- For MetaSL compiler, fixed missing arguments casts in constructors, in
particular
Color(0, 0, 0, 1)
is fixed.
- For MetaSL compiler, implemented missing % (mod) operator.
- For MetaSL shades the glossy component for direct_light function has
been computed without testing the occluders of the environment,
fixed.
- For MetaSL CIL backend, fixed texture samplers with filtering. Fixed
several further issues.
- Platform specific: on Linux platforms, no longer link libgcc
statically. This has caused crashes in exception handling of MetaSL
compiler for some cases then Linux distribution where mental ray has been
compiled and executed were different.
Changes in version 3.7.52.0.
Feature improvements:
- Introduce C++ API for Catmull-Clark mesh subdivision surface geometry
for access and manipulation from shaders. The interface is provided in
the new header file
shader_sds34.h
which is automatically
included by shader.h
when using C++ compilers.
- Reduce peak memory consumption for finalgather progressive preview.
- Performance improvement in the progressive rendering mode to achieve a
desired quality in less time.
- Add motion blur to be rendered in progressive mode.
- For MetaSL shader graphs and phenomena provided in
.xmsl
files, added support for constructing the actual phenomenon in mental ray
instead of compiling it into a single mental ray shader. This allows to
support MetaSL phenomena that are built externally (like in mental mill)
but rendering with shader nodes which have been pre-compiled (from native
or MetaSL source code) and pre-loaded into mental ray. This feature
explicitly avoids runtime compilation of MetaSL shaders or phenomena.
Note, that this behavior is enabled by default. It can be
disabled defining the registry key
{_MI_REG_METASL_EMULATE_MI_PHEN}
and setting its value to
off
.
- For MetaSL shaders, implement support for conditionals on scalars and
vector values expressions.
- For MetaSL shaders, implemented
Texture_info
class.
- For MetaSL CIL backend, implement support for shadowing from MetaSL
light shaders.
Bug fixes:
- Fix a bug leading to crashes when using multiple finalgather map
files.
- For MetaSL CIL backend, fix problems when accessing files in temporary
directories with a name that contains spaces.
- For MetaSL support, fix recognition of registry keys together with
their actual values.
- For MetaSL CIL backend, fix more bugs in code generation on both 32bit
and 64bit reducing the potential for CIL compilation errors or .NET
runtime crashes.
Shader changes:
- For architectural material shaders, avoid artifacts when using
anisotropic effect in extreme conditions by raising accuracy of
computations.
- For architectural material shaders, fix uninitialized output values
leading to false color artifacts in certain cases.
- For production shaders, fix display order of finalgather shooters to be
top-left-to-bottom-right.
Changes in version 3.7.51.0.
Feature improvements:
- Add new command line option
-progress_frequency n
and
remove former support for an optional second argument to
-verbose
. This option allows to control the frequency of
percentage progressive messages. For example, -verbose 5
-progress_frequency 10
command line would result in printing
progress messages for approximately each 10 percent.
- On Windows platforms, remove temporary cached framebuffer files is ray
executable is killed.
- For MetaSL shaders, implemented support for BSDFs (BRDFs).
- For MetaSL shaders, implement proper support for ray types in trace
functions.
- For MetaSL shaders, improve performance for frequent access to shader
states.
- For MetaSL CIL backend, implement support for unary operators.
- For MetaSL CIL backend, implement support for various texture lookup
functions.
- For MetaSL CIL backend, implement support for missing transformation
functions.
- For MetaSL shaders, re-enabled message passing across trace() and other
functions, which has been temporarily disabled in version 3.7.50.10.
- For MetaSL shaders, enabled message passing for light loops.
Bug fixes:
- Reduced the memory consumption for final gather progressive preview.
- Fixed return value of query
miQ_NUM_TEXTURES
for hair
objects with placeholders.
- Fixed possible crash if a phenomenon evaluation was attached to a BSDF
slot. In particular, this could be the case when BSDFs were used in
combination with Irradiance Particles.
- For MetaSL shaders, fixed tracing a ray done instead of environment
lookup if
trace
function was called with environment ray
type.
- For MetaSL shaders, fixed shader compilation error if variable length
array parameter was used.
- For MetaSL shaders used as shadow shaders, fixed a crash in MetaSL
shader with
"transparency"
parameter of type float was
used.
- For MetaSL CIL backend, fix various bugs in code generation reducing
the potential for CIL compilation errors or .NET runtime crashes.
- For MetaSL CIL backend, fixed shader compilation if temporary directory
file name contained spaces.
Changes in version 3.7.50.15.
Feature improvements:
Bug fixes:
- For the BSP2 acceleration used in combination with motion blur with
multi-segment moving geometry, fixed possible artifacts due to improper
computation of the motion segment time interval.
- For non-rasterizer rendering modes, clean up the opacity used by
mi_opacity_get
function for each sample.
- For MetaSL shaders, support enabling/disabling environment
properly.
- For MetaSL CIL backend on 64-bit Windows, generate 64-bit shader
libraries instead of 32-bit ones.
- For MetaSL CIL backend, fixed light iterators.
- For MetaSL CIL backend, implemented missing array support.
Shader changes:
- For architectural, paint, production, subsurface and base shaders,
miState::importance
is now used consistently instead of the
miIM
key for
mi_shaderstate_set/mi_shaderstate_get
functions. This
provides interoperability with MetaSL shaders and improves performance
slightly.
- Improved performance of the
mip_matteshadow
shader by
avoiding unnecessary mi_flush_cache
calls.
- For the mip_matteshadow shader fixed possible finalgather light leak
artifacts by using an individual id in order to restrict the finalgather
map lookup (
miIrrad_options
::id
has been
introduced in version 3.7.50.4).
Changes in version 3.7.50.14.
Feature improvements:
- For the Image Based Lighting (IBL) introduced in version 3.7.50.11,
allow to access the build-in environment light by the name
"
builtin_light_env_inst
". This allows to use IBL in the
explicit light lists.
Bug fixes:
- Fixed possible crash if
miRC_TO_SPIRAL
rendering tile
order was used. Regression in version 3.7.50.11.
- For MetaSL CIL backend, fixed enumerations and structs.
Changes in version 3.7.50.13.
Feature improvements:
- For lens shaders used with the rasterizer, initialize
miState::point
, miState::dist
and
miState::dir
according to the closest hit the closest
hit.
Bug fixes:
- For MetaSL CIL backend, fixed crash in compilation of shaders with no
input parameters.
- For MetaSL CIL backend, fixed LHS (left hand side) swizzles.
Changes in version 3.7.50.12.
Known limitation is this version: MetaSL CIL backend can crash for shaders
with no input parameters, fixed in 3.7.50.13.
Feature improvements:
- Changed the license scheme for multi-core CPUs. The limit of 2 or 4
cores per CPU is removed.
Bug fixes:
- Fixed a crash in the integrated versions of mental ray using mental ray
3.5 compatibility framebuffer interface. Regression in version
3.7.50.9.
- Fixed possible infinite recursion in the error handline of broken PNG
images.
- For MetaSL CIL backend fixed static functions, fixed component
selection and swizzling on vectors.
Changes in version 3.7.50.11.
A temporary CIL backend usage example has been added to
common/doc/tutorials/metasl_cil_backend
.
New features:
- Built-in Image Based Lighting (IBL).
Though image base lighting is implemented in some of OEM shader
packages, built-in solution is more efficient and does not require
efforts to be invested atop of mental ray kernel to develop corresponding
shaders.
IBL can be enabled by setting the string option "environment
lighting mode
" to the value "light
" (further modes
will possibly be made available in the future). The "environment
lighting quality" <float>
string option with a floating
value in range from 0.0 to 1.0 can be used to control the quality of the
image, with 1.0 been the highest quality.
If used, mental ray would create an internal light of a "user" type
and use this light in the light lists according to the conventional
lightlist inheritance rules. mental ray kernel would also presample the
environment, create a lookup acceleration structure and use importance
driven adaptive sampling to obtain the environment light to the scene.
IBL can be combined with progressive rendering,
Feature improvements:
- For finalgather precomputations, the progress report percentage
messages are not joined for all passes.
- Added new include file
intrinsics.xmsl
. For scenes using
intrinsic MetaSL shader nodes as parts of shading trees and
.mi
files phenomena, this file need to be to generate
internal intrinsic shaders declarations.
- The
mi_color_filter_lookup
function called on an image
with a negative filter value would return unfiltered value of a single
image pixel. This allows to combine unfiltered image lookup in existing
shaders.
- For MetaSL shaders, added support for filter types "
none
"
(unfiltered) and "data
".
- Shader libraries specified on mental ray command line have been loaded
before parsing of the rayrc config file, changed to take config file into
account.
- For
mi_query
modes miQ_GROUP_KID
,
miQ_GROUP_NKIDS
, miQ_GROUP_LABEL
,
mIQ_GROUP_DATA
, and miQ_MERGE_GROUP
check that
the database tag passed is of the miSCENE_GROUP
type and
return false otherwise. This fixes potential crashes in case of
inappropriate i_querymi_query
usage.
Bug fixes:
- Platform specific: if cached framebuffer are used, create the temporary
file with FILE_FLAG_DELETE_ON_CLOSE flag to assure proper file deletion
if case of application abort or crash.
- For mental ray library integrations, fixed a problem in memory
management. If mental ray was running low on memory and a memory block
allocation failed, in some cases mental ray kernel failed to call the
application callback registered with
mi_mem_set_flush_failure_cb
().
- On Windows platforms fixed possible crash in rendering abort if
memory-mapped or cached framebuffers were used (regression in version
3.7.50.5).
- Debug version only: removed incorrect assert in rendering of some large
scenes with BSP2 acceleration.
- For MetaSL C++ backend, fixed output types for shaders with multiple
outputs.
- For MetaSL CIL backend, a crash in compilation of a second shader.
- For MetaSL CIL backend, pass shader input parameter values
properly.
- For MetaSL CIL backend, fixed compilation of variable declarations of
types
bool
, int
, float
and
float3
.
- For MetaSL CIL backend, fixed compilation of
Light_iterator
and Sample_iterator
.
- For MetaSL CIL backend, fixed compilation of
Trace/Occlusion/Irradiance_options
and most of their
methods.
Shader changes:
- For production shaders, added new shader
mip_rayswitch_stage
. It takes one of several color
parameters named after mental ray rendering stages (tile rendering,
finalgather precomputing, globillum/caustic photon emission, lightmapping
etc.) and returns one corresponding to the current rendering stage.
- For production shaders, added new shader
mip_fgshooter
.
This special lens shader simplifies precomputation of finalgather map for
animation renderings. For tile rendering, it just passes the
mi_trace_eye
call with no further effects. For the
finalgathering precomputation stage though, it takes the array of
matrices passed as parameter and applies them as camera transformations.
When, it shots an eye ray according to each of the transformations. That
way, mental ray kernel registers importance of irradiance on the surfaces
visible to any of the camera transformations and computes finalgather
points accordingly. The "mode
" parameter controls for the
pre-visualization of finalgather precomputations. For the
mode
value 0, views from multiple cameras are painted in the
same image side-by-side. For the mode
value 1, an average
image from multiple cameras is displayed. For the mode
value
3, the image for the camera in the scene DAG is displayed (note that this
mode also influences finalgather point distribution). The mode parameter
is experimental and may change in the future versions.
Changes in version 3.7.50.10.
New features:
- Initial implementation of the MetaSL CIL (.NET) backend on Windows
platforms.
Integrated MetaSL compiler does not generate binary code
representation itself: instead, the C++ backend generates C++ code and an
external C++ compiler and linker is invoked to generate a DLL linked back
into mental ray process. Though compilers are typically installed on
Linux and MacOSX systems, this is not the case for Windows platforms. In
order to avoid the requirement on the external C++ compiler with
corresponding installation and license issues, the CIL backend is
currently being developed.
The MetaSL CIL backend generates .NET (CIL) assembly code. An external
Microsoft .NET 2.0 (or optionally a higher version) CIL assembler
executable is invoked on that .cil
file and generates a
managed code DLL. The assembler is a part of Microsoft .NET Framework
redistributable package, so no installation of a C++ compiler is
required.
To enable CIL backend, the {_MI_REG_METASL_CIL}
mental
ray registry variable need to be set to any non-empty value. By default,
the C++ MetaSL backend is used. MetaSL using CIL is supported on Windows
platforms only.
Current version is extremely incomplete and can be used for
demonstrational and workflow experimental purposes. Only simplest shaders
like constant color shader would work in the current version. variables
(l In particular, integer and float type [fixed in version 3.7.50.11],
generation of state functions (like trace()
), writing to
state variables (like normal
for bump shaders), free
functions, functions with varargs,
Trace/Occlusion/Irradiance_options
, structs, arrays,
color/vector component selections and swizzles have not been implemented
yet.
Note also that the (temporary) DLL files generated by CIL backend use
__stdcall
linkage convention. Current version of mental ray
does not expect this convention unless it knows that the DLL just has
been generated by it. An attempt to load such generated file in a
different mental ray process would cause a crash.
Feature improvements:
- Added a possibility to control the frequency of percentage progressive
messages. The
-v
/ -verbose
command line option
gets an optional second argument specifying the frequency in percent. For
example, -v 5 10
command line would result in printing
progress messages for approximately each 10 percent. Note: this command
line option has been replaced with -progress_frequency n
options in version 3.7.51.0.
- Added function
mi_get_metasl_interface
to get new
mi::shader::Metasl_interface
class with API for generated
MetaSL shaders. This API is not intended to be used by shaders written in
C/C++. The getMetaSLState
method of the
mi::shader::Interface
class is removed. This provides a
clean separation of C/C++ and MetaSL interfaces.
- For the BSP2 acceleration, significantly decreased the amount of memory
used for BSP tree construction on 64-bit machines.
- For the BSP2 acceleration, use the approximate number of triangles per
object if provided by .mi file / translator. This improves BSP2
performance vs. memory consumptions for scenes with placeholder objects
and with a lot of objects consisting of few triangles.
- For MetaSL shaders, the
{_MI_REG_METASL_DEBUG_CPP}
registry key added in version 3.7.0.8 is disabled. Instead, the
{_MI_REG_METASL_TRACE}
registry key is now supporting t
disable the removal of the temporarily generated C++/CIL files and emit
more debug information.
- For
mi_kdtree_lookup
function, allow
miKdtree_lookup_callback
to be null, which may be useful if
only the effective radius of the lookup is of interest.
Bug fixes:
- Fixed possible pyramid texture filtering artifacts in the rasterizer.
The
miState::raster_x/y
coordinates in the lookup were 0.5
(sub)pixel off the corresponding miState::point
, which
sometimes led to a wrong pyramid level selected.
- For OpenEXR images, fixed possible wrong image output types, such as
single channel floating point (
s_fp
) used instead of half
(s_h
), as well ass rgba_h
used instead of
rgb_h
.
- Messages from MetaSL integration are printed for "RMSL" module instead
of "LIB".
- For MetaSL shaders, resolved the error message on unknown depth of
field ("state variable 37").
- For malformed scenes containing light lists with instances referring to
non-existing lights, fixed possible null tag access fatal.
Shader changes:
- For multipass rendering, fixes possible artifacts in metallic paint
shader.
Known limitations in this revision:
- For MetaSL shaders, message passing across trace() and other functions
has been temporarily disabled in order to unify C++ and CIL backends.
Restored in version 3.7.51.0.
Changes in version 3.7.50.9.
Feature Improvements:
- Added
mi_query
mode miQ_FUNC_PARAM_LOOKUP
. A
pointer to the string (char *) containing the name of the shader
parameter, and the type of the parameter (miParam_type
enum)
should be passed as varargs of mi_query
. The result argument
pointer of mi_query
is initialized with the shader parameter
value if the named shader parameter is found and the value is not
connected to be an output from other shader.
- For MetaSL shaders sampling lights, implemented
get_light_parameter()
method.
Bug fixes:
- For the BSP2 acceleration, use static BSP2 trees if the shutter
interval is zero, even if motion vectors are required.
- For the finalgather interpolation lookup to a restricted finalgather
point set introduced in version 3.7.50.4, fixed the
miIRRAD_DEFAULT
macro to initialize the id
option properly. This fixes unpredictable finalgather lookup results for
shaders compiled with shader.h
header file taken from
versions 3.7.50.4 to 3.7.50.8.
- For finalgathering used with BSP acceleration and volumetric shaders,
fixed possible shading artifacts due to
miState::dist
not
initialized to zero if finalgather ray misses geometry.
- For OpenEXR output images specified with mental ray 3.5 output
compatibility syntax, fixed broken compression type always set to
"
rle
".
- For the SPM-protected version of mental ray: fixed possible failure to
acquire necessary number of licenses if more than one SPM server host has
been specified, one of the SPM servers crashes or shuts down and none of
the other SPM servers has sufficient number of licenses so that the
licenses need to be collected from multiple hosts.
- Fixed possible crash or allocation of large memory block fatal on
loading a MetaSL shader.
Changes in version 3.7.50.8.
Feature Improvements:
- For ccmesh objects with large faces, implemented pre-splitting of such
faces for more efficient tessellation and displacement.
- For MetaSL shaders, added
{_MI_REG_METASL_DEBUG_CPP}
registry. If set, the temporary generated C++ files are left over (the
behavior of version 3.7.50.7 and prior), otherwise the C++ files removed.
(Starting with version 3.7.50.10, use the
{_MI_REG_METASL_TRACE}
registry for this).
- For the progressive rendering DISP interface, no longer send frame
end/begin event between subsequent passes.
- Added support for cached framebuffers in the progressive rendering
mode. The combination is not recommended for performance reasons
though.
Bug fixes:
- For scenes with assemblies and incremental changes, fixed possible
crash at the beginning of the second frame.
- Fixed possible crash in incremental changes of scenes with
assemblies.
- For rendering with anisotropic BSDFs, fixed wrong orientation of
highlights.
- For MetaSL shaders in windows platforms, fixed embedded manifest.
- For MetaSL shaders, fixed a fatal of 1D texture was used.
- Platform specific: on Linux in the binary echo mode fixed broken echo
of vector data.
Changes in version 3.7.50.7.
Feature Improvements:
- For MetaSL shaders, the library paths (default and specified with the
{_MI_REG_LIBRARY}
registry and -ld_path
command
line option) are passed to the linker automatically. On Windows platforms
it is recommended to add a path to the directory containing the
shader.lib
file in order to avoid specifying the full file
name with the -ld_libs
command line option.
Bug fixes:
- Fixed a possible crash in the integrated version of raylib.
- For MetaSL shader compilation, added quotes around include and link
paths in the compiler invocation. This resolves MetaSL compilation errors
if default installation has been applied on Windows platforms.
- For MetaSL shader compilation, do not protect compiler/linker command
name with the quotes. On Windows platforms, this resolved the compiler
invocation failure by CMD.EXE shell, which printed "The input line is too
long" error message.
- For the new temporary framebuffer file handling added in version
3.7.50.5, fixed possible cleanup failure if the rendering abort was
handled by the net thread.
Changes in version 3.7.50.6.
Bug fixes:
- Fixed possible artifacts and NaN warnings for rendering of scenes with
anisotropic BSDFs, such as Ashikhmin and architectural.
- For MetaSL shaders, fixes the scheme for temporary file names. The old
one allowed only a limited number.
Changes in version 3.7.50.5.
New features:
- Added progressive rendering mode. There are two versions of this mode
planned, for usage with mental ray conventional shaders for maximal
compatibility with conventional mental ray rendering, and with build in
BSDFs for maximal performance / fastest response.
This version of mental ray enables the mental ray shader compatible
mode. This mode is compatible with finalgathering (in particular, with
progressive finalgather precomputation), photon mapping and other
techniques.
In the progressive mode, samples are placed sparsely (few samples per
pixel or even one sample for several pixels), and the result is displayed
immediately if an interactive display using the DISP protocol is
attached. For the fastest response times, the first pass is usually
computed with less than 1 sample per pixel. Additional samples are
computed in the subsequent passes and the accumulated framebuffer tile is
re-displayed interactively.
User may decide to stop rendering once the desired quality is
reached.
Progressive mode can be enabled with the string option
"progressive" on
, or with the command line option
-progressive on
(default: off).
The "progressive max samples"
<int>
string option and -progressive_max_samples <int>
command line option can be used to specify the number of samples per
pixel after which rendering will stop automatically.
The "progressive subsampling size" <int>
string
option and -progressive_subsampling <int>
command line
option (default: 1) can be used to specify the sample density in several
initial passes. If set to N, approximately one sample for each N*N pixel
tile per pass will be used.
Feature improvements:
Bug fixes:
- For the BSP2 acceleration, fixed possible artifacts or crashes due to
wrong triangle indices used in scenes with multiply-instanced objects
containing large number of triangles.
- Put some of the memory blocks in BSP2 acceleration and Irradiance
Particles under mental ray memory management / statistics.
- For ccmesh objects with displacement, apply vertex displacement for the
estimation of subdivision level to be used. This solves possible shading
artifacts for object areas close to the camera plane.
- Fixed possible crash for scenes with assemblies when incremental
changes have been applied to the scene.
- Removed unintended dependency of caustic photon map on importon map.
This improves the visual quality of caustics.
- Fixed a file descriptor leak in scenes using IES or Eulumdat light
profiles. For scenes with many or with changing lightprofiles this could
cause severe problems due to running out of file descriptors.
- For MetaSL shaders, fixed possible artifacts due to wrong default
parameter values used.
- Fixed echo of default shader parameter values for parameters declared
textually after an array one.
- Fixed broken echo of object faces.
- For the new progressive finalgather precomputation, fixed possible
artifacts due to improper placement of adaptive points. The amount of
jittering is slightly increased to improve the distribution quality.
Fixed progressive visualization artifacts on the edges of pseudo-tiles.
Fixed intensity artifacts for pseudo-tiles showing both objects with
diffuse material and background environment.
- For the new progressive finalgather precomputation, fixed statistic
info messages.
- For the new progressive finalgather precomputation, fixed possible
missing DISP tiles due to a wrong number of tiles expected.
- For the new progressive finalgather precomputation, fixed possible
crash for rendering second and subsequent frames.
- Platform specific: on Windows (32 and 64 bit), the vararg argument for
mi_query
mode miQ_TEXTURE_DIM
has not been
passed properly to the kernel, which caused crashes on 64-bit platforms.
Fixed.
Shader changes:
- The base shader
mib_illum_ward_deriv
is extended to
support derivatives on all geometry types, using "bumps" (texture
derivatives) if available for NURBS and polygonal surfaces and surface
derivatives for subdivision surfaces and NURBS. The source code of the
get_derivs()
function is a recommended illustrative example
for shader writers.
Changes in version 3.7.50.4.
Feature improvements:
- Multi-pass finalgather precomputation visualization has been
implemented.
The finalgather precomputation image report can be enabled with the
-finalgather_display on
command line option or with the
miRENDER_DISPLAY_FG
bit in the rendering mode mask. Unlike
in mental ray 3.7 and prior, the computation is split into several
passes, each one refining the previous ones. The finalgather
precomputation 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, single pass
finalgather progressive display can be enabled with the string option
"finalgather precomp legacy"
.
- For finalgathering, 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.
- For the imf_disp tool, added
-layer <name>
command
line option for displaying of OpenEXR files. When rendering OpenEXR
images containing multiple framebuffers, mental ray stores framebuffer
images in channels called <framebuffer name>.R
,
<framebuffer name>.G
, <framebuffer
name>.B
and <framebuffer name>.R
. In order
to display one of those framebuffer images, the <framebuffer
name>
without suffix could be used with the -layer
option.
Bug fixes:
- For MetaSL shader compilation on Windows, remove manifest files form
the temporary directory.
Changes in version 3.7.50.3
Feature improvements:
- For multiply-instanced objects inside of assemblies, share the
tessellated geometry for non-view-dependent objects. Note that sharing
objects need to be a part of the same assembly.
- Added new carpaint BSDF with the arguments as below:
declare shader color "builtin_bsdf_carpaint" (
color "base_color" default 1 0 0 1,
color "reflectivity0" default 0.1 0.1 0.1 1,
color "reflectivity90" default 0.3 0.3 0.3 1,
scalar "fresnel_falloff" default 5,
scalar "metallic" default 0.3,
color "metallic_color" default 1 1 1 1,
scalar "metallic_falloff" default 8,
color "edge_color" default 1 0 0 1,
scalar "edge_falloff" default 2,
scalar "unit_scale" default 1,
scalar "sparkle_weight" default 0.05,
scalar "sparkle_falloff" default 1,
integer "mode",
array light "lights")
end declare
- For MetaSL shader compilation, the MI_DLL_IMPORT define on the compiler
line is not longer required, moved to the include headers. The RAY define
is no longer used and is removed.
- For MetaSL shaders compiled on Windows platforms, include manifest file
into the compiled DLLs. This may be necessary when the compiler version
installed on the user system differs from one used to build mental
ray.
- For MetaSL shaders, the C++ compilation and linkage is now done on
demand. For shader declaration, parsing and analysis of the MetaSL source
code is done when MetaSL file is loaded.
- For network rendering, compilation of the MetaSL shaders on the
slave/satellites is enabled.
- Work in progress: for shading trees defined in mental ray scene files,
implemented the first version on the shading tree flattening, which
combines shaders by connecting parameters, and compiles the composite
shader. The flattening is possible for shading trees and mental ray
phenomena completely consisted of MetaSL shaders (i.e. no mixture with
C/C++ shaders). The flattening can be enabled by setting the
{_MI_REG_METASL_FLATTEN}
registry to a non-empty value.
Known limitations in this version:
- In the current version, the feature is provided to the compilation
testing only. mental ray kernel does not call the flattened shaders
(Fixed).
- Textures are not supported for the flattened shaders yet
(Fixed).
- Flattened shaders are compiled immediately, not on demand
(Fixed).
Bug fixes:
- For OpenEXR headers, fixed possible crash when reading images of types
a
, a_h
, a_fp
, m
,
n
and z
.
- Export
mi_api_get_assembly_root
function properly for
geometry shaders.
- For MetaSL shaders, apply include search path for the includes from
MetaSL (.msl/.xmsl) files.
- For MetaSL shaders: command line used for compiler and linker
invocation has been limited to 512 bytes, fixed.
- For MetaSL shaders: use state of the art compiler and linker options on
MacOSX platforms.
- For MetaSL shaders, do not echo derived shader declarations.
Changes in version 3.7.50.2
Feature improvements:
- For the BSP2 acceleration, added functionality to reduce allocation of
large amount of memory during the construction of the BSP2. For large
scenes this may prevent mental ray from running out of memory for
geometry where the kernel heuristic estimating the number of triangles in
a voxel fails by an order of magnitude.
- Removed dependency of the MetaSL shaders compiled to C++ on the
STL.
- For the MetaSL shader compiled with C++ compiler on windows platforms
for mental ray debug executables: added
/debug
and /Z7
compiler/linker keys to keep the
debug information.
Bug fixes:
- For rendering of scenes with assemblies and hair, fixed possible
missing hair artifacts.
- During the importon emission from the camera, avoid calling
miCamera::volume shader. Importons need to be proceeded with photon
volume shaders, not with a volume shader attached to the camera. In
particular, this fixes possible empty irradiance particle map issue.
- For the MetaSL shader compilation added missing MI_DLL_BUILD define
passed to the C++ compiler.
- For the debug version of mental ray compiled on windows platforms,
compile shaders with
/MDd
key. This fixes the message box
pop-up when a MetaSL shader was used with mental ray debug executable.
Added /debug
and /Z7
compiler/linker keys to
keep the debug information.
- Fixed a rare crash in the object splitting code coming from
out-of-range array read.
- Fixed running out of memory in parsing of surfaces with very high
number (50000) of trimming curves.
- Fixed several memory leaks in MetaSL compiler and its integration.
- Fixed a linkage errors if
Access_bsdf
was used in a
shader.
- Ignore empty strings passed to the C++ compiler (an empty string cleans
up C++ compiler include path list).
- For MetaSL shaders, added missing eye ray type.
- Fixed a crash in mental ray when writing out images of
"vta"
, "vts"
, "tag"
or
"bit"
types into OpenEXR files.
Changes in version 3.7.50.1
New features:
- MetaSL compiler has been integrated into mental ray.
If a file with .msl
or .xmsl
extension is
included ($include
statement in .mi
file), it
is treated as a MetaSL shader source. mental ray would read it, parse and
convert it into the internal representation. This internal representation
is when used to create a shader declaration and to generate shader C++
code. The external C++ compiler and linker are invoked in that file and
create a dynamic linked library in the directory containing temporary
files. That DLL is when linked into mental ray.
For windows platforms, it is planned to generate the
managed code directly, which would remove the
requirement on the C++ compiler installed.
In order for C++ compilation to succeed, the C++ compiler need to be
pointed to the include directories containing mental ray headers files
(shader.h
and others), as well as MetaSL C++ header files
(root directory for mi/metasl_runtime/*
). In order to
simplify it, mental ray now applies the mental ray kernel include path to
the compiler invocations automatically. I.e., the include paths may be
specified on the mental ray standalone command line option
-I
, or with {_MI_REG_INCLUDE}
registry.
On windows platforms, shaders need to be linked against
shader.lib
or ray.lib
. If
shader.lib
is not present in the compiler library search
path, it has to be specified with -ld_libs
and/or
-ld_path
command line options.
Known issues and limitations:
- For windows platforms, it is planned to generate
managed code for MetaSL shaders directly to avoid
requirement of C++ compiler installed. This is work in progress.
- It is planned to collapse shading trees consisting exclusively of
MetaSL shaders at compilation time, this is not fully implemented
yet. (Partial implementation exposed in version 3.7.50.3. This is not
a default mode in mental ray 3.7+.)
- Network rendering with MetaSL shaders will not work yet (fixed in
version 3.7.50.3)
- Multiple MetaSL features are not or partially implemented yet
(fixed, with few exceptions).
- C++ and .xmsl/.msl files are not removed from the temporary file
directories.
- Unnecessary compiler invocations are done to assure functionality
testing. This may result in reduced performance (fixed).
- MetaSL compiler memory is not cleaned up properly at shutdown
(significant memory leaks fixed).
Feature improvements:
- Changed transformation inheritance for leafs inside of assemblies.
Assembly leaf instance transformation is now multiplied properly with the
object leaf instance transformation inside of assembly.
- For the command line options,
"-I"
include paths are
passed to the C++ compiler invoked for MetaSL and C/C++ source code
shaders. If multiple -I
command line options are passed to
the compiler, they are concatenated into semicolon separated list, which
corresponds to the intuitive behavior. mental ray 3.7 and prior replaced
the old command line option with a new one.
- For compilation of shaders on windows platforms, it is no longer
required to add WIN_NT define to the C/C++ compiler invocation.
- Changes the order of temporary directory lookups. The environment
variables TMPDIR, TMP, TEMP are checked in that order. If not set, the
current directory is used on Windows, and /usr/tmp is used on other
platforms.
- On Windows, temporarily created object and DLL files contains now the
process id to avoid possible conflicts from several mental ray processes
running on the same machine.
- Added string option
"finalgather normal tolerance"
. It
specifies the maximal angle in degrees up to which a finalgather point
normal may deviate from the surface normal for the finalgather point to
be considered for interpolation.
If the string option is not present, or exceeds its valid range of
0-90 degrees (exclusive of 0 and 90), the built-in default of 25.842
degrees is used to maintain backwards compatibility.
- Added a progress percentage message for optimization of Irradiance
Particle maps with large number of particles.
- Added compatibility version of the architectural BSDF. Its
functionality is the same as for the
builtin_bsdf_architectural
, but the declaration follows
those of the architectural material.
- Enabled
builtin_bsdf_architectural
and
builtin_bsdf_mirror
BSDFs with the declarations as below:
declare shader color "builtin_bsdf_architectural" (
color "diffuse_refl" default 0 0 0 1,
scalar "diffuse_refl_scalar" default 1,
scalar "diffuse_dev",
color "specular_refl" default 0 0 0 1,
scalar "specular_refl_scalar" default 1,
scalar "refl_gloss" default 1,
boolean "metal_material" default on,
color "specular_trans" default 0 0 0 1,
scalar "specular_trans_scalar" default 1,
scalar "trans_gloss" default 1,
color "diffuse_trans" default 0 0 0 1,
scalar "diffuse_trans_scalar" default 1,
scalar "anisotropy",
scalar "anisotropy_rotation",
integer "mode",
array light "lights")
end declare
declare shader color "builtin_bsdf_mirror" (
color "reflection" default 0 0 0 1)
end declare
The builtin_bsdf_architectural
is a simplification of the
architectural material, containing the parameters relevant for the
material properties. The builtin_bsdf_mirror
is a simple
specular reflection, which multiplies the reflected color with the
reflection
parameter.
- The
mi_ambient_occlusion
function behavior has been
slightly modified. When the number of cache points in the
miAmboccl_options
argument structure passed to the function
is 0, the cache is ignored and the ambient occlusion value is computed.
Negative cache points value (default: -1) still can be used to take the
number of cache points from the global "ambient occlusion cache
points"
string option.
- Added support for displacement of primlist objects with no vertex
normals specified.
- Added
A_H
and S_H
image types to represent
alpha and intensity images in half float resolution.
Bug fixes:
- For scenes with multiply-instanced assemblies, fixed motion
transformations.
- For scenes with multiply-instanced assemblies, fixed view-dependent
approximations.
- For scenes with multiply-instanced assemblies, fixed displacement
mapping inherited from a material defined on an instance in the main
scene and inherited into the assembly.
- For scenes with assemblies, fixed
mi_point/vector/normal_to/from_*
function family. If called
on a hit point inside of an assembly, these functions correctly use world
space instead of the assembly local space now.
- For builtin BSDFs, fixed missing contribution of environment lighting
in glossy reflections.
- Fixed artifacts in contour rendering used in combination with hull
objects.
- Do not echo built-in BSDF shaders.
- For the BSP2 acceleration, fixed a regression from mental ray 3.6+ with
memory allocations bypassing mental ray memory management. This fixes
wrong memory usage statistics and possible crashes for large scenes not
fitting to the memory completely.
- For the BSP2 acceleration, reduced effective memory consumption by
releasing memory used for tree constructions immediately after the
construction is finished.
- For the BSP2 acceleration used with motion blur, fixed possible missing
geometry artifacts originating from numerical precision issues.
- For hair objects with per-hair textures, fixed
mi_query
mode miQ_NUM_TEXTURES
to return correct value and avoid
unnecessary tessellations.
- For the rasterizer used with motion blur, initialize
miState::time
properly for volumetric and environment
shading.
- Fixed a possible crash if hair was used in combinations with
assemblies.
- Fixed a possible crash in rendering hair with rasterizer.
- Fixed a possible crash and the ray library shutdown if an extremely low
memory limit was set at startup.
- Fixed possible crash if Irradiance Particles were used in combination
with BSP2 acceleration.
- Fixed echo of verbatim textures
(-echo textures
command
line option) for images using with more than 8 bits per pixel per color
channel, such as HDR.
- Fixed a crash in photon map diagnostic mode rendering used in
combination with cached framebuffers.
Shader changes:
- For integrators, added an externally visible
mia_tonemap_api_untransform_color
function which may be used
to revert the tone mapping effect.
- For the architectural material shader, fixed possible rare freeze in
ambient occlusion computation.
- For the
mip_gamma_gain
shader, added gamma correction for
negative numbers. In particular, this protects against possible NaN
values.
- Fixed possible max version check warning for the subsurface scattering
shader library.
Changes in Version 3.7.1.13.
Feature improvements:
- For the map containers, use shorter more expressive names for the
classes.
Bug fixes:
- For multihosted rendering with integrated version of raylib, fixed
slave host removal with the
mi_msg_remove_host()
function
call for IPv6 addresses.
Changes in Version 3.7.1.12.
Feature improvements:
- For secondary finalgather diffuse bounces, rays are traced now as
finalgather rays and finalgather flags on objects an instances are
respected, instead of reflection/retraction rays and flags used
prior.
Bug fixes:
- Fixed unnecessary large number of sub-objects for polygonal objects
with displacement presampling and large maxdisplace value specified. In
particular, large number of subobjects resulted in slow lightmap
rendering.
- For the BSP2 acceleration used with motion blur, fixed possible
artifacts due to self-intersection precision issues.
- For Catmull-Clark objects, min/max subdivision levels in approximations
were ignored, fixed.
- For Catmull-Clark objects, take into account shrinking when estimating
subdivision level. This fixes unnecessary over-tessellations in such
cases.
- Fixed syntax error in echoing of instance override approximation
lists.
Shader changes:
- Make multiple-output
mi_metallic_paint_shader_x
work if
used as an a single shader or a phenomena root.
Changes in Version 3.7.1.11.
Feature improvements:
Bug fixes:
- For Iff image file format, enable to writing out of alpha ("a")
files.
- Fixed major memory leak at the end of the frame if BSP2 acceleration
was used in combination with assemblies. Some of the acceleration
structures have not been deleted.
- Fixed a memory leak if hair rendering was enabled.
- For raylib integrations: fixed a typo in
mi_par_aborted()
check which prevented application callback from been called.
- Options consistency: disable irradiance particles if ray tracing is
switched off.
- Fixed possible crash in photon emission on scenes with assemblies.
- For the rasterizer, environment shaders were called with non-zero
miState::pri
, fixed.
- For ambient occlusion with enabled caching for scenes with motion blur,
fixed visual artifacts due to computing of all ambient occlusion values
at shutter open time.
- For hair objects with view-dependent approximations, set the view
dependency flags properly.
- For Catmull-Clark meshes, fixed possible crash for objects with
derivatives.
- Platform specific: on Windows platforms, fixed IO error reporting
related to the image processing.
Shader changes:
- Changed the multi-output version of fast subsurface scattering shader
misss_fast_shader_x
to follow the same conventions as
multi-output architectural material shader. The specular and diffuse
properties of lights are adhered in the same way as for the architectural
material shader.
- For the fast subsurface scattering shader, importance-driven sampling
for glossy reflections has been added, which may significantly improve
performance for some scenes.
- For the fast subsurface scattering shader, fixed possible artifacts
edges of objects with very small scatter radii below 1 pixel in the
lightmap resolution.
- Added new multi-output
mi_metallic_paint_x
shader
identical to the metallic paint shader, but allowing multiple outputs
following the architectural material conventions.
- Changed architectural material shader to avoid assertions in the
debug version of mental ray due to of
mi_ward_anisglossy
function with inconsistent arguments. The
change also lead to a minor performance improvement.
- For the production
mip_mirrorball
and architectural portal
light mia_portal_light
shaders, changed errors to warnings
in accordance to the common conventions for recoverable scene issues.
- The architectural portal light
mia_portal_light
shader is
made compatible with point-style area lights with no direction
specified.
Changes in Version 3.7.1.10.
Bug fixes:
- Fixed wrong motion bounding boxes for Catmull-Clark meshes with
multiple motions steps and no motion vectors specified.
Changes in Version 3.7.1.9.
Changes affecting compatibility with older versions:
Changes in Version 3.7.1.8
Feature improvements:
- For the shader interface, performance of the string options lookups
(
mi::shader::Options::get
) and accessing of the framebuffers
(mi::shader::Access_fb
/ Edit_fb
) has been
improved significantly. Accessing string option still includes a
hashtable lookup, so for performance reason it is recommended to access
them in the init shader once.
- For the
Map
containers, avoid rebuilding of the internal
lookup acceleration structure when this is not necessary.
Bug fixes:
- For scenes with assemblies, avoid unnecessary loading of assemblies
with hair rendering enabled.
- Fixed artifacts in the shared -displacement mode enabled with the
{_MI_REG_SHARED_DISPLACEMENT}
registry.
- Fixed echoing of registries specifying kernel modifications including
like the shared displacement trigger above.
- Fixed echoing of displacement approximation for polygons and
trilists.
- Fixed a memory leak in the string options interface.
- Fixed
$ifeq
preprocessor instructions of the .mi parser
for the environment variables.
- Platform specific: on Windows, fixed possible failure to save large
photon or finalgather maps onto network drives.
Changes affecting compatibility with older versions:
- The
mi::shader::Interface
version has been increased to 3.
Shaders compiled for mental ray 3.7 alpha versions need to be recompiled.
Shaders compiled for mental ray 3.6/3.6+ keep the limited binary
compatibility with mental ray 3.7 over the
mi::shader::Interface
version 2.
- For the shader interface
Map
s, fixed some const
qualifiers.
- The miObject_type enumeration is changed to keep the same values as in
mental ray 3.6+ in order to include binary compatibility with mental ray
3.6+ (in particular, for the production
mip_binaryproxy
shader).
Shader changes:
- Improved performance of the portal light shader by avoiding multiple
calls for insignificant lighting.
- Made production
mip_binaryproxy
shader compatible with
mental ray 3.7.
- For
mia_roundcorner
shader, fixed possible crash if the
shader attached to the bump parameter returned struct consisting of
several outputs.
- For the architectural environment shader
mia_envblur
,
improved the behavior of the shader in the erronous situation of the
parameter environment not set (meaning usage of the camera/material
environment shader), and the share itself being set as such shader, which
has caused recursive shader calls.
- For the architectural material shader, the ambient occlusion
functionality of the shader has been changed to ignore objects not
casting shadows.
Changes in Version 3.7.1.7
Changes affecting compatibility with older versions:
- Typedef BSDF
Type
to miUint
to avoid possible
incompatibilities on sizeof
(enum).
- For the
Map
containers, adjusted signatures of
get
and set
methods using
miMatrix
. This is required to as miMatrix
is is
typedef to float[16]
and compiler cannot distinguish between
reference to it and pointers for scalars on function calls.
Feature improvements:
- Added a warning if deprecated version 1 file format used in mental ray
version 2 and earlier is parsed.
- Improved robustness of geometry tessellation if corrupted geometry data
is parsed.
Bug fixes:
- For multihosted rendering, fixed possible crash at shutdown if the BSP2
acceleration was used.
- Platform specific: on Windows, fixed possible failure to initialize
library if DNS server resolved IPv6-style address lookups (like
"::1"
) into IPv4 addresses.
Changes in Version 3.7.1.6
Tutorial on usage of irradiance particles has been added.
New features:
- Added new object flag "
triangle estimate
<int>
" to the .mi syntax, and the new member field
miObject::tri_est
. If specified this field may be set by a
translator or exporter and give approximate number of triangles expected
for the given object. CAD application frequently would know the precise
number, but even if it is know only up to an order of magnitude it is
advisable to provide it. In the future versions, mental ray will use it
as a hint for optimizing performance and memory usage.
- For mental ray integration and geometry shaders API, added a new
function
mi_api_rename(char *target, char *source)
and corresponding .mi syntax
rename "target" "source"
This function may be used to rename existing scene entities without
recreating them, in particular this may be used by application interface
to follow user interaction.
The function has following limitations:
- Renaming across scopes is not supported, by design.
- Compatibility with incremental echo is limited.
mental ray kernel does not maintain list of renaming. If renamings
are done and scene changes are echoed, application should print a set
of rename commands as previously echoed parts of the scene may
contain old names.
- API Notify callback is not called for the function.
- Renaming PHCR GUI is not supported.
- Renaming of shader declarations is possible bus discouraged as
corresponding functions are linked using the same name as in the
shader declaration.
Feature improvements:
- In the displacement tessellation, the warning on removal of triangles
of (close to) zero area is printed only once per sub-object and gives the
number of triangles removed.
Bug fixes:
- On Windows platforms, fixed broken
shader.lib
proxy for
shaders calling to mi_scene_recreate
on
miSCENE_NBOX
type.
- For the standalone, fixed wrong process exit value 1.
Changes in Version 3.7.1.5
The manual for this version has been improved.
New features:
Syntax and application API has been added for the Map containers
introduced in version 3.7.1.2.
The syntax is similar to user data elements. The layout of the map can be
declared with
declare map "name"
[ dim int , ]
paremeter1,
...
paremeterN
end declare
with each of parameters being one of
integer "parname"
scalar "parname"
vector "parname"
color "parname"
transform "parname"
array int integer "parname"
array int scalar "parname"
The allowed parameter types are 32-bit integers, single precision
floats, float 3d vectors, 4 component float colors and 4x4 float
matrices, as well as fixed size arrays of integers and floats.
For a declared layout, a map content may be specified as
map "mapname" "layout"
(
["mapfile1", ... "mapfileN"] |
{ <rec1field1>, ... , <rec1fieldM> },
....,
{ <recKfield1>, ... , <recKfieldM> }
)
end map
i.e., either a list of file names containing binary map data is
specified, or the list of fields for each particles in the map.
Each recSfieldT entry should consist of the proper number of
space separated float or integer values. The first record in each row
should be N floats corresponding to the position of a particle in the
N-dimensional map.
The Map type has been added to the list of legal shader parameter
types, following usual conventions. A Map cannot be an output of a
shader.
The equivalent API functionality is provided with the
mi_api_map_*
functions family.
Additional documentations and tutorials will be added in upcoming
releases.
Feature improvements:
- For the BSDFs introduced in version 3.7.1.4, the BSDF component type
has been transformed into a bitmask.
Bug fixes:
- For the DDS image file format, non-square images with mipmap pyramids
were not loaded. Fixed.
- Fixed a crash if an empty photon map was loaded from a file
and the
finalgather fastlookup
option has been enabled.
Changes in Version 3.7.1.4
New features:
- Added Bidirectional Scattering Distribution Function
(BSDF, or BRDF for non-transmitting
materials) support for mental ray kernel.
In the current version, mental ray supports Lambert, Phong and
Ashikhmin BRDFs, which are built into the kernel. Built-in shaders
implementing these BSDFs are pre-registered in the mental ray API as:
declare shader color "builtin_bsdf_phong" (
color "diffuse",
color "glossy",
scalar "exponent",
array light "lights",
integer "mode" )
version 1
end declare
declare shader color "builtin_bsdf_lambert" (
color "diffuse",
array light "lights",
integer "mode" )
version 1
end declare
declare shader color "builtin_bsdf_ashikhmin" (
color "diffuse",
color "glossy",
scalar "exp_u",
scalar "exp_v",
array light "lights",
integer "mode" )
version 1
end declare
Further standard BSDFs will follow.
An instance of a BSDF shader with given parameters may be specified
with the usual 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. The miMaterial
structure has been
extended with a bsdf
slot, which may specify an instance for
one of the BSDF shaders listed above. The .mi syntax is extended with the
bsdf
keyword, allowing to specify the BSDF shader in the
material.
A material shader may access the BSDF attached to the current shading
state by using mi::shader::Access_bsdf
class. The API for
interaction with BSDFs is declared in the new shader_bsdf.h
header file. It is described in the doxygen documentation in the manual.
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.
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.
Bug fixes:
- Fixed
$ifeq
preprocessor instructions of the .mi parser
using registry variables. The mi_string_substitute
function
applied to a string consisting of a single reference to a undefined
registry returned the unchanged string instead of empty string.
Changes in Version 3.7.1.3
Feature improvements:
- For SPM-protected version of mental ray standalone executable, added a
boolean string option
-maxlics
. This option may be usable
for renderfarms running multiple mental ray executables on the same
machine. If set on, independently on how many threads are running by each
executable, the maximal number of licenses applicable for the given
machine is allocated and shared between all
mental ray executables.
- Assure that
miState::dot_nd
initialized by intersection
code, and the dot_nl
parameter returned by light loop are in
the [-1, 1] range. Small deviations were possible due to precision
issues.
- For mental ray standalone executable, changed exit code to 1 if (some
of) .mi file(s) specified on the command line is not found. If multiple
files are specified, rendering stops after the first file missing.
- Restored scene extent info message at the beginning of rendering as
known in mental ray 3.5.
Bug fixes:
- For the debug build only, fixed an erroneous assert in rendering of
shadowmaps.
- For rendering of lightmaps, avoid allocating of unnecessary large
memory blocks. For objects with high number of certifies this may reduce
memory consumption significantly.
- Fixed several bugs in the adaptive tessellation for Catmull-Clark
meshes introduced in the previous version.
- For the finalgather automatic mode, fixed possible dark artifacts on
objects containing finalgather points with significantly different normal
orientations (like thin objects with indirect illumination computed on
both sides, or on the object corners).
Changes affecting compatibility with older versions:
- The content of
mi_shader_if.h
header file now include
several partial header files according to the features if the
mi::shader::Interface
class. Shader writers are still
supposed to include the mi_shader_if.h
file into the shader
C++ files.
Shader changes:
- For the architectural environment shader
mia_envblur
added
a detection of the invalid usage of the "environment"
argument pointing back to itself and for the similar case when
mia_envblur
shader is part of the global environment map,
and the "environment"
parameter is not specified, which
efficiently resulted in self-reference. An error message is printed and
the environment shader is disabled now.
Changes in Version 3.7.1.2
New 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.
- Initial implementation of Map containers has
been added. Maps are particle systems in N
dimensional space. Each particle has a position and set data assigned.
mental ray kernel provides functionality 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 euclidian 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
shaders. API interface and .mi syntax for named Maps will be added in the
next version. Minor modifications for the lookup interface are still
expected. Documentation for the feature will follow. The interface
functions can be found in the mi_shader_if.h
file.
Feature improvements:
- For OpenEXR textures, added ability to use display window. If
_MI_OPENEXR_WINDOW registry is set to "display" (valid values are
"display" and "data"), the OpenEXR display window used. Note that display
window is not compatible with mipmap pyramids for filtered local
textures.
- For the integrated versions of raylib, the emergency exit for
renderings running out of memory has been modified. The function
mi_rc_run
now returns to the application in one second and
does not wait until all rendering threads are blocked. The rendering
threads are still blocked on memory or database operations, possibly
after mi_rc_run
returns. Previous synchronous mode where
mi_rc_run
returned first after all threads get blocked was
less robust: threads blocked on internal locks were not counted, which
resulted in a possible application freeze.
- For the BSP2 acceleration, more improvements in memory consumption and
construction time has been applied, with focus on motion blur scenes.
Several bugs have been fixed.
- For string options, allow shader to access boolean values as integers.
This is handy if shaders use variables of type
miBoolean
,
which is typedefed to int.
Bug fixes:
- For framebuffers, fixed possible crash if image file name with no
extension was used.
- For scenes with assemblies, fixed flag inheritance from the main scene
to assemblies. This resolves some cases of unnecessary loading of
assemblies when they are not required for rendering (for example, a
combination of assemblies visible only to shadow rays and shadow option
set to
off
).
- For the
'{{'
and '}}'
escaping for file name
lookups introduced in version 3.6.52.5, fixed possible failure to apply
the unescaping exactly one time.
- For texture caching, fixed possible issue of not releasing references
to texture pages fast enough (slower than allocating new references) for
large scenes with many textures and database flushing active.
- For OpenEXR images texture caching, fixed a possible crash for files
with tiles not aligned the pixel coordinates origin.
- For multiply-instanced trilist objects with view-dependent
displacement, fixed wrong identical displacement quality used for all
instances.
- Fixed a bug where BSP2 acceleration could miss intersections if a
substantial amount of secondary rays were spawned as children of a single
eye ray. For cached glossy rays in the architectural material shader
these missing intersections became visible as white dots or blocky
artifacts.
- Fixed wrong motion blur for BSP2 acceleration used with multiply
instanced moving objects.
- For integrated versions of mental ray: fixed possible crash at
aborting of the rendering for large scenes which did not fit
into the memory completely and triggered database flushing. The crash was
more likely with BSP2 acceleration used.
- In some cases when using the rasterizer with shutter_delay > 0, with
motion on, and samples_motion > 1, incorrect motion could be
calculated. Fixed.
- In the subdivision surface compatibility mode (enabled with
MI_SURF_CCMESH
environment variable), fixed broken motion
vectors for multi-segment motion.
- For scenes with camera motion and scanline mode off, fixed missing
motion blur regression from version 3.7.1.1.
- Platform specific: on Linux and MacOSX, fixed possible freeze for very
long rendering sessions occurring after 4 billion of database creation
and editing operations.
- Platform specific: on Windows, fixed a bug in rayserver service causing
possible connection failures.
Changes affecting compatibility with older versions:
- Changed default value for importon density used in combination with
Irradiance Particles. The new value is
0.1
(per pixel). In
combination with photons, the old default value of 1 is still used.
Shader changes:
- For the
mip_render_subset
production shader, fixed
possible wrong subset of geometry rendered in the finalgather
precomputing mode.
- Fixed rendering with
mip_motionblur
and
mip_motoin_vector
production shaders used with orthographic
camera.
- For the production shaders
mip_mirrorball
and
mip_greyball
, fixed possible crash with non-zero blur and no
texture attached.
- For production
mip_binaryproxy
shader, the amount of
displacement has not been taken into account for bounding box
computation, fixed.
- For the architectural material library,transparent portal lights have
been fixed to not show up in the Z buffer anymore.
- The physical "
transmat
" shader did not support segment
shadow mode. Fixed.
Changes in Version 3.7.1.1
New features:
- Hair approximation. 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.
The approximation can be specified on a hair object with the following
syntax:
approximate hair <curve_approx>
with <curve_approx
> being any curve approximation
technique, for example:
approximate hair view length 3 distance 0.1 angle 5 0
7
In order to get benefit from curvature-dependent approximations, hair
needs to be modelled appropriately with hair degree > 1.
- 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 requires 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 poky 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.
The string option"geom displace motion factor" f
can be
used to modify the amount of geometry reduction compared to static case,
with float f >= 0
. The factor f=0
turns off
the feature. The factor f=1
is currently the default, and
gives higher values of f
give more reduction. This default
value is experimental and is rather
conservative: the simplification of geometry will have an effect for
motion of approximately 16 pixels. In order to get effect on slower
motion, higher values should be used. For example, the factor value of 8
would reduce geometry in areas of objects moving at the speed of 2 pixels
per frame.
- Experimental: In mental ray 3.6/3.6+ the
only object-size independent approximation technique is the angle-base
approximation which in some cases does not result in performance-optimal
meshes. A new distance-ratio based approximation technique has been
implemented, which is driven by the approximation error along an edge and
the length of the edge.
In the current version, it can be enabled by setting the environment
variable MI_DISTANCE_RATIO
and using the
distance approximation technique. Recommended values are of order 0.02,
with finer approximations corresponding to smaller values.
Feature improvements:
- Significant algorithmic changes have been applied to the BSP2
acceleration construction:
- for the scenes with motion blur, the construction time has been
decreased dramatically
- for static scenes, memory required for the construction has been
reduced and the construction time significantly decreased
- for both static and motion BSP2 trees, the quality of the
constructed trees has been improved significantly, resulting in the
performance improvements of the intersection tests.
- Irradiance Particles have been extended with IBL-style functionality
which can be enabled with the string options "irradiance particles
indirect passes" is set to -1.
If Irradiance Particles interpolation is disabled then only
environment presampling map is build and no further precomputation steps
are required.
If Irradiance particles Interpolation is enabled, then particles are
emitted in the precomputation pass in a usual way, but used as
interpolation points only.
In both cases, only the environment map lighting but not diffuse
bounces are taken into account.
- For the detailed shadow maps saved to a file: render and store all
shadowmap tiles (not just actually used ones).
- The OpenEXR version as been updated to 1.6.1.
Bug fixes:
- For Irradiance Particles, contribution of the environment was off by
factor PI, fixed.
- For volume shaders used in segmented shadow mode with autovolume turned
off, added missing call of the volume shader for the last segment (one
between the last occluder and the light).
- For standalone version of mental ray, fixed wrong number of licensed
used by machines with hyperthreaded CPUs if the number of licenses was
specified as a command line parameter.
Changes affecting compatibility with older versions:
- mental ray 3.7 code has been switched to use STLPORT compiled in the
proprietary namespace MISTD. This resolves potential symbol conflicts for
integrating application and 3rd party plugins; requirements on the
compiler compatibility / version match are reduced.
- OpenEXR library is linked statically. On an attempt to link
mi_openexr.dll
, a warning message is printed.
- Removed obsolete syntax and API interface for implicit patches.
- Removed obsolete box type from the
miGeoBox
structure.
miMaterial
structure has been extended with bsdf slot.
- The layout of
miHair_list
structure has been extended with
approximation. Unused integer approximation has been removed.
- Map containers have been added to the
mi::shader::Interface
class.
Changes in Version 3.6.52.10
Feature improvements:
Bug fixes:
- For multihosted rendering, fixed a crash for scenes with
assemblies.
- Platform specific: on Windows, fixed a bug in rayserver service causing
possible connection failures.
Shader changes:
- Avoid potential linkage problems for function
gloss_to_shine
used in both production and architectural
material shader libraries.
Changes in Version 3.6.52.8
Bug fixes:
- Fixed possible crash in creating lightmap using BSP2 acceleration.
Changes in Version 3.6.52.7
Bug fixes:
- Fixed a crash if irradiance particles were used with BSP2
acceleration.
- Fixed wrong default value for the number of irradiance particles used
fro interpolation.
- For rendering of multiple frames, fixed possible unknown tag fatal in
geometry tessellation.
Shader changes:
- For the production shaders, clipping planes were ignored. Fixed.
- For the production shaders, objects set to "invisible" blocked
the view to the desired object. Now "invisible" objects are
traced through properly.
- For the production shaders, setting a particular object incorrectly
rendered all instances of that object, not just the selected
one. Fixed.
Changes in Version 3.6.52.6
Bug fixes:
- Platform specific: for 32-bit Linux platforms, fixed possible artifacts
due to precision issues for the BSP2 acceleration used in combination
with
mi_trace_continue
function.
Changes in Version 3.6.52.5
Feature improvements:
- For search paths, treat
{{
and }}
substrings
as escaping for {
and }
symbols respectively.
Bug fixes:
- Fixed a crash if cached framebuffers were used for rendering of small
images with less than 4096 pixels (x_resolution times y_resolution).
- Fixed mental ray standalone help banner giving wrong default memory
limit on 32-bit platforms. The default value is 1000 MB on 32-bit
platforms and unlimited on 64-bit platforms.
Changes in Version 3.6.52.4
Bug fixes:
- Fixed echo of framebuffers for images with compression type
specified.
- For Irradiance Particles, fixed minor area estimation, resulting in a
slightly improves image quality and performance for some scenes.
- For the BSP2 acceleration, fixed possible artifacts due to bounding box
intersection failures for rays almost parallel to coordinate planes.
Changes in Version 3.6.52.3
Bug fixes:
- For the integrated version of raylib only: fixed possible freeze for
safe exit on out-of-memory fatals (
miABORT_RAY_FREEZE
flag
for mi_par_abort
).
Changes in Version 3.6.52.2
Bug fixes:
- For OpenEXR images, compression has not been enables by default since
version 3.6.50.17, fixed.
- For the BSP2 acceleration, fixed possible crash for motion scenes with
zero-length shutter interval (i.e.
shutter open ==
shutter
, shutter open >
0
).
- For the BSP2 acceleration, fixed memory allocation statistics.
Changes in Version 3.6.52.1
Bug fixes:
- For the RLA image format, fixed output of color + Z depth images.
- For
user
area lights sampled by
finalgather rays, do not enforce single sample per light. This may
conflict with user light shader aim.
Changes in Version 3.6.50.21
Bug fixes:
- For the BSP acceleration used in combination with segment or sorted
shadows, fixed missing geometry normal transformation for polygonal
objects without vertex normals.
- For the rasterizer, fixed possible crash if
mi_query
miQ_NUM_TEXTURES
mode was called from a volume shader.
- For the BSP2 acceleration, fixed possible crash in rendering of
subsequent frames for scenes with motion blur.
Shader changes:
- For the architectural sky shader, fixed missing Pi factor when
computing Zenith luminance from the diffuse
horizontal illuminance.
Changes in Version 3.6.50.20
Bug fixes:
- Fixed missing ray-traced hair in assemblies.
Changes in Version 3.6.50.19
Feature improvements:
- Added new function
mi_phen_call
and a set of macros
mi_call_boolean(param)
mi_call_integer(param)
mi_call_scalar(param)
mi_call_vector(param)
mi_call_transform(param)
mi_call_color(param)
mi_call_tag(param)
These function and macro are equivalent to mi_eval
, but
do not use caching mechanism. If a shader calls this function on a
parameter which is connected, then all shaders in the sub-shader chain
(only) will be forced to re-compute and the result value will be
returned. The original cache is not affected nor destroyed by this
function, meaning, that any previous or following mi_eval() call on the
same parameter will use the original cache. These function and macro are
handy for evaluation shaders with temporary modifications to miState
variables, such as normal or texture coordinates.
- Platform specific: on 32-bit Linux platforms, compile using
_FILE_OFFSET_BITS=64
define in order to allow files large
than 2GB.
Shader changes:
- For the architectural physical sun shader, the illumination mode was
not initialized in the shader implementation, fixed.
Changes in Version 3.6.50.18
Feature improvements:
- The following registries are filled in by mental ray kernel in addition
to those introduced in version 3.6.50.8:
{_MI_RAY_MAJOR_VERSION}
contains mental ray (i.e. "3"
for this release)
{_MI_RAY_MINOR_VERSION}
contains mental ray (i.e.
"3.6" for this release).
{_MI_RAY_BRANCH}
contains the branch version (i.e.
"3.6.50").
{_MI_RAY_SYSTEM}
contains a short sting for the
current system class (like "windows").
{_MI_RAY_OEM_ID}
, if set, contains an ID of OEM
partner.
- For integrators: added a new function mi_mi_parse_assembly. This
function accepts full .mi syntax and may be called for parsing of
assembly files from procedural assembly callbacks only. The
mi_mi_parse function accepts only a subset of the .mi syntax for the OEM
raylib versions.
Bug fixes:
- For the BSP2 acceleration used in combination with rasterizer or
scanline, for scenes multiply-instanced objects, fixed possible
self-intersection artifacts.
- For hair rendering, some memory allocations were not included into
memory statistics, fixed.
- Fixed a tag leak for assembly filenames.
- For database dumps, fixed a name for the assembly tag type.
- For integrators: fixed a typo in
mi_par_aborted()
check
which prevented application callback from been called.
Shader changes:
- For the paint shader, added missing
edge_factor
parameter
to the declaration.
Changes in Version 3.6.50.17
Bug fixes:
- Fixed a tag leak if an assembly tag has been deleted with
mi_api_delete
function.
- Fixed wrong compression options used for OpenEXR output images.
Changes in Version 3.6.50.16
Bug fixes:
- Fixed a potential crash if one of the IPv4 or IPv6 interfaces for
localhost was not available.
- Fixed a crash if a state shader called in charge of a geometry shader
accessed
miCamera::buffertag
.
- For the BSP2 acceleration, fixed possible artifacts produced by
mi_trace_continue
function.
- For BSP2 acceleration used in combination with assemblies, fixed a
crash introduced in the previous version.
- For OpenEXR files, fixed a crash if more than 8 images were stored in
one file. The fix is in the
mi_openexr.so
library.
- Platform specific: on MacOSX 64-bit PPC machines, fixed broken
mi_openexr.so
.
Changes in Version 3.6.50.14
Bug fixes:
- For
ccmesh
objects fixed possible texture seams
artifacts.
- Fixed a crash for lightmaps computed with the BSP2 acceleration.
- Fixed a crash if a combination of the BSP2 acceleration, rasterizer (or
detailed shadowmaps) and hair was used.
- Fixed missing shadows if a light sample loop was called from a volume
shader and the BSP2 acceleration was used.
- Fixed a typo in the scene options info banner.
Shader changes:
- For the architectural physical sun shader, added parameters allowing to
set direct normal illuminance explicitly.
Changes in Version 3.6.50.13
Bug fixes:
- Fixed motion transformation inheritance for assemblies attached to a
moving instance.
- For the BSP2 acceleration, fixed possible failure to trigger motion
oversampling.
- Fixed a crash for lightmaps computed with the BSP2 acceleration.
- For hair rendering, fixed possible shadow artifacts.
Changes in Version 3.6.50.12
Bug fixes:
- For the BSP2 acceleration used in combination with segment or sorted
ray-traced shadows, fixed possible infinite self-intersection loop
leading to out-of-memory total. The underlying precision issue has been
observed on 32-bit Linux platform only.
- Some of memory allocations in the BSP2 acceleration were not counted in
mental ray memory statistics, fixed.
- For the BSP2 acceleration used in combination with motion blur and ray
traced shadows, fixed possible failure to detect motion and trigger
motion blur oversampling.
Changes in Version 3.6.50.11
Feature improvements:
- New caching mechanism for building of the BSP2 tree with motion is
enabled. The BSP2 construction time for large scenes is significantly
reduced.
- Added IPv6 support for mental ray multihosting 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).
Bug fixes:
- Fixed null tag fatal in direct creation (not output of rendering
framebuffers) of OpenEXR image files, used in particular for lightmap
textures.
- For multi-imaged OpenEXR output files, removed unnecessary conversion
to color for depth, normal and motion framebuffers which caused loss of
some information.
- Fixed a crash if photon emission with
photon autovolume
mode enabled has been used in combination with BSP2 acceleration.
- For the BSP2 acceleration, fixed possible crash if mixed static and
moving geometry was used.
- For raylib integrations, fixed wrong thread counting in
out-of-memory emergency exit.
An application may register a memory callback which is called when
mental ray kernel is not able to free sufficient amount of memory itself.
If this callback is called and the application is aware that it is not
able to free a significant amount of memory, it may decide to call
mi_par_abort()
function with miABORT_RAY_FREEZE
flag. In that case, mental ray kernel would hang all rendering threads
and delete currently not accessed database elements, freeing a moderate
amount of memory. After a short delay, the mi_rc_run
call
will return. Application is supposed to save user work and exit. mental
ray library functionality should no longer be used, in particular the
mi_raylib_exit
should not be called.
- For multihosted rendering, fixed possible crash if multiply instanced
trilist objects are used.
- For Irradiance Particles, fixed possible crash in evaluation if
importance was close to zero.
- For Irradiance Particles, fixed computation of surface
translucency.
Shader changes:
- For the architectural material, fixed possible dot artifacts in
rendering of indoor scenes with bright environment and glossy
interpolation used in combination with
"detail
distance".
Changes in Version 3.6.50.10
Bug fixes:
- Assure that for shadow shaders
miState::scanline
is 0 as
specified.
- For the scene echo, do not print instance light lists if echoing of
lights or light instances is disabled.
Changes in Version 3.6.50.9
Feature improvements:
- 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.
- Extended progress strings enum with Irradiance Particles entry.
- Added Irradiance Particles entry to the
mi_query
mode
miQ_STAGE
.
Bug fixes:
- For the BSP2 acceleration used in combination with multi-segment
motion, fixed a severe bug in computation of internal boxes during the
BSP2 construction. This fixes possible artifacts and significantly
improves performance for such scenes.
- For
ccmesh
objects, fixed possible crash for mixed
tri-/quad-meshes.
- For texture caching, fixed a crash in image conversion when a color
image was opened as a scalar texture.
- For the command line option
-ip
, fixed the default value
to off
if the option is given.
Changes in Version 3.6.50.8
New features:
- Added novel global illumination technique, Irradiance
Particles (short: IP), which is in many cases
superior to finalgather and/or photon mapping in terms of image quality,
usability and performance.
A short description of the technique may be given as follows: before
rendering, importons are shot to the scene from the camera. 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, the 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 at particles'
positions.
Irradiance Particles cannot be used in combination with globillum and
finalgathering (the options are automatically adjusted on an attempt to
do so). However, Irradiance Particles are compatible with caustic
photons.
The following string options can be used to control irradiance
particles.
"irradiance particles" <boolean>:
this string
option enables the Irradiance Particles. The default is off.
"irradiance particles rays" <int>:
this string
option controls the number of rays shot while estimating the
irradiance. The number is similar to the number of rays used for
finalgathering, but specifies the maximal number and delivers better
quality compared to finalgathering used with the same number of rays.
The minimum is 2. The default value is 256.
"irradiance particles indirect passes" <int>:
the number of possible passes of indirect lighting. If this number is
greater than 0, then a sequence of passes is computed to collect the
irradiance coming from multiple indirect illumination bounces.
Irradiance Particles would have both direct illumination and indirect
illumination information in that case. If this number is 0 then
Irradiance Particles will have only direct illumination information.
The default value is 0.
"irradiance particles scale" <float> |
<color>:
this is the global scale factor applied to the
intensity of the irradiance during rendering. Values different from
default do not lead to a physically correct rendering but are useful
for artistic purposes. A single value or a color may be specified. A
single value is expanded to a color having the same R, G and B
components. The default value is 1.0.
"irradiance particles interpolate" <int> |
<string>:
this string option is used to control the use
of interpolation. It can either be a numeric value or a string.
0
means no interpolation, 1
means
interpolate always, 2
means interpolate only for
secondary rays (that is, no interpolation for eye rays and
interpolation for reflections, retractions, etc). Alternatively,
strings "never"
, "always"
or
"secondary"
may be used. The default value is
"always"
.
"irradiance particles interppoints" <int>:
the
number of Irradiance Particles used for the lookup interpolation. The
default value is 64.
"irradiance particles env" <boolean>:
this flag
enables the use of the environment maps for irradiance computation.
In that case a separate particle map is built for the environment (if
an environment shader is present) and used during rendering for image
based lighting. The default value is on.
"irradiance particles env scale" <float> |
<color>:
this is a global scale factor applied to the
irradiance contribution of the environment. Like "irradiance
particle scale"
string option, a single scalar or a color may
be specified. The scaling factor is relative because it applies to
the environment irradiance only: the environment irradiance could be
further scaled (multiplicatively) if the user specifies a global
scaling factor with the "irradiance particle scale"
string option. The default value 1.0.
"irradiance particles env rays" <int>:
the
number of rays used for the computation of irradiance coming from the
environment map. This number can be greater than the number of rays
used for normal irradiance computation, especially if most of the
environment is covered by scene geometry (typical case: is a room
with just one or two windows). For outdoor scenes, it should work
fine with a smaller number of rays. Default value is equal to the
number of rays specified with the "irradiance particles
rays"
string option.
"irradiance particles file" <file_name_string>:
specifies the file name for the Irradiance Particle map. If the file
exists, mental ray will try to read the Irradiance Particle map from
it (unless"irradiance particles rebuild"
string option is
set on) . If the Irradiance Particle map is not (successfully) read
from the file, mental ray compute it and save it to a file with the
given name. This is consistent with the option for photon maps. The
default value is no name, meaning that Irradiance Particle is not
associated with a file.
"irradiance particles rebuild" <boolean>:
if set
on
, mental ray will compute the Irradiance Particle map
even if a file with a name given with the previous string option
exists. If it if off
, then mental ray will either read
it from file (if the "irradiance particles file"
string
option is used) or it will reuse the Irradiance Particle map coming
from the previous frame rendered. The latter can be useful in
animations, which are flicker-free. However, the Irradiance Particle
map may loose quality if the objects and camera are moving, so this
can actually be done only for fly-throughs. In addition, since the
particle map is view dependent, inaccuracies might show up on the
frame image borders. The default value is on
.
The following command line options are equivalents of the strings
options listed above: -ip
, -ip_rays
,
-ip_indirect_passes
, -ip_scale
,
-ip_interpolate
, -ip_interppoints
,
-ip_env
, -ip_env_rays
,
-ip_env_scale
, -ip_file
,
-ip_rebuild
.
A draft mini-tutorial for this feature is
included in this release.
- The following registries are filled in by mental ray kernel:
{_MI_RAY_VERSION}
contains mental ray version
{_MI_RAY_PLATFORM}
contains the platform name
{_MI_RAY_DATE}
contains mental ray date
- optional
{_MI_RAY_REVISION}
, if set, contains the
internal repository version from which executable has been build.
These registries may be used to setup multiple mental ray versions and
platforms (like 32-bit vs. 64-bit shaders) on the same machine.
Feature improvements:
- Added a new string option
"importon emitted"
. If specifies
the total number of importons to emit and overrides the "importon
density"
string option. The options are similar, but
"importon emitted"
specifies the value which is independent
of the image resolution and thus is better for tuning.
- For the new framebuffer interface, added a treatment of
compatibility-style file types with sign, like
"+rgba"
. This
is not intended and recommended usage, but it resolves a common
mistake.
- For applications integrating raylib: added a new type for progress
message in ambient occlusion computation pass.
Shader changes:
- Extended architectural
mia_physicalsky
shader with the
explicit Perez model.
- For architectural shaders, added
mia_ciesky
shader to the
collection.
- For the architectural physical sun shader, fixed
"automatic_photon_energy"
mode.
- For the architectural material shader, improved performance by ignoring
bumps for finalgather rays.
- For the architectural material shader, fixed the code which removed
specular highlights for finalgather rays.
- For the architectural material shader, fixed wrong reflections of some
volumetric effects.
- For the architectural material shader, fixed possible artifacts from
the "detail distance" feature if no environment shader was used.
- For the architectural output shader, fixed a minor issue in triggering
"once per render" error messages.
Changes in Version 3.6.50.7
Feature improvements:
- For ambient occlusion cache, decreased reaction time on the aborting of
rendering.
Bug fixes:
- Fixed possible crash if finalgathering was called from a volume shader
and BSP acceleration was used.
- For the BSP2 acceleration, fixed possible artifacts due to a missing
motion (time contrast) oversampling.
- Fixed motion transformation inheritance into assemblies instances.
- Fixed severe artifacts if multiply-instanced assemblies were used in
combination with BSP2 acceleration.
- For OpenEXR output files containing multiple images, the
-file_dir
command line option has not been used properly,
fixed.
- For OpenEXR output files containing multiple images, fixed possible
crash if image type conversion for some framebuffer images is
required.
- Removed false error message on editing objects during rendering. The
operation is legal for assemblies.
Changes in Version 3.6.50.6
New features:
- Framebuffer image caching. This option may save a significant amount of
memory for rendering of high resolution images. If enabled, only a small
fraction of each resulted image is present in memory: newly rendered
tiles and tiles recently accessed by the display callbacks, output
shaders, writing out final images into files and kernel in some
diagnostic modes.
Framebuffer image caching is superior to the virtual framebuffers
(-fb_virtual
on
command line option) as for
virtual framebuffers an output image could be memory mapped or unmapped
as a whole, i.e. the advantage was only present if multiple framebuffers
were rendered.
Framebuffer cache may be enabled with the command line option
-fb_virtual cache
or by setting the
miOptions::fb_virtual
value to 2
in the
integration version. The type of the miOptions::fb_virtual
has been changed to integer. Legal values are: 0
for
in-memory framebuffers, 1
for memory-mapped (virtual)
framebuffers, 2
for cached framebuffers.
Note that output shaders operation on usage framebuffers should use
mi_img_get*
and mi_img_put*
functions and avoid
miIMG_ACCESS
and miIMG_LINEACCESS
macro, as
well as mi_img_access
and mi_img_cache_get
functions. Output shaders should also not access
image->height
and image->width
directly,
but use mi_img_get_width
and mi_img_get_height
functions instead.
Feature improvements:
- Construction time for the BSP2 acceleration used in combination with
motion blur has been decreased dramatically. In the current version, some
addition memory is allocated temporarily for the construction period. The
amount of that memory will be reduced in upcoming releases.
Bug fixes:
- For
ccmesh
objects, fixed texturing on seams.
- For hair rendering with the rasterizer, fixed possible artifacts due to
improper
miState::normal_geom
initialization for hair
primitives.
- Fixed a string options tag leak.
- Fixed a memory leak and possible crash in the
Framebuffer::remove
method.
- In finalgather precomputing statistics, do no print out the number of
light shader calls.
Shader changes:
For the base lightmap shader (mib_lightmap_write
), added new
fg_mode
parameter controlling precomputing of finalgather points
on the lightmaps. Possible values for the parameter are: -1 for no
precomputation (compatibility behavior), 0
for every mesh
vertex, N>0
for a single finalgather point per N pixels. The
default value is 3.
Changes in Version 3.6.50.5
Feature improvements:
- Performance of the BSP2 in combination with motion blur has been
improved.
- Do not print an API warning on a shader redeclaration if the
redeclaration is done in the namespace scope, such as an "anonymous"
namespace for assembly or geometry shader. This may be used for including
of shader declarations to assembly files.
- Added
remove()
method to the Framebuffer
class to allow removal of a framebuffer.
- For the
mi_geoshader_echo_tag
function, echo link
statements if the nolinkcommand
echo option has not been
set.
Bug fixes:
- Fixed a parser error for lightprofiles attached directly to
miLight
(i.e. not used as a light shader argument).
- Fixed a parser error for lightprofiles attached directly to
miLight
(i.e. not used as a light shader argument).For the
Framebuffer interface, get_index
no longer modifies the
index value to -1 if a buffer with the given name is not found.
Changes in Version 3.6.50.4
Feature improvements:
- Improved overall BSP2 acceleration performance.
- For the BSP2 acceleration, improved parallelization if placeholder
objects are used.
- Use more intuitive names in the BSP2 progress messages.
- For the Framebuffer interface class, added methods
get_buffercount
and get_buffername
returning
the number of framebuffers and the name of a framebuffer with a specific
index.
- For the
mi::shader::Options::get(const char *, int*)
interface function, recognize boolean option value and convert it to 0 or
1. This fixes a nonintuitive boolean option lookup failure if a variable
of type miBoolean
was used.
Bug fixes:
- For the BSP2 acceleration used in combination with the rasterizer and
motion samples
option equal to 1, build static(no motion)
acceleration. This dramatically reduces memory consumption and improves
performance for that option combination.
- Fixed missing echo of the BSP2 acceleration.
- For scenes with assemblies, fixed possible wrong motion and missing
scene parts due to an erroneous assembly motion bounding box.
- For scenes with assemblies, fixed a possible crash if the main part of
the scene contains no geometry or geometry with no texture spaces only.
- For trilist objects with displacement, fixed echoing of the displace
approximation.
- Fixed possible crash if the rasterizer with a lens shader was used in
combination with the BSP diagnostic mode.
Shader changes:
- For the architectural material shader, significantly improved
performance if the segment shadow mode was used.
Changes in Version 3.6.50.3
Feature improvements:
- For framebuffers, added a boolean
user
flag, the name is
more intuitive. Its semantic is the opposite to the autofill
flag: if set, the content of the framebuffer is not filled by mental ray
kernel. The autofill
flag still can be used as an antonym,
but is deprecated.
Bug fixes:
- Fixed possible crash when using displacement shaders in assemblies.
- For OpenEXR files containing multiple framebuffer outputs, fixed wrong
output for user framebuffers.
- Fixed possible framebuffer counting problem resulted in "failed to
create frame buffer" error message.
- Platform specific: fixed possible parse errors for non-tagged primlist
objects on platforms using GCC4 compiler.
Changes in Version 3.6.50.2
Feature improvements:
- For OEM integrations of mental ray library, file assemblies are
enabled.
- For raylib integrations: added two new functions
mi_disp_fbmap_name
and mi_disp_fbunmap_name
.
These functions may be used by DISP callbacks and are functionally
equivalent to mi_disp_fbmap
and
mi_disp_fbunmap
, but take a name of the framebuffer instead
of the index as argument.
Changes in Version 3.6.50.1
Feature improvements:
- For the BSP2 acceleration, significantly improved performance and
reduced memory consumptions for scenes with motion.
- For the framebuffers, added a new
autofill
flag. If set,
the content of the framebuffer is initialized by the mental ray kernel
according to the framebuffer type (i.e. color, normal, z depth etc.). The
default value for the autofill
flag is true. The
autofill
flag supercedes the useprimary
flag
effective for the color framebuffers only. The useprimary
flag is still supported for compatibility, but integrators are encouraged
to use the new autofill
flag instead.
Bug fixes:
- For the BSP2 acceleration, fixed possible missing geometry for objects
with multiple instances in the scene. Fixed possible self-shadowing
artifacts for such scenes.
- For the debug build only: fixed possible crash if multi-segment motion
blur was used.
- Fixed possible artifacts if a single eye rays spawned a very large
number of rays in the shading subtree.
- Fixed a crash for
mi_query
mode miQ_PRI_INDEX
used on a miState
with state->pri == 0
.
- For
ccmesh
objects with displacement, added clipping of
negative displacement values smaller than -maxdisplace. Added a
warning for NaN displacement values returned by displacement shaders.
- For non-
ccmesh
subdivision surface objects, fixed missing
displacement in the immediate tessellation called by a geometry
shader.
- For the
ccmesh
objects, fixed possible crash for large
scenes not fitting into physical memory.
- For
ccmesh
objects, fixed instance and instance override
approximations which were not taken into account.For ccmesh
objects, fixed possible wrong subdivision level selected for the
immediate tessellation called by a geometry shader.
- Fixed possible view-dependent tessellation quality artifacts for NURBs
if orthographic camera was used.
- Platform specific: for MacOSX platforms, fixed possible tessellation
artifacts in the edge merging.
- For the framebuffer C compatibility interface, fixed
- unintentional coping of the primary framebuffer color to user
framebuffers
- broken output of user framebuffers with index 8 and larger
- echoing of user framebuffers
Shader changes:
- For the architectural material shader, unrolled the change in version
3.6.0.25: if the mental ray kernel trace depth limit is reached, the
black color is returned instead of the environment color.
- For architectural material shadow shader, significantly improved
performance in case of opaque materials.
Changes in Version 3.6.3.1
- The manual has been updated.
Bug fixes:
- For mental ray standalone, fixed wrong command line help for several
command line options.
Shader changes:
- For the architectural round corner shader used in combination with bump
mapping, fixed a crash if the round corner shader was called as a shadow
shader. For scenes using such shader combinations, performance has been
significantly improved.
- For the architectural material shader, fixed possible "glowing object"
artifacts in scenes using finalgathering with low finalgather trace depth
limit and HDR environment shaders.
Changes in Version 3.6.2.8
Feature improvements:
- For
ccmesh
objects with n-sided polygons (not only
triangles and quads), the new fast subdivision surface implementation
introduced in version 3.6.0.20 has been enabled. In addition to increased
performance, the quality of texture mapping for such objects has been
improved.
- Added new
mi_query
mode
miQ_PRI_ASSEMBLY_INST_TAG
. For a valid intersection state,
the assembly leaf instance for the hit primitive is returned. If the
geometry does not belong to an assembly, the null tag is returned. This
query mode may be used by shaders to implement custom attribute
inheritance from the main scene file.
Bug fixes:
- For multihosted rendering, fixed a rare crash observed for scenes using
large bsp acceleration.
- For multihosted rendering, fixed possible database statistics and dump
reporting tags in the NULL module.
- For rasterizer used in combination with volume shaders, fixed a
possible crash for shaders setting
state->pri
to 0, such
as the physical parti_volume
shader.
- For OpenEXR images, fixed a crash for single channel images containing
only the
"A"
channel.
Changes in Version 3.6.2.7
Bug fixes:
- Fixed possible artifacts for sphere and cylinder area lights
originating from a wrong normal transformation.
- For the BSP2 acceleration,
miState::dist
was not set to
zero if no geometry was hit, fixed.
- Fixed void photon emission from object lights.
Shader changes:
- For the subsurface scattering shader, enabled the support for instance
light lists.
- For the physical light shader, fixed wrong energy scaling for
visible rectangle and cylinder lights. This fix affects the
color of ray intersections with lights only, the illumination of scenes
is unchanged.
Changes in Version 3.6.2.6
Feature improvements:
- For the BSP acceleration, removed unused BSP memory control from the
interface. If parsed from
.mi
file, a warning is
printed.
Bug fixes:
- Fixed possible crash if the
miQ_LIGHT_NORMAL
mode of
mi_query
has been used on a cylinder light.
- Fixed a crash if a combination of a contour rendering and a shader
modifying
miState::raster_x/raster_y
was used. The contours
put outside of the currently rendered tile are ignored.
- For texture caching, removed an erroneous info message that conversion
on the fly from one image type to an identical one is required.
Shader changes:
- For architectural material shaders, disable reflection and refraction
interpolation if contour rendering is enabled.
Changes in Version 3.6.2.5
Feature improvements:
- For OpenEXR output files containing multiple framebuffers,
changed the channel naming scheme. The channels names used for color
frame buffer
buffername
are buffername.R
,
buffername.G
, buffername.B
,
buffername.A
. For the primary framebuffer, the channel names
R
, G
, B
and A
are
still used.
Bug fixes:
- For BSP2 acceleration used to render scenes with assemblies, fixed
unnecessary loading of assemblies. In addition to lower memory
consumption, this fix results in significant speedup for scenes with a
large number of assemblies due to a better parallelization of assembly
loading.
- Fixed possible artifacts for
ccmesh
objects: if multiple
regions are created, wrong materials from other regions on the same
surface may be used.
- Fixed possible crash for the ray-trace shadows if the simple
shadow on
mode was used in combination with the BSP
acceleration, and the shadow shader called ray or
shadows tracing functions.
Shader changes:
- Some of the contour shaders were not exported on Windows platforms,
fixed.
- For the architectural material photon shader, fixed possible tracing of
photons in an uninitialized direction.
- Improved embedded strings for shader library date/version.
Changes in Version 3.6.2.3
Feature improvements:
- For scene echoing, do not add
object space
requirement for
irrelevant declaration types.
Bug fixes:
- Fixed a regression in 3.6.1.3: scenes with the combination
scanline on
, trace off
, volume on
,
autovolume on
options were rendered black.
- Fixed possible crash for large scenes using BSP2 acceleration in a
combination with a large number of assemblies.
- Fixed minor memory leaks in assembly loading.
Changes in Version 3.6.2.2
Feature improvements:
- For the rasterizer, improved the statistics output.
- For the framebuffers, added a new
useprimary
keyword for
backward compatibility with the C-style interface for color + Z
files.
- For the sake of consistency, the names for
useopacity
introduced in 3.6.2.1, have been changed slightly.
Bug fixes:
- For multihosted rendering, fixed a crash in animation rendering. For
some tags, the old content was re-transmitted over the network for the
second and subsequent frames.
- For rendering of scenes not fitting into physical memory using a
combination of assemblies and BSP2 acceleration, fixed possible unknown
tag access fatal.
- For the rasterizer, fixed a performance drop originating from increased
shading rate due to unnecessary increased tessellation for objects with
slow motion.
- Fixed a regression in 3.6.0.30: for detailed shadowmaps, fixed missing
shadows if light
shadowmap detail samples
has not been
specified.
- For multihosted rendering, fixed possible freed memory access after a
frame end.
- For framebuffers, added missing default file format.
- Fixed Color + Z combined output for Iff and RLA files using C-style
buffer interface.
Shader changes:
Changes in Version 3.6.2.1
Feature improvements:
Bug fixes:
- Fixed a possible crash in multihosting rendering when a slave was
removed from the list of the rendering hosts shortly after the rendering
finished.
- Fixed possible texture seam artifacts in ccmesh tessellation.
- For some combinations of output statements and non-primary (user)
framebuffers, detect the bit-per-pixel value properly.
Shader changes:
- For base shaders, added a
mib_fast_occlusion
shader based
on the build-in ambient occlusion.
Changes in Version 3.6.0.32
Feature improvements:
- For finalgathering, significantly reduced the requirement for
continuous memory block sizes. This may give memory
usage benefits on 32-bit machines rendering with large finalgather
maps.
Bug fixes:
- For TIFF image file format, fixed file header for RGB (no alpha)
images.
Changes in Version 3.6.0.31
Bug fixes:
- For the rasterizer, take per-object shading samples into account.
- Fixed possible crash on an assembly unload.
Changes in Version 3.6.0.30
Bug fixes:
- Fixed possible crash in multihosted rendering if rasterizer or
shadowmaps were used.
- Fixed a direct allocation of memory (a significant amount if lightmaps
were used), which bypassed internal memory counts.
- Avoid unnecessary memory consumption during lightmap rendering. The
mi_state_set_pri
function called on a lightmap mesh
primitive would invalidate all previous miState::pri
hit
points.
- Fixed null tag access fatal for
ccmesh
es tessellated by
geometry shaders.
- For orthographic cameras, fixed a wrong decision on the number of split
objects to use.
- Include trilists in the tessellation statistics printed at the end of
rendering.
Shader changes:
- For architectural material shader, fixed possible artifacts if an
"ambient light" (light with a shader which sets dot_nl
to 1) was used.
Changes in Version 3.6.0.29
Bug fixes:
- Fixed poor tessellation quality in polygonal and free form surface
object splitting for orthographic cameras.
- Reduced trimming artifacts by improving numerical stability for
clipping of subobject trimming curves.
- Added missing echo of derivatives for free form surfaces.
- For ccmeshes, added missing object view dependency flag. Fixes missing
re-tessellation for rendering of multiple frames.
- Fixed possible artifacts if finalgather was used in combination with
the rasterizer, the BSP acceleration was used and samples motion was set
to 1.
Changes in Version 3.6.0.28
Feature improvements:
- For subdivision surfaces, fixed a crash by intercepting objects with
bad topology (non-2-manifolds) and ignoring them.
- For raylib integration: compile JPG module with C++ in a namespace to
avoid potential name conflicts.
Changes in Version 3.6.0.27
Feature improvements:
- Significantly improved rasterizer performance for high depth complexity
scenes (such as scenes with hair) rendered with the transparency depth
limit added in the version 3.6.0.23.
- For MetaSL shaders, added support for shadow shaders.
Bug fixes:
- Platform specific: fixed freezes in multihosting rendering with Windows
slave/satellite hosts.
- For scenes with a large number of assemblies, speedup assembly
preprocessing.
Changes in Version 3.6.0.26
Bug fixes:
- Fixed a crash for probe rays and ambient occlusion used with hairs.
- Added missing echo of subdivision surfaces creases and corners.
Shader changes:
- For the architectural material shader, fixed a crash if multi-output
material was used as a part of a phenomenon or a shading tree not on its
root.
- Improved documentation architectural and production shaders.
Changes in Version 3.6.0.25
Feature improvements:
- Added a new mi_query mode miQ_STAGE. Shaders may use the resulting
queried value to detect the current rendering stage. The shader.h file
lists possible values: normal tile rendering, finalgather precomputing,
ambient occlusion cache creation, photon and importon emission and
lightmapping.
- Decreased verbosity of the BSP2 acceleration.
Shader changes:
- For the architectural material shader, fixed artifacts and possible
crash for for the ambient occlusion with color bleeding mode.
- For the architectural material shader, reflection and refraction return
the environment color if the mental ray kernel trace
depth limit is reached. The former behavior (black color) was
inconsistent with other mental ray shaders. The behavior if the
shader-specific trace depth limit is reached is unchanged.
Changes in Version 3.6.0.24
Feature improvements:
- Partially reverted changes in the area light sampling pattern
introduced in 3.6.0.22 for compatibility reasons: the new pattern must be
explicitly enabled by a light shader returning value 3 (instead of
miTRUE
) for the first sample of the sample light loop. This
way a better quality of a pattern with known number of samples is
combined with a possibility to use variable number of samples in smart
light shaders.
Bug fixes:
- Fixed a significant tag leak which could lead to running out of tags in
a long rendering sequence.
- Ambient occlusion was disabled for finalgather rays in the finalgather
precomputing stage. Fixed.
- Fixed instance light linkage for volume shaders. The light lists are
taken according to the miState::instance, not to the miState::pri which
is null for the volume shaders. In order to get a lightlist on an
instance, the instance object must be hit by a ray in the current
rendering tile.
- Fixed possible out-of-memory crash for free form surfaces objects using
fine parametric
approximation without displacement.
- Fixed echoing of scalar textures.
- Fixed a crash in rendering of merge groups.
- For
ccmesh
, fixed a possible crash for vertices with
valence larger than 64.
- Fixed artifacts for object area lights.
- For raylib integration only: fixed framebuffer integration issue if
options, camera and rendering calls were accessed from multiple
threads.
Shader changes:
- For the production matte shader, fixed missing environment reflections
on objects seen in reflections. Improved default shader parameter
values.
- For the production
mip_motion_vector
shader, renamed the
raw_floating_point
argument to
floating_point_format
and changed its type to integer. Valid
values are 0 (no floating point is written), 1 (raw floating point pixel
values are written, same as the old "on" value) and 2 (the x
component takes the pixel aspect ratio into account).
- For the architectural material, improved NaN reporting: only the
initial one but not dependent ones is printed.
Changes in Version 3.6.0.23
Starting with this version, changes in the shader packages are given in a
separate list.
Feature improvements:
- For the rasterizer, added a string option
"rast transparency
depth"
and the corresponded -rast_transparency_depth
to limit the depth complexity. For high depth scenes this option may be
used to significantly improve performance without noticeable changes to
the rendered image.
- For the rasterizer, renamed the string option
"motion
factor"
and command line option -motion_factor
to
"rast motion factor"
and "-rast_motion_factor"
for consistency.
- Reduced possible differences in the displaced geometry if the same
scene is rendered twice: with and without rasterizer.
- For free-form surfaces, improved performance of C1-discontinuity
detection.
Bug fixes:
- Fixed inheritance of shading samples defined on instances.
- For subdivision surfaces, fixed an uninitialized motion bounding box
which lead to missing instances.
- If primary framebuffer was assumed implicitly, the user framebuffers
were not created. Fixed.
Shader changes:
- For the architectural portal shader, adjusted the semantics of the
"multiplier"
argument. In addition to the emitted light, it
is applied to the visible light surface if the "visible"
shader argument is set.
- Changed architectural round corner shader to return vector. Added
"bump_mode"
and "bump_vector"
parameters. The
"bump_mode"
defines the semantic of vector arguments and the
return value. If the mode 0 (default), the shader behaves in a backwards
compatible way and perturbs the normal itself. In mode 1, it accepts the
"bump_vector"
as argument and returns the modified bump
vector.
- For architectural environment blur shader, improved the quality of a
strong blur.
Changes in Version 3.6.0.22
Feature improvements:
- Added sharp creases to the new fast
ccmesh
implementation.
- Changes sampling pattern for area light sources. Material shaders using
mi_sample_light
loop may now break the loop without
introducing a major bias after an exact power of 2 samples have been
taken.
- For
ccmesh
, reduce memory consumption and improve
performance for objects which are not split into subobjects.
Bug fixes:
- For
ccmesh
, fixed possible wrong texturing at texture
seams.
- For
ccmesh
, fixed possibly wrong bounding boxes.
- For the rasterizer box filter always used size 1. Fixed.
Changes in Version 3.6.0.21
Bug fixes:
- Fixed a freeze in incremental changes of chained userdata
blocks.
- Fixed wrong maximal subdivision level clipping for subdivision surfaces
parametric approximation.
- Fixed a freeze at raylib exit for echo of tessellated subdivision
surfaces.
- For the architectural sky shader, fixed an artifact if the sun was
partially below the horizon.
Changes in Version 3.6.0.20
Feature improvements:
- Added a completely new subdivision surface
implementation based on a mixed triangle-quad subdivision
scheme. The new implementation is several times faster
than the previous one.
The following approximation types are supported by the new
implementation:
parametric
[fine] [view] length [min max]
In version 3.6.0.20 the new code path is used for triangle-quad
ccmesh
input objects not containing features listed below.
The new fast implementation support for the these features will be added
in upcoming versions:
- sharp creases (added in version 3.6.0.22)
- semisharp creases
- vertex features
- n-sided polygons (not only triangles and quads) in
ccmesh
(added in version 3.6.2.8).
For objects containing containing one of the above features or other
types of approximations, the mental ray 3.5-based subdivision surface
implementation is used.
- For the BSP2 acceleration, improve performance for scenes with many
small objects by improving the control of the master BSP tree depth.
- Switched production shaders to use the new framebuffer interface.
Bug fixes:
- For assembly placeholder callbacks,
miState::global_lock
was not initialized. This completes the fix in version
3.6.0.18.
Changes in Version 3.6.0.19
Feature improvements:
- Framebuffers are echoed with the new interface.
Bug fixes:
- For
mi_api_framebuffer_add function
, allow
filetype and filename arguments to be null. This way
framebuffers with no image files associated to them can be declared in
the C-style API.
- Fixed tile artifacts for rendering of hair in combination with instance
lightlists.
- For hair rendering, fixed artifacts on semi-transparent hair strains
shaded twice due to hair subdivision. Improved hair rendering
performance.
- Fixed bad syntax for user data block echo.
- Internal stack overflow check was nonfunctional except for
mi_call_shader
function calls. Fixed.
- For scenes containing both assembly and object
instances, fixed missing geometry issues.
- For architectural material shader, fixed wrong bump mapping for
reflections introduced recently.
Changes in Version 3.6.0.18
Bug fixes:
- For cameras with output shaders, fixed an unknown tag fatal in the
second frame introduced in the version 3.6.0.17.
- Fixed echo for camera outputs and framebuffers. The echo uses mental
ray 3.5 compatibility syntax, switch to the new framebuffer syntax will
follow.
- For geometry shaders and assemblies call
miState::global_lock
was not initialized. Fixed.
- For architectural portal light shader, fixed possible artifacts if
scanline rendering was used.
- For architectural round corners shader, fixed possible artifacts for
scaled objects.
- For the architectural material shader used in the compatibility
multiple-output mode, fixed a wrong connection of "specular" to
"translucency".
Changes in Version 3.6.0.17
Feature improvements:
- For the BSP2 acceleration, improved heuristic for the local object BSP
trees.
Bug fixes:
- Fixed a crash if
mi_trace_probe
hits an object with no
material.
- Framebuffers prepend
miCamera::output
list used for
rendering and cleaned up properly after the rendering finishes. For
rendering of multiple frames this fixes a possible unknown tag assess
fatal.
- Fixed a regression in version 3.6.0.16: user framebuffers were not
created if output to a file was not specified.
- Fixed a regression in version 3.6.0.16: for incremental cameras, the
output statements no longer accumulate.
- Fixed a crash in
-finalgather_display
mode.
- For the subsurface shader: fixed uninitialized alpha channel for
multiple-output version of the shader.
- For the architectural material: fixed possible crashes and artifacts
for hair and scenes containing objects without a material.
Changes in Version 3.6.0.16
Feature improvements:
- Significantly reduced memory consumption for the trilist objects used
with displacement or in the rasterizer.
- Added a new function
miBoolean mi_api_framebuffer_add(
miTag buffertag,
char *datatypes,
char *filetype,
float *fileparams,
char *filename);
which should be used for the C-style framebuffer API. The functions
mi_api_output_file_parameter and mi_api_output_file_def
are deprecated. The parser has been changed to use the new function.
- Added an extended version of the architectural material shader,
mia_material_x, which supports multiple outputs. added a bump
input argument to improve integration with other shader packages.
- For production shaders, added a new shader
mip_gamma_gain, a simple shader to multiply and/or apply gamma
to a color. Added a new mip_rayswitch_environment shader to
perform choice based on the hit type (the background, or something else).
Added shaders for mirror and grey ball environment maps. For matte
shadow, added support for instance light lists, multiple outputs, ambient
occlusion, grayscale shadow catching and so called illuminators (a
second light list that actually illuminates the matte objects).
- Added multiple output for the fast subsurface scattering shader.
- For spectral rendering, allow to specify spectra shader arguments as an
(interleaved) list of wavelength and values directly.
- If an undefined registry or environment variable has been used in the
string lookups (like search path lists), the complete string has been
evaluated to empty string. If a registry name started with underscore,
this has been done silently (debug message only). The behavior is changed
to evaluate just the registry itself to an empty string. In particular,
this improves usability if the .rayrc configuration file is
missing or does not contain the standard registries.
- For the BSP2 acceleration, added a limit of 1 Mio rays per eye ray
shot. This decreases severity of a rare issue when a shader traces
multiple continue and transparency rays which lead to a cyclic
hits sequence.
Bug fixes:
- Fixed crashes and missing framebuffers when mental ray 3.5
compatibility framebuffer API was used for user framebuffer
declarations.
- Fixed possible crash in rasterizer if shader set state->pri
to 0.
- Fixed wrong treatment of instance exclusive shadow light lists
containing all lights in the scene.
- Fixed possible artifacts (missed hits) for mi_trace_continue
function used with the BSP2 acceleration. The offset from the initial ray
origin has been applied twice.
- Fixed several memory leaks.
- Fixed multi-core counting for 32-bit executables running on 64bit
Linux.
- Fixed possible crash in rasterizer if autovolume was used.
- For finalgathering, state->pri has not always been properly
set to 0 if nothing was hit. This caused artifacts for some environment
shaders.
- Fixed a crash if finalgather was used in combination with
assemblies.
- Fixed possible crash if finalgather was used with lightmapping and BSP
acceleration.
- If ray tracing is enabled by phenomena requirements or techniques like
finalgather, the acceleration is no longer set to BSP2 automatically.
- For BSP2 acceleration, fixed a significant inefficiency for the BSP
construction in the scenes with a large number of objects with few
triangles.
- Fixed possible artifacts in the hair rendering for hair shading with
strong dependency on precision of the hit.
- For spectral rendering, sort the wavelengths for incoming spectra.
- For spectral rendering, spectra shader arguments are echoed properly
now. The echoed list contains wavelengths and values as used for internal
computations.
- Platform specific: on Windows, fixed possible crash if
mi_trace_continue is used for scenes with assemblies.
- Platform specific: for GCC4 build, fixed infinite recursions and/or
empty tiles in the networking rendering due to broken
deserialization.
Changes in Version 3.6.0.14
Feature improvements:
- For mi_trace_eye function, initialize state->pri
to null before the intersection test. This fixes possible artifacts in
chained lens shaders which shoot multiple eye rays. The
physical_lens_dof shader behavior is not affected as the shader
already set the state->pri to null before tracing eye
rays.
- For the BSP2 acceleration, added a hard limit on the total number of
rays which could be spawned by a single eye ray to prevent deep nested
recursion. Previously, only the recursion depth was controlled.
- For the case when a local filtered texture does not contain pyramids
and the image format has texture caching support (like OpenEXR, Iff or
BMP): downgrade the message that such textures cannot be cached from
warning to info.
Bug fixes:
- Fixed a crash for some combinations of user framebuffer and output
shaders created with the old mental ray 3.5 compatibility interface.
- Fixed a crash for finalgathering used in combination with
assemblies.
- Some memory allocations for C++ class new operators and STL
container allocators were done directly with malloc calls.
Switched them to use mi_mem_allocate. This fixed some inaccuracy
in memory statistics and a possible crash in malloc if the
mental ray memory limit is not set.
- Platform specific: fixed a crash for reading DDS images on MacOSX.
- Fixed a memory leak in network transfers.
- Fixed a minor memory leak in rasterizer for empty tiles.
- Fixed possible crash if large bsp acceleration was used.
Changes in Version 3.6.0.12
Feature improvements:
- For the integration of the library: the internal representation of
framebuffer sets has been cleaned up. The tag/pointer cast on the return
of mi_rc_run_query in miRCQ_FB mode should no longer be
required.
Bug fixes:
- Fixed possible memory leak for small trilist objects with
displacement.
Changes in Version 3.6.0.11
Feature improvements:
- Changed parser to accept the grammar produced by the Reality
Designer™ plugin for usage in Reality Server®. Most of the extensions
are ignored, the options attributes are mapped to the string options.
- Improved performance of polygonal displacement in combination with the
rasterizer.
Bug fixes:
- Restored unintentionally removed -fb_virtual command line
option.
- Fixed lack of motion blur in shadows created with shadowmaps.
- For incremental changes of named chained lens, volume and
environment shaders in the camera, and all types of of named
chained shaders in material: fixed .mi parser to avoid
breaking the chains after parsing the incremental change. Note that the
usage of named chained shaders is strongly discouraged as such shaders
cannot be used in more than one chain.
Changes in Version 3.6.0.10
Feature improvements:
- For state shaders called in miSHADERSTATE_STATE_INIT mode,
miState::type is initialized correctly. This may be used by a
state shader to detect photon emission, lightmap or output shader
stage.
- The miState::cache is no longer used for intersection
optimization. The member is kept for compatibility reason, but should be
considered deprecated. The marker functionality (setting
miState::cache to 0 in order to allow certain shader types to
call ray-tracing functions as documented in the manual) is still available. This
change gives a small performance improvement.
- For debug version only: improved instrumentation of the database
related code.
- Improved performance of mi_shaderstate_get function. This
function is used heavily by some shader packages.
Bug fixes:
- For multihosted rendering, fixed possible network connection failures
introduced in the previous version..
- For multihosted rendering, fixed network transport for the
Framebuffer database type.
- Fixed mi_opengl.so loading failure.
Changes in Version 3.6.0.9
Feature improvements:
- Improved misss_physical shader behavior if it is called as a
shadow shader. In that case, the material parameter is
evaluated. This improves usability under the assumption that the shader
attached to the material parameter can be used as a shadow
shader.
- Improved performance of the PHEN module responsible for the shader and
phenomena calls.
- Slightly improved performance for free-form surfaces subdivision.
Bug fixes:
- Fixed a crash if photon emission for a scene with hair was used.
- Fixed a stack overflow crash if a shader calls light sampling from a
shadow shader (which is illegal) and segment shadow mode is used.
- The mi_mem_set_allocator did not overwrite the allocation,
reallocation and freeing functions properly. Fixed.
Changes in Version 3.6.0.8
New features:
- Caching for the ambient occlusion has been added. The cache is
created prior to the image tile rendering is several passes, each
refining the previous one. The following string options cab be used for
controlling the ambient occlusion cache:
- "ambient occlusion cache" enables the caching. If set to
off, the ambient occlusion passes are skipped and the
occlusion value is computed for each mi_ambient_occlusion
function call. The default is off.
- "ambient occlusion cache density" specifies the maximal
density of ambient occlusion points after all refinement
passes, in points per pixel. The default is 1 ambient occlusion point
per pixel.
- "ambient occlusion cache points" specifies the number of
ambient occlusion points used for interpolation. The default value is
64.
The corresponded command line options are added, abbreviated to
-ao_cache, -ao_cache_density and
-ao_cache_points resp.
Feature improvements:
- For the BSP2 acceleration, support for the motion oversampling has been
added.
- Performance and support for motion blur scenes with the BSP2
acceleration is improved.
- Due to the nature of the BSP2 acceleration, the BSP depth and leaf size
are configured automatically. The BSP diagnostic modes are thus
irrelevant. They are removed for the BSP2 in order to improve
performance.
- For ambient occlusion "ambient occlusion samples" string option has
been renamed to "ambient occlusion rays" in order to distinguish between
the number of rays used to compute an ambient occlusion value, and the
number of points used in the cache interpolation. The experimental
string options "ambient occlusion spread", "ambient occlusion
spreadexp", "ambient occlusion near" and "ambient
occlusion far" have been removed. The miAmbient_occl
structure, the samples member has been renamed to rays,
and cache_points member has been added.
- Removed quadratic complexity on the number of rendering tiles in the
DISP module. This gives a significant speedup for scenes with high
resolution and small tile size.
- For the rasterizer and scanline rendering, significantly improved
performance for scenes with displacement, there a very conservative value
for the maximal displacement value was given and the displace
presample option was not used.
- Command line options for importons are added.
- For the architectural material shader, improved the shadows quality for
transparent objects. The old version would take "total internal
reflection" into account, which could cause the shadow of a glass object
to be completely black. The new version of the shader renders slightly
lighter shadows which gives a better visual impression and is closer to
the physically correct shadows. Note that the physical correct lighting
could only be achieved with caustics.
- For the architectural material shader, added two new modes to the
thin_walled parameter that force the shader ignore the normal
vectors orientation for primary rays. If thin_walled is set to
2, the object hit is treated as solid (thick walled) glass, but the
surface hit by an eye ray is considered to be outside of the
glass, regardless of the direction of the normal. Mode 3 is similar, the
the primary ray interactions are rendered as being inside of a media,
which could be useful for rendering of underwater shots.
- For the architectural material shader, added support for the instance
light lists, following the mode convention used by other shaders
if the mode parameter is set to 4.
Bug fixes:
- Added missed treatment of instance shadow lightlists for hair
objects.
- For volume shaders mi_instance_lightlist always returned empty
light list. Fixed.
- Fixed broken image output for CT image file format for the case then
the frame buffer bit per pixel value differs from those requested for the
output file.
- Fixed a crash if grid acceleration was specified: the mapping to the
BSP2 acceleration is done properly.
- Fixed a crash in photon emission for scenes with volume photons.
- Fixed a crash if a framebuffer without filename was
specified for a camera.
- Fixed wrong index returned by
mi::shader::Framebuffer::get_index().
- The options banner printed in the beginning of rendering lists all
frame buffers, not only those used for writing to files.
Changes in Version 3.6.0.7
Feature improvements:
- Multiple changes improving performance.
- Changed a way color user framebuffers are clipped. Instead of using
clipping identical to the main color buffer, the bit depth of each user
framebuffer is taken into account individually.
Changes in Version 3.6.0.6
New features:
Feature improvements:
- BSP2 acceleration performance has been improved.
- For the TARGA image format, set the image descriptor byte in the header
of RGBA image files to '8-bit attribute data' as suggested by the TARGA
specs (TARGA32 subformat).
Bug fixes:
- For network rendering, fixed possible freezes and crashes if BSP2
acceleration is used.
- Fixed possible shadowing artifacts if ray traced shadows were used.
- Object area lights have been fixed.
Changes in Version 3.6.0.5
Feature improvements:
Bug fixes:
- Fixed several memory leaks.
- Fixed wrong pincounting which could lead to a crash when rendering
large scenes.
- In rasterizer and for BSP2 acceleration, fixed possible wrong
transformation of objects inside of assemblies.
- Fixed possible self-intersection artifacts for the BSP2 acceleration
used in assemblies.
- Fixed possible wrong transformation of visible area lights.
- Fixed crash in rasterizer if a shader has used
mi_trace_continue function.
- Fixed possible memory corruption in rasterizer filtering.
- Fixed missed output if -o command line options was used and
output shader statement was present.
- Fixed a possible crash in volume rendering in autovolume
mode.
- Fixed possible shading artifacts if an orthographic camera was used
with rasterizer.
Changes in Version 3.6.0.3
New features:
- Assembly support. An assembly is a subscene attached to a
bounding box, which is loaded on demand when the bounding box is hit by a
ray, or is contained and not completely occluded in a rendering tile, if
the rasterizer is used. In cases of insufficient memory, assemblies are
unloaded automatically and reloaded the next time they are required.
An assembly may contain all scene DAG elements, such as objects,
instances and groups, as well as textures, materials, shaders, phenomena,
lightprofiles and other scene elements. Lights and cameras can be
contained in an assembly, but they will be ignored in the rendering
process. Thus, shaders and instance light lists should refer to the
lights from the main scene only. This requirement is due to the fact that
the rendering kernel would not be aware of them until all of the
assemblies are loaded in order to apply lights on an object from a
different assembly or from the main scene. In mental ray 3.6 lights
inside assembly would not lit the geometry inside of that assembly, but
this restriction may be removed in the later versions.
An assembly can be created procedurally as a result of geometry shader
call, or loaded from a .mi file.
Geometry shader can register a callback which is called on demand to
create the assembly context, possibly multiple time if the assembly is
unloaded. The API is similar to placeholder object callback. The details
are given in the Assembly API
section of the manual.
In order to add a file assembly to the main scene, the following
syntax must be used:
assembly "assembly_name"
box [min_x min_y min_z max_x max_y max_z]
[ motion box [min_x min_y min_z max_x max_y max_z] ]
file "file_name"
end assembly
The individual parameters are:
- The box statement specifies a bounding box for the
assembly, in the space of the assembly. It is the union of all
bounding boxes of all geometric objects defined in the assembly
transformed to the assembly space. The box parameter must
always be specified since it is not possible to compute the bounding
box without loading the assembly.
- The motion box is similar to the box, but contains the
minimum and maximum components of all motion vectors. For assemblies
with motion the motion box must be specified. Unlike object
motion bounding boxes, the assembly motion bounding box should take
into account not only object motion vectors, but also motion
transforms inside of the assembly.
- The file statement specifies the name of the file where
the subscene is stored. A list of directories for looking up the file
can be specified with the -assembly_path path_list
command line option, with the {_MI_REG_ASSEMBLY} registry,
or with the MI_ASSEMBLY_PATH environment variable.
Assemblies files should contain a root statement at the end:
root "group_name"
The group "group_name" would be attached to the main scene of the
assembly.
Nested assemblies are not supported.
For more details see the the Assembly section of the manual.
Known limitations in the current version:
- The standard BSP tree does not support assemblies. The new BSP2
acceleration described below should be used for ray tracing.
- Unloading of assemblies is unstable. In particular, on unloads,
there could be minor memory and tag leaks on anonymous shaders and
materials.
- The assembly exit callback is not called.
Note: unlike objects, assemblies do not have visible,
trace, shadow and similar flags enabled by default. During
the scene preprocessing the inheritance rules apply up to the assembly
attachment level. In particular, this means that an instance of an
assembly (or some instance of a higher hierarchy level) must have the
corresponded flags set explicitly. The inheritance inside of assembly is
applied only when the assembly is loaded.
- MetaSL support. MetaSL is a powerful shading language targeting
current and future shading requirements. mental mill®, a product
of mental images, can be used to create MetaSL shaders and graphically
compose shader graphs and phenomena. The proprietary mental mill compiler
technology generates abstract syntax tree representations of shaders and
Phenomena. These are then translated to the software and hardware shaders
libraries by mental mill. Software shaders are linked as usual
dynamic libraries.
Note that mental mill is not a part of mental ray. The shader
libraries created by mental mill are used by mental ray in the same way
as is done for the "native" shaders compiled from conventional
programming languages like C++.
mental ray shading functionality has been extended to allow efficient
support for the MetaSL shaders.
It is possible to use a mixture of native and MetaSL shaders in the
same scene. It is also possible to combine "native" software mental ray
shaders and MetaSL shaders in a shader tree or in a mental ray Phenomena
at rendering time.
- New BSP acceleration technique. A new BSP acceleration technique
has been developed for efficient rendering of large BSP trees. It may be
enabled by the "-acceleration bsp2" command line option, or with
the "acceleration bsp2" option in the .mi file.
Unlike the traditional BSP acceleration (which is still available),
the new techniques does not require manual tuning for BSP traversal
performance and memory consumption improvements. Depending on the scene,
the new BSP2 tree acceleration can be faster or slower (for small scenes)
than the traditional one. However, the memory requirements are much
lower. Thus, the new BSP2 is recommended for rendering of large scenes,
especially scenes which do not fit to the physical memory of a machine,
and for scenes containing assemblies. If the new BSP2 acceleration
technique is used for scenes with assemblies, an independent tree is
created for each assembly. This allows the complete removal of all
structures associated with the BSP if an assembly is unloaded from
memory.
Limitation in the current version: for scenes with motion, time
contrast oversampling is not supported yet.
- Importons. Importons are "particles" similar to photons.
However, they are shot from the camera and traverse the scene in the
opposite order. Instead of "energy", they hold a quality which is an
importance of the contribution to the final image. The information from
importons is used by the kernel for distribution of rendering efforts
according to the final contribution to the rendered image, i.e. so-called
importance-driven sampling. Importons are thus a foundation for new
view-dependent indirect illumination techniques. As a first of them,
mental ray 3.6 adds an importance-driven photon map described below.
Further techniques are in development.
Importon emission is done before photon emission and tile rendering.
The string options controlling the importon emission are:
- Boolean "importon" enables the importon emission. The
default value is off.
- Float "importon density" controls the number of importons
shot from the camera per pixel. The minimal value for this option in
the current implementation is 0.02, i.e approximately 1
importon per 50 pixels. The default and recommended value is
1. Lower values will speed up importon emission, but will
also lead to a worse final image quality.
- Float "importon merge" is the world-space distance used to
merge importons closer than that distance. The default value is
0.0, which means than merging is disabled.
- Integer "importon task size" controls the pixel size of
the importon emission jobs. The default value is 64. In most cases
importon emission takes much less time than rendering of the image,
so this is a fine-tuning option only.
- Integer "importon trace depth" controls the diffusion of
importons in the scene. If set to zero, importons will not scatter on
the diffuse bounces. In some cases it may be required to use more
than a single diffuse bounce. This is the case if the combination
with finalgathering is used, or when the "importon traverse"
option is set off.
- Boolean "importon traverse", if set on, enables a
special behavior of importons traced from the camera. Such importons
would not be blocked by even completely opaque geometry. Instead,
they would be stored for all intersections with geometry on the ray
from the camera to infinity. This leads to a significantly higher
number of importons stored in the scene. However, it removes the
discontinuity in the distribution of the importons originated from
the visibility to the camera function.
Most of the existing photon shaders work out of the box with
importons.
Limitations in the current version: importon emission does not work
properly with lens shaders significantly modifying the direction of eye
rays, such as a fish eye lens.
- Importance-driven photon maps. A new technique based on the
importon map described above has been implemented. This technique is
superior to the photon merging introduced in mental ray 3.5. If importons
are enabled, they are used to control the density of the globillum photon
maps and to improve the lookup time.
If importons are enabled, the "globillum merge" option has no
effect. The merging density is controlled by the importon merging
distance instead.
Like for photon map merging, the number of photons emitted to the
scene should typically be much higher than the number of photons stored
in the map. Unlike for simple photon merging, there is a limit on the
side of the photon map after merging: a photon is kept in the photon map
only if an importon close to it could be found. This puts a natural limit
on the size of the photon maps as the number of photons stored in the
scene can not significantly exceed the number of importons, and the
latter has simple dependency on the image resolution and "importon
density" string option value.
As a bonus effect, reduced photon counts result in faster photon map
lookups. Distribution of photons according to the contribution to the
final image significantly improves the resulting visual quality. In order
to avoid artifacts on the contours of the objects and at the edges of
occlusion from the camera, it is recommended to set the "importon
traverse" option on.
In the current implementation, importons are only used for the
creation of photon maps. Thus, importons are discarded after the photon
emission is completed.
Ambient occlusion. A native implementation of ambient
occlusion has been added. A shader may call the new function:
miScalar mi_ambient_occlusion (
miState *state,
struct miAmboccl_options *amboccl_options,
miVector *bent_normal);
The optional bent_normal argument, if not null, will be filled
with an average of un-occluded directions. The ambient occlusion options
structure is the following:
struct miAmboccl_options {
int size; /* size of the structure */
int rays; /* number of probe rays */
miVector axis; /* the axis for the cone */
miScalar spread; /* cosine of the spread angle */
miScalar spread_exp; /* the exponent of the cosine distr */
miScalar mindist; /* near clipping distance */
miScalar maxdist; /* far clipping distance */
int cache_points; /* # ao points for lookup */
};
The size argument contains the size of the structure for the
current version of mental ray, allowing future extensions without
breaking binary compatibility. The samples argument is the
number of probe rays shoot for computing ambient occlusion at a shading
point. The axis and spread arguments contain the main
direction and cosine of the angle, defining the cone in which ambient
occlusion samples are taken. Note that the spread value of 1
corresponds to the angle opening of zero degrees, and the value of 1 to
90 degrees, i.e. to a hemisphere. The cosine_exp argument
defines the exponent used for the weighting of samples. The
mindist and maxdist arguments define near and far
clipping distances for computing occlusion. For efficiency, it is
recommended to use reasonably small maxdist values.
A macro miAMBOCCL_DEFAULT(ao_options, state) can be used to
fill the ambient occlusion options with default values.
The following string options can be used to specify global defaults
for ambient occlusion options:
- "ambient occlusion rays" sets the number of probe rays
shot at a shading point. The default value is 256.
Limitations in the current version: ambient occlusion caching is
available starting with the version 3.6.0.8. Once added, the ambient
occlusion options structure and the list of corresponded global default
options will be extended. The spread value must be non-negative.
The spread_exp value used for the computations is always 1,
meaning ambient occlusion according to the Lambertian BRDF.
- Added support for the DDS image file format for single textures and
cubemaps. Internally cubemaps are stored as a single texture containing
all 6 faces.
- A new mi_query mode miQ_FUNC_IS_ROOT is added. The
miBoolean argument is set to miTRUE if the shader
called called directly by the kernel as a "root" of the shader graph or
phenomenon. A shader returning a large structure could use it to prevent
a possible crash from attaching it directly to a material or light.
- The paint shader library with shaders for the simulation of car paint
was made available with mental ray release 3.5.3.1. For documentation,
please refer to the included Paint
Shaders documentation.
Feature improvements:
- Light lists, when created, may specify the sampling cone by providing
an axis of the sampling cone and a cosine of the spread angle, like in
the code sample below:
mi::shader::Interface* iface;
mi_query(miQ_RAY_INTERFACE, state, 0, (void*)&iface);
auto_ptr<MI::RAY::LightList> llist(iface->createLightList(
state, state->normal, 0.5));
for (mi::shader::LightIterator light = llist->begin();
light != llist->end(); ++light) {
while (light->sample()) {
miColor c = light->get_contribution();
// ...
}
if (light->get_number_of_samples()) {
// ...
}
}
This could be used for sampling lights from both sides of the surface
without the state->pri=0 trick.
- For the rasterizer, added a new string option "motion factor",
float value. If set, it adjusts the effective shading rate on moving
objects. It can be used to improve rendering performance for motion
scenes without a visual quality decrease.
- For the rasterizer, added new shading_samples field to
miObject and miInstance, which allows overriding the
global shading samples specified in the options. The corresponded syntax
in .mi file: shading samples float.
- Added the new importance field to miState. It is
propagated to child rays. For rendering quality/performance improvements,
a shader written for scenes using indirect illumination may multiply this
field by a certain factor before calling mi_compute_irradiance
or mi_trace_... function. The factor may be chosen as an
intensity of the color with which the result of the function call would
be added to the result of the shader, or, in case of tracing multiple
(glossy) rays, as the inverse of the number of rays shot.
- Added the new boolean field photons_only to the
miLight structure. If set, the illumination from the light is
treated as indirect. Light sampling of the light would return black. To
compensate, photons emitted from the light would stored on the first
bounce in addition to the second and further bounces. For a physically
correct scene, the illumination model is thus the same.
This option can be used for significant performance improvement for
scenes with a high number of low intensity lights: the length of the
light lists, and thus the number of light shader calls and shadow rays is
reduced significantly at the price of a larger photon map.
The corresponding .mi syntax in the light section:
photons only boolean.
- Added new finalgather mode. If the string options "finalgather
mode" is set to "force", finalgather map creation and
interpolation will be disabled; a set of finalgather ray will be shot
each time mi_compute_irradiance or
mi_compute_avg_radiance is called. The rendering speed would be
much slower than in other finalgather modes, delivering a superior image
quality.
- For OpenEXR output files, allow to combine arbitrary frame buffers in
the single output statement. Before this update, only the combination of
the main color buffer and Z buffer was possible. Added the possibility to
write any subset of the first 8 user framebuffers (i.e. "fb0" to
"fb7") to such files. If an OpenEXR output file contains a user
framebuffer and at least one other buffer, the user framebuffer channels
are called "Rn", "Gn", "Bn", "An", where n if the index
of the user framebuffer for color type outputs, "Zn" for Z-depth
output etc.
- Restored mi_img_type_query function in the shader interface.
For a given image type this convenience function returns the number of
component, and the number of bits per component. It also fills the
optional array of 4 booleans with flags for the components if
present.
- For raylib integration: changed mi_disp_fbmap function to
return 0 if called with out of range index. In particular this should
simplify integration of the display callback in the finalgather
precomputing preview mode.
- Significantly improved parallel performance on some platforms with
large number of CPUs and non-uniform memory access (NUMA).
- In physical library, dgs_material,
dielectric_material and path_material shaders get the
"mode" argument, which is the same as for base shaders. The
allowed values for mode are:
- Mode 0 is the compatible behavior, light lists are taken as is.
- Mode 1 applies mi_inclusive_lights
- Mode 2 applies mi_exclusive_lights
- Mode 4 forces shader to use the instance light list.
The versions of the shaders have been incremented.
- Added new boolean string option "contrast all buffers". If
set, the contrast oversampling test is done based on all color buffers,
including user framebuffers.
- Added mi::shader::Options::remove method for string options
removal.
- For mental ray library integrations, if the
mi_api_variable_set function is called with null name
and value arguments, the whole API variable table is cleaned
up.
Changes affecting backwards compatibility with mental
ray 3.5:
- The miState->pri_idx, the index of triangle in the
sub-object box, is removed. With the changes done for assembly support,
the miState->pri completely identifies a primitive in a
scene. Lightmap and some contour shaders should use the new
miQ_PRI_INDEX query mode to obtain the triangle index. Lightmap
shaders should use the new mi_state_set_pri function to set the
current triangle index.
- Some missing const qualifiers were added to the interface functions.
Compiler warnings or errors would indicated unintentional usage and
should be taken seriously. There is at least one exception though: If GCC
4 is used, it may print out warning on the mi_tri_vectors, which
should be ignored.
- The mi::shader:Interface class now has the new version 2. The
new class is incompatible with the version 1 used in mental ray 3.5.
However, the interface version 1 is still supported and can be obtained
with mi_ray_interface_version, so mental ray 3.5 shader will
not need a recompilation due to this change.
- The camera space (in particular used in the the old .mi1
files) is no longer supported. The geometry will be loaded correctly, but
the texture spaces and other coordinate systems may be wrong.
- Grid acceleration is no longer supported. The main advantage of grid
was the low memory footprint in heavily multiply-instanced scenes. The
BSP2 acceleration technique with assemblies is a superior
replacement.
- In the miOptions, the fields rapid_shading_samples,
rapid_collect_rate and rapid_motion_resample are
renamed to more intuitive rast_shading_samples,
rast_collect_rate and rast_motion_resample
respectively.
- For the integrators on Windows: setting binary mode on the stdin
is no longer applied. If raylib is integrated into a standalone-style
product which could be used in the pipe mode, the mode must be set in the
integrated code explicitly with the call: _setmode( _fileno(stdin),
_O_BINARY).
- mental ray 3.6 keeps file outputs and output statements separately. All
output image files are written out after all output shaders are applied.
Writing out a frame buffer to one file, applying an output shader to that
framebuffer and writing the modified buffer to a different file is not
possible.
Bug fixes:
- Fixed a crash in the parsing of phenomena containing named structs with
names longer than one character.
- Fixed a crash in combined floating point color and z-depth output
("+rgba_fp,+z" and "+rgb_fp,+z" output statement) supported for
iff file format.
- Fixed a memory corruption when finalgather is used in simple or
multiframe mode, and mi_compute_avg_radiance is called with varying
number of FG points.
- In multihosting rendering, fixed a possible crash when a local texture
is deleted between frames.
- Fixed a crash in photon emission from rectangle and disk area lights
when the projection map rejected all emission directions.
- Fixed a crash in the mi_scene_growedit function called for the
miSCENE_NBOX type.
- Fixed a crash during tessellation of inaccurate objects where some but
not all vertices have bump vectors.
- Fixed a possible memory corruption in the polygonal object
splitting.
- Fixed a crash when the mi_sample function was used in detail
shadow maps rendering
- Fixed a possible crash when using the "automatic" final gathering mode
and setting the number of final gathering points to 0.
- Fixed possible memory corruption when reading extended photon maps for
the finalgather fastlookup mode
- The value of the register _MI_REG_MEMORY_LIMIT is now in
megabytes.
- When using rasterizer, the Z-buffer contained the depth of the first
completely opaque hit instead of the first not fully transparent one.
Fixed.
- In the rasterizer, fixed front/back face check for object instances
flipped in one axis (i.e. those with negative transform determinant).
- Fixed possible motion artifacts in rasterizer when using motion
steps.
- The content of hair placeholder objects was accessed during the scene
preprocessing, resulting in unnecessary generation of all hair objects.
Fixed.
- Fixed black tile artifacts in multihosted rendering of hair.
- Fixed missing lightmap baking of secondary bounces of finalgathering
with mi_finalgather_store function.
- Fixed shading artifacts for shaders using mi_trace_continue
function. The returned state->dist value was wrong.
- Fixed wrong default importance value for 3rd and higher finalgather
diffuse bounces, which could lead to spot artifacts.
- In rasterizer, fixed missing initialization of state->dir
for the lens shaders.
- Improve numerical accuracy of intersections with BSP in scenes with
small scene diameter, but a large distance to the camera.
- Fixed a precision problem for trimming curve in-out computations for
the case of two shared endpoints.
- When using images in the 16 bit half-float format with color profiles,
the color profiles were not applied correctly. Fixed.
- Fixed reading of scalar textures from TIFF images with a single scalar
channel. Previously, such textures had to be converted to 3-component
color textures.
- In debug version only, removed incorrect assert in lightprofile
interpolation.
- In debug version only, fixed an assert for IES light profiles of type C
with symmetry plane at 90-270 degrees and both correction flags (rotate
and flip) set.
- Platform specific, in debug version only: on 64-bit Windows, removed
incorrect assert in mi_lock function.
- Platform specific: fixed photon map artifacts for 64-bit Linux platform
executable compiled with GCC 4.
- Platform specific: fixed geometry merging artifacts on MacOSX X86.
- Platform specific: on Linux, fixed a possible mi_openexr.so
linkage error if the LD_BIND_NOW environment variable is
set.
- Platform specific: on 64-bit Linux, fixed possible crash in standalone
mental ray when fatal error message was issued.
- Platform specific: on AIX, fixed free form surface conversion which
resulted in broken tessellations.
- Fixed echo of named geometry shaders attached to instances.
- Removed possible incorrect error message when echoing requirements for
instance groups used as geometry shader arguments.
- Fixed echo of some objects with multiple approximations.
- For mental ray standalone, fixed the help line for finalgather
modes.
- Fixed a light linkage compatibility issue in base,
physics and paint shaders. If an empty light list
argument was passed to a shader, the instance light list was used
instead. This is no longer the case, the instance instance list is used
only if the mode argument is set to 4.
- Fixed a bug in exclusive instance light lists: if such a list contained
all lights from the scene, the resulting light iterator looped over the
list of all lights, instead of the empty list.
- Fixed possible filtering artifacts for the combination of the following
conditions:
- the filter is non-trivial (i.e. not box 1 1 ),
- framebuffer(s) always filtered with the default box 1 1
filter are present (for example, the Z-depth framebuffer),
- min samples sampling rate is negative.
- Fixed possible artifacts on coarsely tessellated objects in the
mib_glossy_reflection shader used with large u_spread
and v_spread values. If the reflection goes below the horizon
due to the difference between geometry and interpolated normal, always
shoot at least one ray above the horizon.
- Fixed possible artifacts if more than 2 billion photons were
emitted.
- For chained lens shaders, propagate state->pri and
state->instance properly. In a lens shader, the
state->pri can be used to determine if an object has been hit
by an eye ray.
- For lens shaders in the rasterizer, state->pri refers to the closest
primitive hit or is set to null if there was no hit. This allows lens
shaders to detect the no-hit case.
- For the subsurface scattering shader, fixed low indirect illumination
quality problem if the shader is used in combination with
finalgather.
- In physical_lens_dof shader, fixed a typo leading to too dark
images in the finalgather preview mode.
- In physical_lens_dof shader, fixed no-hit artifacts when
shader is chained with other lens shaders.
- Fixed inconsistencies between shader.h and
geoshader.h public headers and mental ray functions exposed for
the linkage.
Support for OpenEXR
OpenEXR is a flexible image format designed by Industrial Light &
Magic, which has been integrated in mental ray 3.3.0.389 and later versions.
OpenEXR comes with the following copyright, which applies only to the OpenEXR
portion of mental ray:
Copyright © 2004, Industrial Light & Magic, a division of Lucasfilm
Entertainment Company Ltd. Portions contributed and copyright held by others
as indicated. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Industrial Light & Magic nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The ``Pxr24'' compression in OpenEXR comes with the following copyright,
which apples only to parts of the OpenEXR portion of mental ray:
Copyright © 2004, Pixar Animation Studios
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Pixar Animation Studios nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright
Information
Copyright © 1986-2009 mental images GmbH, Berlin, Germany.
All rights reserved.
This document contains proprietary and confidential information of mental
images GmbH and is protected under copyright law. The contents of this
document may not be disclosed to third parties, translated, copied or
duplicated in any form, in whole or in part, without the express written
permission of mental images GmbH.
The information contained in this document is subject to change without
notice. Neither mental images GmbH nor its employees shall be responsible for
incidental or consequential damages resulting from the use of this material
or liable for technical or editorial omissions made herein.
mental images®, mental ray®, mental matter®, mental mill®, mental
queue™, mental q™, mental world™, mental map™, mental earth™,
mental mesh™, mental™, Reality™, RealityServer®, RealityPlayer®,
RealityDesigner®, MetaSL™, Meta™, Meta Shading™, Meta Node™,
Phenomenon™, Phenomena™, Phenomenon Creator®, Phenomenon Editor™,
Phenomill™, Phenograph™, neuray®, iray®, imatter®, Cybernator™, 3D
Cybernator™, Shape-By-Shading™, SPM®, NRM™, and rendering imagination
visible™ are trademarks or, in some countries, registered trademarks of
mental images GmbH, Berlin, Germany.
All other product names mentioned in this document may be trademarks or
registered trademarks of their respective owners and are hereby
acknowledged.