Skip to content

Releases: NVIDIA/MDL-SDK

MDL SDK 2024.0.2 (377400.2626): 07 Aug 2024

30 Aug 13:03
Compare
Choose a tag to compare

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.
  • 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 instance texture_2d and
      texture_3d) are used together in one module.

MDL SDK 2024.0.1 (377400.2109): 18 Jul 2024

05 Aug 14:54
Compare
Choose a tag to compare

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 and struct_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 the material_category structure category.
    • Defined the builtin material type as a declarative structure type
      with the material_category structure category.
    • Changed the ior field of the builtin material type to
      be of varying type and not uniform color anymore.
    • Defined the builtin distribution function types bsdf,
      edf, vdf, and hair_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 of round().
    • 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 now varying 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 method IMdl_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 to uniform
      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 is ON by default. If set OFF
      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 interface IStruct_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 method IExpression_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 a decl_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 as ICompiled_material::get_slot_hash().
      • The module builder has been extended to support struct categories: The new
        method IModule_builder::add_struct_category() allows to create them.
        The signature of the method IModule_builder::add_struct_type() has been
        extended with a struct_category parameter. The signature of several
        methods on IModule_builder has been extended with a
        is_declarative parameter. The old signatures are still available if
        MI_NEURAYLIB_DEPRECATED_15_0 is defined.
    • 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 at IImage_api. The old signatures are
      still available if MI_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 class IScope and the methods create_scope(),
      get_scope(), and remove_scope() on IDatabase.

    • 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() and get_value() on IData
      support now arrays (similar to what existed already for IValue).
      Arrays can be specified as pointer/length pair, or as std::vector.

    • Exit codes in case of array size mismatches for the the free functions
      set_value() and get_value() on IValue 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.
    • 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
          class mi::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 and mi::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.
        • Changes to mi::mdl::IGenerated_code_dag...
Read more

MDL SDK 2023.1.4 (373000.3036): 18 Mar 2024

04 Apr 07:04
Compare
Choose a tag to compare

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() returns nullptr.
      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".
  • 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.
  • MDL SDK examples

    • Example df_vulkan
      • Fixed command line options to match other examples for --mdl_path / -p option.
    • 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.

MDL SDK 2023.1.3 (373000.2208): 14 Feb 2024

20 Feb 14:23
Compare
Choose a tag to compare

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 the Argument_editor to set array arguments.

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.
  • MDL Compiler and Backends

    • Fixed indeterministic generation of rmem* variables for HLSL/GLSL.
    • Fixed invalid HLSL/GLSL code generation.
  • MDL SDK examples

    • Example Distilling Target
      • Visual Studio project names for the executable and library use now different names.

MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024

05 Feb 12:53
Compare
Choose a tag to compare

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.
  • 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 of axf_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 of df_cuda example to "--cam" and use "-p" as short form
      for "--mdl_path" as in other examples.

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.

MDL SDK 2023.1 (373000.1077): 14 Dec 2023

10 Jan 14:44
Compare
Choose a tag to compare

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 the cmake option MDL_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 the idiff
      tool from OpenImageIO.
    • 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 install GLEW and GLFW via vcpkg. The
      feature flag tools for OpenImageIO is now required by some
      unit tests.
    • The database used by the MDL SDK supports now multiple parallel
      transactions. See the documentation of ITransaction for visibility
      and conflict resolution. This change includes adding support for
      ITransaction::abort(). As a consequence, if an ITransaction 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 methods IMdl_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 if MI_NEURAYLIB_DEPRECATED_14_1 is
      defined. Use ILogging_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 of ITexture 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 various IData class bindings.
      • Mapping now mi::Size to Sint64 to handle -1 returns correctly.
      • Removed the IAttribute_set function from scene elements.
  • 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.
  • MDL Distiller and Baker

    • Debugging features for mdltlc: debug_name and debug_print statements
      in MDLTL rules files.
    • Added mdltl unit tests.
  • 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.

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 to base::texture_coordinate_info.
    • Added a work-around to handle user defined constants inside the code that is added using
      add_function() to an existing MDL module in the MDL_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.
  • 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,
      when ILink_unit::add_material() is called more than once.
    • Fixed invalid CUDA prototypes returned by
      mi::neuraylib::ITarget_code::get_callable_function_prototype().
    • Fixed texremapu in base.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 the mdl_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.
  • MDL SDK examples

    • Example DXR: Fixed resource creation warnings reported with the
      "--gpu-debug" option on Windows 11.

MDL SDK 2023.0.6 (367100.5773): 03 Nov 2023

17 Nov 10:54
Compare
Choose a tag to compare

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 and set value functions to the bindings of types in mi::data and
        added corresponding tests.
      • Removed the IAttribute_set interface from the bindings of the IScene_element types.
  • 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 to mdl_distiller_cli to more
      clearly separate it from the distiller plugin of the same name.

Fixed Bugs

  • General

    • Fixed IFactory::compare() for IString and IRef on Linux on ARM.
    • Python Bindings:
      • Fixed the binding for the ITile::get_pixel() and
        ITile::set_pixel() functions.
      • Mapped mi::Size to signed integer in python to allow for
        comparing against -1.
      • Deprecated the tuple return of functions that have an float* out parameter in C++.
        Now an ReturnCode object is passed in and out as Python parameter.
      • Removed unused classes and functions from the bindings.
  • MDL Distiller and Baker

    • mdltlc: Fixed matching on nested attribute expressions.
    • Fixed missing enum to int 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 length 1 or structs with only one field.

MDL SDK 2023.0.4 (367100.4957): 05 Oct 2023

13 Oct 11:50
Compare
Choose a tag to compare

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.
  • 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.
    • Example Traversal:
      • Removed the preprocessor directive that disabled the distiller option.

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 instance state::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.

MDL SDK 2023.0.2 (367100.3997): 01 Aug 2023

24 Aug 09:17
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2023.0.2 (367100.3997) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • General
    • Improved installation instructions (mention VCPKG_PLATFORM_TOOLSET for
      Windows, add 7.5 as the currently highest supported OptiX version).

Fixed Bugs

  • General

    • Fixed export of uvtile textures referenced in MDL modules.
    • Improved installation instructions for installation of thirdparty dependencies via
      apt-get.
    • Fixed wrong reference counts when cloning instances of IPointer and
      IConst_pointer via IFactory::clone() without using the option
      DEEP_ASSIGNMENT_OR_CLONE.
  • MDL Compiler and Backends

    • All backends: Fixed code generation for material expressions with path prefix
      "geometry.normal".
    • Any unsupported code in GLSL/HLSL code generation will now issue an "Internal JIT backend"
      error. The <ERROR> marker in the generated source will remain.
    • Fixed GLSL alias type definitions inside the GLSL backend
      (no more "missing conversion constructor" errors).
    • Module transformer: Fixed missing constant declarations when used in some annotations
      in non-root modules that are inlined.
    • Module transformer: Do not loose anno::native() annotations when inlining a module.
    • Fixed MDL compiler options containing double typed values
      (causing wrong limits::DOUBLE_M[IN|AX]).
    • Fixed the necessary precision to print floats and doubles so it can read back
      without losses.
    • Fixed missing elemental constructor for locally defined structs in the DAG- representation.
    • Fixed compiler crashes for:
      • Invalid call expressions.
      • Invalid array types with a let expression as the array size.
    • Compiler now reports proper errors when a function is returned from a function.
    • Fixed PTX code generation that causes a GPU crash when the load/store instructions
      are generated with a wrong address space.
    • Fixed HLSL/GLSL backends generating float constants with not enough precision.
      In particular, the ::limits::MIN_FLOAT constant was generated wrong,
      causing rounding to zero later.
  • MDL Distiller and Baker

    • Fixed bug in command line mdl_distiller MDL printer for ::tex module imports
      when textures are used in material parameter defaults.
    • Fixed mixer normalization in mdltlc for patterns with attributes.

MDL SDK 2023 (367100.2992): 03 Jun 2023

14 Jun 12:24
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2023 (367100.2992) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL 1.8 Language Specification

    • Updated version to 1.8.2.
    • Removed meaningless references to a preprocessor.
    • Reduced the requirement on thin-walled materials that they should
      have equal transmission from both sides.
    • Added part to supported selector string components for OpenEXR.
    • Clarified that MDL comments can be nested.
    • Extend list of separators in MDL and clarify their purpose.
    • Clarified that unicode identifiers cannot be empty.
    • Added the operator function call to the precedence table of all operators.
    • Added the cast operator to the precedence table of all operators.
    • Moved operator from the set of words reserved for future use
      to the reserved words in use.
    • Added section for unicode identifiers.
    • Clarified that the use of variables in let-expressions is read-only.
    • Clarified that binary logical operators may or may not use
      short-circuit evaluation.
    • Added definition of lvalues and rvalues.
    • Removed redundant subsections that light_profile and
      bsdf_measurement have no members.
    • Added requirement to check for array out-of-bounds access and
      to return default-constructed values in this case.
    • Clarified that function parameters are lvalues in their procedural
      implementation bodies.
    • Added that function parameters can only be used as read-only rvalues
      in functions defined by an expression.
    • Added that function parameters can only be used as read-only rvalues
      in let-expression.
    • Changed the grammar for the let-expression from unary_expression
      to assignment_expressions for the expression affected by
      the variables. This ensures the right scope precedence, e.g., the
      let-expression ends at a sequence operator.
    • Removed using alias declarations. They are replaced by Unicode
      identifiers directly supported as package and module names.
    • Added operator function call syntax for all applicable operators.
    • Clarified that material parameters can only be used as read-only rvalues
      in material definitions.
    • Clarified that material parameters can only be used as read-only rvalues
      in let-expression.
    • Clarified that let-bound variables cannot be used in their own initializer expressions.
    • Fixed the accidentally dropped grammar production rule for the
      import statements in MDL files.
    • Removed the support for annotations on packages with the package.pkg file.
    • Added Unicode identifiers for package and module names.
    • Changed productions for import_path, qualified_import to allow
      Unicode identifiers in package and module names.
    • Added a collapsed parameter to the anno::in_group
      standard annotation to control the UI presentation of groups.
    • Added the standard annotation node_output_port_default and the
      respective enumeration type node_port_mode to control the
      default initialization of output ports for external shade graph
      nodes when they are created for MDL functions.
    • Added the standard annotation native to hint that a function or material
      might have a native implementation in the integration.
    • Added the standard annotation noinline to hint that a function or material
      should not be inlined by the compiler.
    • Added that texture spaces and their respective tangents return in
      volume shading their respective values at the surface entry point
      of the current light-transport path.
    • Added that state::texture_space and the related tangent
      state functions return the zero vector in case the index is out of
      the range of available texture spaces.
    • Clarified the exact interpolation curve for math::smoothstep and that
      it is undefined for a zero or reversed interpolation range.
    • Added float4x4 as supported data type for scene data lookup.
    • Removed the requirement on the scene data lookup functions to
      provide literal strings as arguments for the scene data names. They
      are now uniform strings and can be connected to uniform string
      parameters of a material of function definition.
    • Added a diffuse reflection BSDF modeling spherical Lambertian scatterers.
    • Added an approximative Mie VDF model for fog and cloud-like media.
    • Added a reference to the approximation used for the Mie scattering model of fog_vdf.
    • Clarified that the particle_size parameter of the new
      fog_vdf approximative Mie VDF model refers to the particle diameter.
    • Added custom_curve_layer and directional_factor as
      eligible base BSDF for the thin_film BSDF modifier.
    • Clarified that the measured_factor modifier BSDF allows
      reflectivities above one and it is in the responsibility of a material
      author to ensure energy conservation.
    • Added optional trailing commas to the productions of
      parameter_list, argument_list,
      enum_type_declaration and annotation_block.
    • Added a new Appendix G on external bindings and a section for the recommended
      binding of MDL functions to nodes with multiple output ports.
  • General

    • base.mdl: Added an implementation of base::abbe_number_ior.
    • Improved precision of conversion of spectra to color, in particular for spectra
      with narrow peaks.
    • Refactored base::coordinate_projection() to reduce size of generated GPU code.
    • Added mi::neuraylib::IMdl_backend::execute_init() method to allow calling init functions
      in single-init mode for the native backend.
    • i18n translation:
      • Added support for the new boolean parameter to the in_group annotation (collapsed).
      • Added support for legacy "in_group$1.7" annotation.
      • i18n.exe tool:
        • Issue warning when annotation is not supported.
        • Added support for the new added boolean parameter in the in_group annotation
          (collapsed).
        • Added support for legacy "in_group$1.7" annotation.
    • The parameters of the MDL array constructor have been changed from "0",
      "1", etc. to "value0", "value1", etc. to match the MDL specification. This
      also affects paths to fields in the compiled material. Such paths are e.g.
      used by ICompiled_material::lookup_sub_expression(),
      IMdl_distiller_api::create_baker(), various methods on
      IMdl_backend and the Target_function_description struct.
      Hardcoded paths need to be adapted. A frequently occurring pattern is
      ".components.<number>." which needs to be changed to
      ".components.value<numner>.".
    • Removed unused enumerator value DS_SEQUENCE from
      mi::neuraylib::IFunction_definition::Semantics.
    • Changed BMP import of alpha channels with OpenImageIO. While the correct
      behavior is debatable, it restores the historical behavior of FreeImage.
    • A selector parameter has been added to the methods
      IImage::set_from_canvas(), and
      IImage_api::create_canvas_from_buffer(), and
      IImage_api::create_canvas_from_reader(). The old signatures are
      deprecated. They are still available if MI_NEURAYLIB_DEPRECATED_14_0 is defined.
    • The signatures of create_texture(), create_light_profile(),
      and create_bsdf_measurement() on IMdl_factory have been
      changed: These methods take now a IMdl_execution_context pointer
      as last argument instead of the optional mi::Sint32 pointer. The old
      signatures are deprecated. They are still available if
      MI_NEURAYLIB_DEPRECATED_14_0 is defined.
    • The method IImage::create_mipmaps() has been renamed to
      IImage::create_mipmap(). The old name is deprecated. It is still
      available if MI_NEURAYLIB_DEPRECATED_14_0 is defined.
    • It is now considered an error to apply the "A" selector to pixel types
      without alpha channel (instead of assuming a fake alpha channel with values
      1.0f or 255).
    • The interface IImage_plugin has been changed to allow selector
      support and better plugin selection (See the API reference documentation for details):
      • The method supports_selectors() has been added.
      • The method open_for_reading() has an additional parameter for the
        selector string.
      • The test() method takes now a reader instead of a buffer and the
        file size.
    • The OpenImageIO plugin supports now also non-RGBA selectors. Right now this
      works only for OpenEXR textures, including OpenEXR multipart images (use
      the part name as selector or first selector component).
    • Full Unicode support (including code points outside of the basic
      multilingual planes) for MDL source code and filenames.
    • Enabled distiller support for the open source build and in various examples.
    • The minimum CMake version has been increased to 3.21 (Windows only).
    • The OpenImageIO plugin replaces the previously used FreeImage plugin. See
      INSTALL.md for details about the installation of OpenImageIO. All examples
      have been converted to use the OpenImageIO plugin instead of the FreeImage plugin.
    • The API reference documentation is now built as part of the build process if
      doxygen is available. This can be disabled via the option
      MDL_BUILD_DOCUMENTATION. GraphViz/dot (optional) is used to generate nicer
      inheritance diagrams.
    • Deprecated ILink_unit::add_environment(). Use ILink_unit::add_function()
      with ILink_unit::FEC_ENVIRONMENT as second paramete...
Read more