mental ray Release Notes
Version 3.7.1.25
Jul 18, 2008
Copyright © 1986-2008 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.
- Some shaders compiled for previous versions may need recompilation to
be used with this version.
- Version 3.7 cannot be combined with version 3.6/3.6+(3.6.50 and later)
and earlier versions in network rendering.
Changes in Version 3.7.1.25.
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.
- For the BSP2 acceleration, fixed a regression in the revision 3.7.1.23:
an uninitialized variable could cause crashes or freezes for some
scenes.
- 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 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.
- Removed unintended dependency of caustic photon map on importon map.
This improves the visual quality of caustics.
- Fixed broken echo of object faces.
- Platform specific: on Windows (32 and 64 bit), the vararg argument for
mi_query
mode miQ_TEXTURE_DIM
been passed
properly to the kernel, which caused crashes on 64-bit platforms.
Fixed.
Shader changes:
- Added multiple-output version of the car paint phenomenon
mi_car_paint_phen_x
.
Changes in Version 3.7.1.24.
Feature improvements:
- For the BSP2 acceleration, added functionality to reduce allocation of
large amount of memory during the construction of the BSP2 for the
motion blur scenes. This change is analogous to
the change in version 3.7.1.23 done for the static case.
- 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.
- 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 BSP2 acceleration, some memory blocks were not put under mental ray
memory management. This improves memory usage statistics and fixes a
potential segmentation fault crash.
- Fixed
mi_query
mode miQ_FUNC_IS_ROOT
.
Returned values for secondary (reflection, refraction) rays were wrong,
which could cause crashes for some shaders, including the architectural
material shader.
- For OpenEXR headers, fixed possible crash when reading images of types
a
, a_h
, a_fp
, m
,
n
and z
.
- Fixed echo of default shader parameter values for parameters declared
textually after an array one.
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.1.23.
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.
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.
- Fixed a crash in mental ray when writing out images of
"vta"
, "vts"
, "tag"
or
"bit"
types into OpenEXR files.
- Export
mi_api_get_assembly_root()
function properly.
Changes in Version 3.7.1.22.
Bug fixes:
- Fixed a linkage errors if
Access_bsdf
was used in a
shader.
- For the BSP2 acceleration, fixed possible motion artifacts for
multiply-instanced moving objects.
- Fixed running out of memory in parsing of surfaces with very high
number (50000) of trimming curves.
- Fixed a rare crash in the object splitting code coming from
out-of-range array read.
Changes in Version 3.7.1.21.
Feature improvements:
- Added a progress percentage message for optimization of Irradiance
Particle maps with large number of particles.
Changes in Version 3.7.1.20.
Bug fixes:
- For builtin bsdfs, fixed missing contribution of environment lighting
in glossy reflections.
Shader changes:
- For the architectural material shader, fixed possible rare freeze in
ambient occlusion computation.
Changes in Version 3.7.1.19.
Feature improvements:
- 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.
declare shader color "builtin_bsdf_architectural_comp" (
color "diffuse" default 0.5 0.5 0.5 1,
scalar "diffuse_weight" default 1,
scalar "diffuse_roughness",
color "refl_color" default 1 1 1 1,
scalar "reflectivity" default 0.6,
scalar "refl_gloss" default 1,
boolean "refl_is_metal" default on,
color "refr_color" default 1 1 1 1,
scalar "transparency",
scalar "refr_gloss" default 1,
color "refr_trans_color" default 0.7 0.6 0.5 1,
scalar "refr_trans_weight" default 0.5,
scalar "anisotropy" default 1,
scalar "anisotropy_rotation",
integer "mode",
array light "lights",
scalar "refr_ior",
boolean "brdf_fresnel",
scalar "brdf_0_degree_refl",
boolean "refr_translucency",
integer "anisotropy_channel",
integer "refl_gloss_samples",
boolean "refl_interpolate",
boolean "refl_hl_only",
integer "refr_gloss_samples",
boolean "refr_interpolate",
scalar "brdf_90_degree_refl",
scalar "brdf_curve",
boolean "brdf_conserve_energy",
integer "intr_grid_density",
integer "intr_refl_samples",
boolean "intr_refl_ddist_on",
scalar "intr_refl_ddist",
integer "intr_refr_samples",
boolean "single_env_sample",
boolean "refl_falloff_on",
scalar "refl_falloff_dist",
boolean "refl_falloff_color_on",
color "refl_falloff_color",
integer "refl_depth",
scalar "refl_cutoff",
boolean "refr_falloff_on",
scalar "refr_falloff_dist",
boolean "refr_falloff_color_on",
color "refr_falloff_color",
integer "refr_depth",
scalar "refr_cutoff",
scalar "indirect_multiplier",
scalar "fg_quality",
scalar "fg_quality_w",
boolean "ao_on",
integer "ao_samples",
scalar "ao_distance",
color "ao_dark",
color "ao_ambient",
boolean "ao_do_details",
boolean "thin_walled",
boolean "no_visible_area_hl",
boolean "skip_inside_refl",
boolean "do_refractive_caustics",
boolean "backface_cull",
boolean "propagate_alpha",
scalar "hl_vs_refl_balance",
scalar "cutout_opacity",
color "additional_color",
shader "bump",
boolean "no_diffuse_bump")
end declare
This BSDF may be used to minimize changes to the existing scenes and
translators using the architectural material.
Bug fixes:
- Fixed artifacts in contour rendering used in combination with hull
objects.
- Do not echo built-in BSDF shaders.
Changes in Version 3.7.1.18.
Feature improvements:
- Added support for displacement of primlist objects with no vertex
normals specified.
- 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.
Bug fixes:
- 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.
Changes in Version 3.7.1.17.
Bug fixes:
- 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.
Changes in Version 3.7.1.14.
Shader changes:
- 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.
Changes affecting compatibility:
- For the map containers, use shorter more expressive names for the
classes.
- Size argument taken by memory allocation functions is made
unsigned.
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 now traced as
finalgather rays so that finalgather flags on objects an instances are
respected, instead of reflection/refraction rays and flags in previous
versions.
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 overtessellations 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 accuring after 4 billion of database creation and
editing operations.
- Platform specific: on Linux and Macosx, fixed possible freeze for very
long rendering sessions accuring 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 enabled 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 encounted
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
retessellation 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 wavelenghts 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 TAGRA 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-2008 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.