Releases: NVIDIA/MDL-SDK
MDL SDK 2024.1 (381500.2959): 14 Jan 2025
ABI compatible with the MDL SDK 2024.1 (381500.2959) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
MDL 1.10 Language Specification
- Updated version to 1.10.
- Changed of
diffuse_reflection_bsdf
to improved Oren-Nayar model by Fujii
and added parametermultiscatter_tint
. - Corrected description of
multiscatter_tint
parameter insheen_bsdf
. - Added parameter
f82_factor
to standard distribution function modifiers
directional_factor
andcolor_custom_curve_layer
. - Added standard distribution function modifier
microflake_sheen_bsdf
. - Added standard distribution function modifier
coat_absorption_factor
. - Extended rules for the distribution function normal form with new BSDFs.
-
General
- Added
IBaker::get_type_name()
to obtain the type name for constants to be used
for a given baker instance. Improved the baker documentation w.r.t. the relation between
type of the baked expression, the pixel type for canvases, and the type name of constants. - The MDL SDK is now also available via
vcpkg
. - Added support for the manifest mode of
vcpkg
. - The performance of editing database elements in general has been improved.
- The public API requires now C++ 11. All code paths for C++ 03 have been removed.
- The performance of the module builder has been improved.
- When exporting textures, the gamma value is now exported as metadata
(if supported by OpenImageIO and the underlying image file format). - The cmake option
MDL_BUILD_WITHOUT_CUDA_DRIVER
has been added to support building
the MDL SDK on machines without a CUDA driver being installed. - The recommended/tested thirdparty software versions are now:
vcpkg
: git hash 821100d96.SWIG
: 4.2.1.Windows SDK
: 10.0.22621.0 or newer.- It is now recommended to install the Vulkan SDK also via vcpkg.
- Support for the install target has been improved. In most cases it is no longer
necessary to setLD_LIBRARY_PATH
/PATH
and/orMDL_SAMPLES_ROOT
for running the examples or tools from an installed location. The executables
of the CUDA-based examples also no longer depend on the CUDA SDK, only on the
CUDA driver. - With MDL 1.10, a new lookup table for the "Microflake Sheen BSDF" was introduced.
If not yet supported, integrations need to handle these new 3D RGB textures. - Python Bindings:
- Added
get_data_numpy()
to access texture tile data with numpy. - Renamed internal binding functions to start with an underscore.
- Added type annotations to structure fields.
- Updated to Swig to version 4.2.1.
- Added binding for new
IBaker::bake_texture_with_constant_detection
function.
- Added
- Added
-
MDL Compiler and Backends
- Added support for MDL 1.10.
- Added expression promotion for default arguments of imported entities: Before this release,
an exported entity was bound to the language versions that are supported by the used types
in its signature and the called entities in its default arguments; The last restriction is
now partly lifted: The compiler can now promote expressions from MDL version N to MDL
version M if N > M. This allows to import entities from older MDL versioned modules in to
newer ones, even if they use expressions in its default arguments that are not available in
the new version. The compiler rewrites those expressions with an equivalent expression for
the current version (just as it is done in the internal representation).- Note that this works only for imports from older modules, imports from newer modules to
older modules still might be filtered out if default expressions does not exists in the
older version, because there is not always a downgrade path. - Note further that this is supported for all MDL versions, not only MDL 1.10 now, so
exports can create code that is not accepted by older versions of the MDL SDK/compiler.
- Note that this works only for imports from older modules, imports from newer modules to
-
MDL Distilling and Baker
- Added support for baking
float2
andfloat4
expressions. - Increased the number of texture spaces supported to 16.
- Added a NaN-check so resulting pixel values equal to
NaN
will be replaces by zero. - Both, CPU and GPU bakers, implement a new method
IBaker::bake_texture_with_constant_detection()
. This method is an improved version of
bake_texture()
that detects constant textures.
- Added support for baking
-
MDL SDK examples
- Third-party dependencies:
- Updated
ImGui
to version 1.95.5. - Added modification markers to the changes made in
ImGui
. - Added modification markers to the changes made in
fx-gltf
. - Updated the
d3dx12.h
license to match the one of the origin (still MIT).
- Updated
- MDL Content:
- Updated the formatting and some range annotations in the glTF support module.
- MDL SDK df_native Example:
- Added support for user defined argument blocks.
- Added GUI for interactively change material parameters and displaying renderings
statistics. - Using Class Compilation as default. Command line option "
--cc
" has been deprecated,
and "--nocc
" has been added to force Instance Compilation.
- Core API / MDL SDK code_gen Example:
- Also dump render state usage with option "
–dump-meta-data
".
- Also dump render state usage with option "
- MDL SDK Example Distilling:
- Added option "
--no_constant_detection
". By default (i.e. "--no_constant_detection
"
not set), the distilling example detects baked textures containing a constant color and
falls back to baking a constant instead. If the option "--no_constant_detection
" is
set, then the example does not attempt to detect constant colors in the baked textures.
- Added option "
- MDL SDK Example DXR:
- Added support for the KHR_materials_anisotropy glTF extension.
- Updated
d3dx12.h
to the latest version. - Updated fx-gltf to version 2.0.0 and the corresponding nlohmann/json to version 3.11.3.
- The
ICompiled_materials
are now dumped in addition to shaders when running with
"--gpu_debug
". - Generated MDL code, from MaterialX, is now also dumped formatted for better readability
when running with "-g
".
- Vulkan Examples:
- The examples use vcpkg for building now and don't need the Vulkan SDK anymore.
- Added option for selection a specific GPU.
- Added SPIR-V optimization and option to disable it.
- MDL SDK Example df_vulkan:
- It now uses and requires VK_EXT_descriptor_indexing for unsized and partially filled
texture arrays in the MDL renderer runtime. This eliminates the need for the indirection
through the texture index buffer in the old implementation. - It now uses the single-init mode.
- Added GUI for changing display settings and material parameters, and displaying
rendering statistics. - Added output of auxiliary albedo_diffuse/glossy and roughness.
- Added options for v-sync and the texture results cache size.
- It now uses and requires VK_EXT_descriptor_indexing for unsized and partially filled
- Added new Core API example "df_native" that shows different compilation modes and options
and how to generate target code for the native backend. - Added new Core API example "df_vulkan" for demonstrating generation and usage of
distribution functions using the GLSL backend in a Vulkan-based path tracer.
- Third-party dependencies:
Fixed Bugs
-
General
- Fixed export of MDL modules with animated and/or uvtile textures if
the texture file exists already. - Fixed
IModule::get_resource()
to enumerate resources that appear in bodies and
temporaries of functions. - Fixed resources appearing in expressions returned by
Function_definition::get_body()
andget_temporary()
. - Fixed some sources of duplicated log warnings.
- Fixed missing filenames in
ILight_profile::get_filename()
and
IBsdf_measurement::get_filename()
if the resource resides in an MDL archive or MDLE file. base.mdl
: Avoid undefined behavior by skipping tangent updates when this would cause
a division by zero.- Fixed
IExpression_factory::create_direct_call()
to support
temporary references as arguments. - When creating MDLEs of variants, the
::anno::origin
annotation now points to the
variant itself, not to its prototype. - Fixed names of some unit test targets to support the cmake generator for Ninja.
- Fixed documentation for the
::base
and::nvidia::core_definitions
modules to match
exactly the version of those modules.
- Fixed export of MDL modules with animated and/or uvtile textures if
-
MDL Compiler and Backends
- Skip transmission check for thin-walled materials in target material mode, because the
analysis is only supported with the material constructor as a root of the compiled material. - Fixed inserting unnecessary
decl_cast
when the root of the compiled material already had
the correct type. This broke the target material mode, always resulting in a material
constructor. - Fixed wrong error message when a material and sub types are used as parameters
for declarative functions. - Functions used inside default argument expressions of struct constructors are now
auto-imported. - Fixed several conditions under which an auto-import of default arguments has failed.
- Fixed missing state usage information for distribution functions and for all functions
compiled in single-init mode. - Fixed handling of material parameters and read-only data constants requested as derivative
values by functions.
- Skip transmission check for thin-walled materials in target material mode, because the
-
MDL Distiller and Baker
...
MDL SDK 2024.0.4 (377400.3959): 07 Oct 2024
ABI compatible with the MDL SDK 2024.0.4 (377400.3959) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
MDL 1.9 Language Specification
- Updated to document version 1.9.2.
-
General
- The default value for the backend option
enable_exceptions
is nowoff
,
as this is the behavior described by the MDL specification.
- The default value for the backend option
-
MDL Compiler and Backends
- Implemented folding of
::tex
function calls with invalid textures on the DAG. - Added “
max_const_data
” backend option to limit the size of global constants in the
generated code when the “enable_ro_segment
” option is enabled. Larger constants are put
into read-only data segment. The default is “1024
” bytes, which corresponds to
the old behavior.
- Implemented folding of
-
MDL SDK examples
- MDL Core code_gen example:
- Added support for single-init mode.
- MDL SDK df_vulkan example:
- Added support for read-only data segments and
max_const_data
backend option.
- Added support for read-only data segments and
- MDL Example Execution Native:
- It now supports the
-p
abbreviation for–mdl_path
as in all other examples.
- It now supports the
- MDL Example df_native:
- Added support for argument blocks in Class Compilation mode.
- Added OpenGL GUI for editing material parameters and displaying stats during rendering.
- Changed default compilation mode to Class Compilation.
- Removed command line option
--cc
which is now replaced
by--nocc
(or disable Class Compilation mode).
- MDL Core code_gen example:
Fixed Bugs
-
General
- libbsdf: Fixed issues for
df::thin_film
overdf::custom_curve_layer
and
df::directional_factor
with normal reflectivity approaching zero. - Fixed a build error if image plugins are disabled.
- Fixed a build error caused by picking up LLVM header files from a different location.
- Fixed documented return codes for
IExpression_factory::create_cast()
and
create_decl_cast()
(error codes are negative as usual, not positive). - Fixed missing build dependencies for the distiller plugins and the distiller example plugin.
- libbsdf: Fixed issues for
-
MDL Compiler and Backends
- Allow material sub structs to be used inside a declarative struct and declarative functions.
- Improved error message in case a select operator cannot be executed because of the
left-hand-side type was not imported. - Fixed wrong HLSL/GLSL read functions used for shadow copies of function parameters.
- Fixed crash when compiling a function which receives a material parameter but doesn't
use the state (GLSL backend with rodata segment disabled). - Avoid undefined behavior with "%" operator for negative values for GLSL
by implementing “a % b
” as “a - (a / b) * b
”. - Report when a standard library module is imported with a weak relative import names from
a module in a search path root. This is needed because standard library modules are
loaded from a high-priority search path and would shadow any relative import. This will
trigger a warning for MDL versions between 1.6 and 1.9, and an error for MDL versions
greater than 1.9. - Fixed the documentation of the backend option "
hlsl_use_resource_data
" and
"glsl_use_resource_data
". These are recognized but not supported at the moment. - Fixed compilation of calls to non-inlined functions which receive material parameters as
arguments for GLSL/HLSL. - Return identity matrix instead of zero for unimplemented
tex::grid_to_object_space()
. - Fixed crash when compiling an expression as
const
which only becomesconst
after
optimization (e.g. by getting rid of state access). - libbsdf: Fixed wrong shadow mask in microfacet BSDFs.
- libbsdf: Avoid
NaNs
due to out-of-range roundings during random number updates. - MDL Core: Fixed resource indices for native code if a custom texture runtime is used.
- Fixed crashes if a non-constant default constructor occurred during code generation
in various backends.
MDL SDK 2024.0.2 (377400.2626): 07 Aug 2024
ABI compatible with the MDL SDK 2024.0.2 (377400.2626) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
- General
- MDL Arnold: Added support for Arnold SDK version 7.3.2.1.
Fixed Bugs
-
General
- Fixed missing leading "::" for qualified names reported by
IMdl_discovery_api
,
if search paths had a trailing OS separator. - Improved error message that can be triggered when calling non-const methods
on const objects. This can e.g. be triggered via the Python binding by accessing
(not editing) database elements. - Improved coverage tests for the Python binding.
- Fixed missing leading "::" for qualified names reported by
-
MDL Compiler and Backends
- Fixed crash in some cases when derivatives were calculated for a struct also containing
non-floating point fields. - Fixed wrong digit that can be added to
tex::texture_isvalid()
calls for
HLSL and GLSL backends, if more than one texture type (for instancetexture_2d
and
texture_3d
) are used together in one module.
- Fixed crash in some cases when derivatives were calculated for a struct also containing
MDL SDK 2024.0.1 (377400.2109): 18 Jul 2024
ABI compatible with the MDL SDK 2024.0.1 (377400.2109) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
MDL 1.9 Language Specification
- Updated version to 1.9.
declarative
andstruct_category
as new reserved words.- Added the concept of declarative structure definitions with
and without a structure category to the conventional
structure definitions. - Added the definition for the assignment operator (
=
) for
declarative structs with and without a structure category. - Restricted the type cast operator on structure types to
conventional structure types. - Added declarative functions.
- Restricted overload resolution on material definitions.
- Extended overload resolution to define functions whose signature
is a prefix of others as more specific. - Specified that function overload sets can contain both
declarative and non-declarative functions. - Clarified that the
auto
return type for functions is allowed
on function definitions and not on function declarations. - Defined material definitions as functions returning a declarative
structure definition of thematerial_category
structure category. - Defined the builtin
material
type as a declarative structure type
with thematerial_category
structure category. - Changed the
ior
field of the builtinmaterial
type to
be of varying type and notuniform color
anymore. - Defined the builtin distribution function types
bsdf
,
edf
,vdf
, andhair_bsdf
as a declarative structure type
without structure category and without fields. - Redefined the compound types in the
material
type to
declarative structure types without structure category. - Added rounding function
round_away_from_zero()
and clarified rounding
behavior ofround()
. - Removed the statement for microfacet BSDF models that they become
black in transmission mode if the ior values indicate total
interior reflection.
-
General
-
The
material.ior
field is nowvarying
for all versions of MDL (not only for MDL 1.9).
This avoids to break the ABI to the renderer, since there is still only one material type.
The new methodIMdl_configuration::set_material_ior_frequency()
allows to revert
that change as a workaround for rare compatibility problems with MDL modules authored
for MDL versions before 1.9. Please note that this will switch the field touniform
for all version (including MDL 1.9). Note further that this option cannot be set dynamically,
it is only possible to set it at SDK start time. -
Added CMake option
MDL_BUILD_SDK
which isON
by default. If setOFF
only the MDL Core and mdlc will be built. -
The alpha channel is now always treated as linear, independent of the gamma value
specified for the remaining channels. -
Added new AOV(Arbitrary Output Variables) support. It allows rendering applications
to produce customized data in addition to the usual image output buffers:- The interface
IStruct_category
has been added to represent the new
concept of struct categories. The new interfaceIStruct_category_list
represents an ordered collection of struct categories identified by name or index. - The new methods
IType_struct::get_struct_category()
and
IModule::get_struct_categories()
allow to query the struct categories
of a struct type and those defined in a module, respectively. - The new methods
IType::is_declarative()
,
IFunction_definition::is_declarative()
, and
Definition_wrapper::is_declarative()
indicate whether a type or function is
declarative. - The interface
IType_factory
has been extended with methods to create,
clone, compare, and dump struct categories and/or struct category lists. - A sixth template-like function, the so-called
decl_cast
operator, has
been added. The new methodIExpression_factory::create_decl_cast()
provides a convenient way to create calls of this function definition. - The method
IMaterial_instance::create_compiled_material()
accepts the
new option "target_type" on the execution context. This option behaves as if
the entire material is wrapped into adecl_cast
operator with the given
target type. - The new method
ICompiled_material::get_sub_expression_hash()
allows to
compute hash values of arbitrary sub-expressions and is not limited to
predefined material slots asICompiled_material::get_slot_hash()
. - The module builder has been extended to support struct categories: The new
methodIModule_builder::add_struct_category()
allows to create them.
The signature of the methodIModule_builder::add_struct_type()
has been
extended with astruct_category
parameter. The signature of several
methods onIModule_builder
has been extended with a
is_declarative
parameter. The old signatures are still available if
MI_NEURAYLIB_DEPRECATED_15_0
is defined.
- The interface
-
The methods for texture export (
IMdl_impexp_api::export_canvas()
and
IImage_api::create_buffer_from_canvas()
) and the image plugin API have
been changed to use a generic options map instead of two hard-coded options.
Supported options are documented atIImage_api
. The old signatures are
still available ifMI_NEURAYLIB_DEPRECATED_15_0
is defined. -
The new export option "exr:data_type" allows to control the data type of EXR channels.
-
The database supports now multiple scopes. For details, see the
documentation for the classIScope
and the methodscreate_scope()
,
get_scope()
, andremove_scope()
onIDatabase
. -
The new method
IExpression_factory::create_temporary()
allows to create
temporary references. -
The signature of
IMdl_module_builder::add_function()
has been extended
to support temporaries. The old signature is still available if
MI_NEURAYLIB_DEPRECATED_15_0
is defined. -
The free functions
set_value()
andget_value()
onIData
support now arrays (similar to what existed already forIValue
).
Arrays can be specified as pointer/length pair, or asstd::vector
. -
Exit codes in case of array size mismatches for the the free functions
set_value()
andget_value()
onIValue
have been changed
from -3 (implementation) and -4 (documentation) to -5 for consistency with
IData
. -
The methods
IModule::get_function_overloads()
have been updated to
implement the modified overload resolution rules for MDL >= 1.9. -
Additional performance improvements for the creation of compiled materials.
-
The recommended vcpkg version is now
5d675c7e5
. This
changes the recommended versions for Boost to 1.84, OpenImageIO to 2.5.8.0,
and GLFW to 3.4. -
The license texts have been split into three separate files
LICENSE.md, LICENSE_IMAGES.md, and LICENSE_THIRD_PARTY.md. -
The API reference documentation for the MDL SDK and MDL
Core is now installed as part of the "install" target. -
Added the compiler flag
-flax-vector-conversions
when
using OpenImageIO on Linux and ARM. -
Python Bindings:
- Changed the recommended Python version to 3.10.
- Improved type hints.
- Added stub functions to keep the bindings backwards compatible.
- Prepared for an update to Swig 4.2.1.
- Added more tests to improve coverage.
-
-
MDL Compiler and Backends
- Increased default MDL version to 1.9.
- Added support for MDL 1.9:
- Implemented
math::round_away_from_zero()
. - Implemented structure categories, declarative structures and declarative functions.
- Adapted overload resolution to new rules.
- Implemented
- Added backend option
"libbsdf_flags_in_bsdf_data"
to enable use of the new
"flags"
field in the BSDF data structures for libbsdf. The flags can be used
to restrict generated sample, evaluate, pdf and auxiliary functions to only
calculate reflections, transmissions or both. - MDL Core API: Support for declarative structs and functions (AOV support).
- Extend the abstract syntax of MDL
- New declaration kind
mi::mdl::IDeclaration::Kind::DK_STRUCT_CATEGORY
and corresponding
classmi::mdl::IDeclaration_struct_category
for struct category declarations. - New methods on
mi::mdl::IDeclaration_type_struct
for modifying a struct's category:IQualified_name const *get_struct_category_name()
.IDefinition const *get_struct_category_definition()
.void set_struct_category_definition(IDefinition const *category_definition)
.
- New methods on
mi::mdl::IDeclaration_type_struct
andmi::mdl::IDeclaration_function
for the declarative flags:bool is_declarative()
.void set_declarative(bool flag)
.
- New and modified methods on
mi::mdl::IDeclaration_factory
for handling struct categories
and changes to structs and functions:IDeclaration_struct_category *create_struct_category(...)
.IDeclaration_type_struct *create_struct(bool declarative = false, ...,
IQualified_name const *category_name)
.IDeclaration_function *create_function(bool is_declarative, ...)
.
- Changes to
mi::mdl::IDefinition
to support declarative features:- New definition kind
DK_STRUCT_CATEGORY
. - New definition flag
DP_IS_DECLARATIVE
. - New intrinsic
DS_INTRINSIC_DAG_DECL_CAST
. - New function
IStruct_category const *get_category()
to get the category of
a category definition.
- New definition kind
- Changes to
mi::mdl::IGenerated_code_dag
...
- New declaration kind
- Extend the abstract syntax of MDL
MDL SDK 2023.1.4 (373000.3036): 18 Mar 2024
ABI compatible with the MDL SDK 2023.1.4 (373000.3036) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
General
- Added a linker script on Linux that hides all defined symbols except for the factory symbol(s).
-
MDL SDK examples
- Updated OptiX 7 example to support up to OptiX SDK 8.0.0.
- Example AXF to MDL
- Added support for AxF 1.9 sheen for SVBRDF representation.
- Improved compatibility for refracting carpaint representation.
- Improved mapping of Cook-Torrance spreads (used for non-measured BRDF fallback
and flake orientation).
- Example Execution GLSL:
- Added enable/disable SSBO and noise function remap by command line arguments.
Fixed Bugs
-
General
- Fixed a crash if
IMdl_resolved_resource_element::create_reader()
returnsnullptr
.
This might be due to an incorrect user implementation, or in legitimate cases, e.g.,
if the file disappeared between resolving and the query. - Fixed a memory leak involving the interface pointer used with the context option
"user_data".
- Fixed a crash if
-
MDL Compiler and Backends
- Fixed inconsistent storing and reading of matrix material parameters in target
argument blocks for the native backend. - Avoid warnings about unsupported PTX features for native backend.
- Don't let LLVM abort at shutdown, when writing to stderr fails.
- mdltlc: Fixed error in pattern matching of material nodes.
- Fixed HLSL/GLSL code generation that sometimes placed temporaries into a
loop body that are used outside, causing invalid code. - Fixed crash in the core compiler that might happen on heavily malformed MDL code.
- Prevent errors/warnings in the core compiler without line numbers
due to internal clone operations. - Slightly speedup compilation in multithreaded operations.
- Do not try to resolve empty resource URLs; Note that this is still malformed MDL code.
- Fixed inconsistent storing and reading of matrix material parameters in target
-
MDL SDK examples
- Example df_vulkan
- Fixed command line options to match other examples for
--mdl_path
/-p
option.
- Fixed command line options to match other examples for
- Example AXF to MDL
- Fixed re-coding of BRDF colors table (used in non-measured BRDF fallback).
- Example Execution GLSL:
- Fixed OpenGL 3.3 mode.
- Example df_vulkan
MDL SDK 2023.1.3 (373000.2208): 14 Feb 2024
Added and Changed Features
-
General
- Update to zlib 1.3.1.
-
MDL SDK examples
- Example AXF to MDL
- Simplified the code that constructs an instance of the spectral color constructor. This
also demonstrates how to use theArgument_editor
to set array arguments.
- Simplified the code that constructs an instance of the spectral color constructor. This
- Example AXF to MDL
Fixed Bugs
-
General
- Fixed
IMdl_factory_impl::get_db_definition_name()
for entities from the::<builtins>
module. - Fixed export of MDL modules with uvtile and/or animated textures, where under certain
conditions the first tile/frame was repeated for all tiles/frames of a particular resource
set. - Fixed a bug that caused DB changes to become visible in concurrent transactions.
- Fixed missing dependencies on
libdl
on Linux that triggered the recently added undefined
symbol check on Ubuntu 20.04.
- Fixed
-
MDL Compiler and Backends
- Fixed indeterministic generation of
rmem*
variables for HLSL/GLSL. - Fixed invalid HLSL/GLSL code generation.
- Fixed indeterministic generation of
-
MDL SDK examples
- Example Distilling Target
- Visual Studio project names for the executable and library use now different names.
- Example Distilling Target
MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024
ABI compatible with the MDL SDK 2023.1.2 (373000.1755) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
General
- libbsdf:
- The roughness values computed by the generated auxiliary functions changed to contain
only glossy contributions. - The color weights for normals and roughness in the generated auxiliary functions
are now reduced by luminance instead of average.
- The roughness values computed by the generated auxiliary functions changed to contain
- libbsdf:
-
MDL Compiler and Backends
- Allow more direct assignments of vectors instead of element-wise assignments for HLSL.
- Avoid unnecessary calls to functions whose values are not actually used.
- Avoid reading whole arrays from argument blocks or read-only data segments when
providing those arrays as function parameters. This especially improves rendering
performance ofaxf_importer
materials. - Avoid array copies when accessing arrays provided as function parameters for HLSL/GLSL.
-
MDL SDK examples
- Add options to configure the lambda return mode and the generation of PDF and auxiliary
functions to code_gen example. - Rename "
-p
" parameter ofdf_cuda
example to "--cam
" and use "-p
" as short form
for "--mdl_path
" as in other examples.
- Add options to configure the lambda return mode and the generation of PDF and auxiliary
Fixed Bugs
-
General
nvidia::core_definitions
: Fixed'--'
in display names.- Fixed type computation of ternary operator in MDL SDK/neuray.
-
MDL Compiler and Backends
- Fixed a rare crash that could happen in an MDL module imports other modules and
import the same module (diamond pattern). - Fixed default constructor of enum values which sometimes did not choose
the first enumerator as default value.
- Fixed a rare crash that could happen in an MDL module imports other modules and
MDL SDK 2023.1 (373000.1077): 14 Dec 2023
ABI compatible with the MDL SDK 2023.1 (373000.1077) binary release
(see https://developer.nvidia.com/mdl-sdk)
Known Issues and Restrictions
- MDLE export can fail in this release with broken .mlde files that contain malformed MDL code.
Added and Changed Features
-
General
- Added
rotate_around_x/y/z
functions to::nvidia::support_definitions
. - The MDL SDK comes now with unit tests. Building of the unit tests is
controlled via thecmake
optionMDL_ENABLE_UNIT_TESTS
. Unit
tests can be executed from the command line via CTest,make test
,
or the Visual Studio solution. Some unit tests require theidiff
tool fromOpenImageIO
. - The baker uses now multiple threads.
- The deprecated
FreeImage
plugin as been removed. - The recommended
vcpkg
version has been updated. It is now also
recommended to installGLEW
andGLFW
viavcpkg
. The
feature flagtools
forOpenImageIO
is now required by some
unit tests. - The database used by the MDL SDK supports now multiple parallel
transactions. See the documentation ofITransaction
for visibility
and conflict resolution. This change includes adding support for
ITransaction::abort()
. As a consequence, if anITransaction
is
released without committing or aborting, it is now automatically aborted
with a warning instead of being committed with an error message. - The new API component
ILogging_configuration
has been added to the
MDL SDK. The API methodsIMdl_configuration::set_logger()
and
get_logger()
have been deprecated. Use
ILogging_configuration::set_receiving_logger()
and
ILogging_configuration::get_receiving/forwarding_logger()
instead. The
old methods are still available ifMI_NEURAYLIB_DEPRECATED_14_1
is
defined. UseILogging_configuration::set_log_prefix(0)
to prevent
the forwarding logger from automatically adding the severity to the log
message. - Additional performance improvements, in particular with a focus on
creation of compiled materials. - The new methods
IType_factory::get_mdl_type_name()
and
create_from_mdl_type_name()
allow to serialize and deserialize types via
their type names. - The new method
IType_factory::get_mdl_module_name()
returns the
name of the MDL module that defines a given type. This is primarily
useful for enum and struct types. - The method
IType_array::get_deferred_size()
returns now the
"simple" symbol name, e.g., "N" instead of the fully qualified one. - The method
IExpression_factory::create_direct_call()
allows now to
create calls to unexported functions. Note that such calls can only be
used in the same module as the called function. - When loading textures via an MDL module, failures do no longer cause a
dummy instance ofITexture
to be created and
IValue_texture::get_value()
returns now a NULL pointer. - Python Bindings:
- Added more missing interface functions to the bindings.
- Removed all generated
"declare_interface"
-types. - Added post build step to strip unused types and functions and
marked constructors invalid. - Fixed
"error"
-out-parameters by providing a ReturnCode type that can be passed
by reference. - Added
UUID
comparison for interface types. - Updated the binding of enums which are now Python enums in the appropriate scope.
- Extended unit tests written in Python.
- Added a coverage report option for the unit tests written in Python.
- Added missing and fixed existing
get/set_value
functions for variousIData
class bindings. - Mapping now
mi::Size
toSint64
to handle-1
returns correctly. - Removed the
IAttribute_set
function from scene elements.
- Added
-
MDL Compiler and Backends
- Removed unused
exception_state
parameter from generated functions for non-native backends
to improve performance. Needs update in renderers calling these functions. - Let generated functions for material expressions of base types and vector types return
their values directly instead via a result buffer by setting the new backend option
"lambda_return_mode"
to"value"
. Only supported by the PTX and the LLVM-IR backend. - Generated auxiliary functions now separate albedo into diffuse and glossy, similar to the evaluate functions.
- Generated auxiliary functions now also report roughness.
- Removed unused
-
MDL Distiller and Baker
- Debugging features for mdltlc:
debug_name
anddebug_print
statements
in MDLTL rules files. - Added mdltl unit tests.
- Debugging features for mdltlc:
-
MDL SDK examples
- Replaced compiler define
NO_DIRECT_CALL
by command line parameter
--use-direct-call
to make it easier to try both variants. - Adapted MDL SDK df_cuda and OptiX 7 examples to use the new value return mode.
The MDL Core df_cuda example still uses the old default mode ("sret"
). - AxF Example:
- Updated to Pantora 1.9.0.
- Added search path command line options.
- Example DXR:
- Changed hardware sampler mode to clamp and implemented repeat by software
to fix edge cases when cropping. - Added a MaterialX to MDL version number parameter in preparation for
upcoming MaterialX releases. - Added options to render multiple auxiliary outputs to file in one run.
- Changed hardware sampler mode to clamp and implemented repeat by software
- Replaced compiler define
Fixed Bugs
-
General
- base.mdl:
- Improved tangent space handling for bump maps. Noise-based bump mapping is now
oriented correctly for object and world space coordinate sources. - Additionally, coordinate transforms change the orientation consistently now.
This adds one field tobase::texture_coordinate_info
.
- Improved tangent space handling for bump maps. Noise-based bump mapping is now
- Added a work-around to handle user defined constants inside the code that is added using
add_function()
to an existing MDL module in theMDL_module_builder
interface.
This can only handle cases where the user defined type is either defined locally
or imported using an absolute path. - Python Binding: Fixed proxy parameter handling of
"IMdl_distiller_api::create_baker"
and"ILight_profile::reset_*"
functions.
- base.mdl:
-
MDL Compiler and Backends
- Fixed auto-import of enum conversion operators.
- Fixed a case where the
auto-importer
was not able to import conversion operators
(enum-to-int
), which caused wrong prefixed constructors when exporting MDL,
e.g.base::int(value)
. - Adapted data layout for PTX to match data layout used by CUDA compiler
to avoid problems with misaligned data types. - Fixed wrong function indices set for init functions in single-init mode,
whenILink_unit::add_material()
is called more than once. - Fixed invalid CUDA prototypes returned by
mi::neuraylib::ITarget_code::get_callable_function_prototype()
. - Fixed
texremapu
inbase.mdl
for GLSL resulting in undefined behaviour
for negative texture coordinates. - Improved handling of invalid MDL code in the MDL compiler.
-
MDL Distiller and Baker
- Fixed printing of
NaN
,+inf
and-inf
constants in themdl_distiller_cli
command line utility. They are now printed as(0.0/0.0)
,(1.0/0.0)
and(-1.0/0.0)
respectively, same as in the MDL compiler and SL backends. - mdltlc: Fixed code generation for rules with node names.
- mdltlc: Fixed code generation for creation of conditional expressions.
- Fixed printing of
-
MDL SDK examples
- Example DXR: Fixed resource creation warnings reported with the
"--gpu-debug"
option on Windows 11.
- Example DXR: Fixed resource creation warnings reported with the
MDL SDK 2023.0.6 (367100.5773): 03 Nov 2023
ABI compatible with the MDL SDK 2023.0.6 (367100.5773) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
General
- Various performance improvements, in particular with a focus on creation of
compiled materials. - Python Bindings:
- Added
get
andset
value functions to the bindings of types inmi::data
and
added corresponding tests. - Removed the
IAttribute_set
interface from the bindings of theIScene_element
types.
- Added
- Various performance improvements, in particular with a focus on creation of
-
MDL Compiler and Backends
- Optimized high-level (GLSL/HLSL) code generator to reduce code size.
- Added new backend option "
hlsl_remap_functions
": This allows to remap MDL functions
(including state functions) to user implemented Native HLSL implementations.
-
MDL Distiller and Baker
- Renamed
mdl_distiller
command line tool tomdl_distiller_cli
to more
clearly separate it from the distiller plugin of the same name.
- Renamed
Fixed Bugs
-
General
- Fixed
IFactory::compare()
forIString
andIRef
on Linux on ARM. - Python Bindings:
- Fixed the binding for the
ITile::get_pixel()
and
ITile::set_pixel()
functions. - Mapped
mi::Size
tosigned integer
in python to allow for
comparing against-1
. - Deprecated the tuple return of functions that have an
float*
out parameter in C++.
Now anReturnCode
object is passed in and out as Python parameter. - Removed unused classes and functions from the bindings.
- Fixed the binding for the
- Fixed
-
MDL Distiller and Baker
- mdltlc: Fixed matching on nested attribute expressions.
- Fixed missing
enum
toint
conversion operator an auto-imports,
which caused compilation errors in rare cases. - Fixed context information when compiling entities in the DAG-backend
(fixes only some asserts in debug mode). - Fixed HLSL/GLSL code generation for access to single element compound types,
like arrays of length1
or structs with only one field.
MDL SDK 2023.0.4 (367100.4957): 05 Oct 2023
ABI compatible with the MDL SDK 2023.0.4 (367100.4957) binary release
(see https://developer.nvidia.com/mdl-sdk)
Added and Changed Features
-
General
- Python Bindings:
- Added binding for the (built-in) entity resolver and added unit tests.
- Accessing functions of invalid interfaces do not crash anymore but
instead throw python exceptions. - Added more unit tests.
- Extend the wrapper around MDL type (
Type
):- Give access to vectors and arrays size and element type.
- Give access to matrices size.
- Convert low level
IValues
to python friendly data types:- Extended to give access to file path for textures, light profiles
and BSDF measurements.
- Extended to give access to file path for textures, light profiles
- Python Bindings:
-
MDL SDK examples
- Example DXR:
- Reduced the HLSL glue code and added dynamic function selection
for generated shader functions. - Added support for backface scattering and emission.
- Handle
meters_per_scene_unit
at runtime and expose the parameter to the UI. - MaterialX resource resolution now uses the MDL entity resolver as fallback
to handle tiled resources. - Handle the collapse flag of the
in_group
annotations. - Improved measured BSDF runtime implementation numerically.
- Camera pose fitting now sets near and far plane distances.
- Added support for
KHR_materials_iridescence
glTF extension.
- Reduced the HLSL glue code and added dynamic function selection
- Example Traversal:
- Removed the preprocessor directive that disabled the distiller option.
- Example DXR:
Fixed Bugs
-
General
- Catch memory allocation failures in the OpenImageIO plugin while exporting images.
- Python Bindings: Fixed the mdl_distiller plugin path in the scripts for
running the examples. - Argument expressions that are created by the API are no longer optimized by the MDL
compiler, but stay "unmodified" until arguments in class compilation mode are created.
This makes the generated arguments more "deterministic" for users. - Fixed export of uv-tile textures. Only first tile was exported.
- Fixed export of animated textures when frame number differs from frame ID.
-
MDL Compiler and Backends
- Fixed translation of vector access with non-constant index in some cases for HLSL/GLSL.
- Fixed bit-operations on integer fields in structs containing derivable values.
- HLSL/GLSL: The compiler uses now name mangling on struct types instead of
the very simple old connection with '_'. - Fixed bug that caused crashes when several MDL modules import each other
within a special order. - Material expressions which path prefix is "
geometry.displacement
" are now created in
the displacement context. - Fixed code generation for re-exported MDL entities.
- Fixed parsing of resource sets inside container files (MDLE).
- Fixed ownership of types in created distribution functions which could lead to crashes
under certain complex conditions. - Fixed crashes due to "missing functions" which are requested from wrong modules,
for instancestate::cos()
. - Fixed printing of package name components which are MDL keywords and require
quoting as Unicode identifiers.
-
MDL SDK examples
- Example DXR:
- Fixed the UI parameter mapping for struct parameters.
- Reviewed the UV coordinate handling and improved its documentation.
- Added missing out of bounds check when reading
NV_materials_mdl
nodes. - Treat alpha channels in glTF textures as linear in cases where the RGB data
is in sRGB color space.
- Example DXR: