Announcement: MDL SDK 2020.0.1 released

Get the update on (soon)

Changes compared to previous version (excerpt from the full release notes shipped with the SDK):

MDL SDK 2020.0.1, build 327300.3640
Added and Changed Features

  • On Windows, we recommend Visual Studio 2017 or 2019. Visual Studio 2015 is still the minimum
  • The standalone tools mdlm and i18n have been extended to support Unicode package/module names.

MDL SDK examples

  • example dxr:
    • Enhanced dependency tracking when reloading materials to also update indirectly affected
    • Only the compiled material hash is considered to detect reusable generated code which allows
      to reuse existing materials for structurally equal instances.
    • Skip format conversion for multi-scatter lookup data.
    • Added support larger glTF scenes up to 2GB.
    • Improved cleanup when loading erroneous scenes.

Fixed Bugs

  • Fixed handling of resources inside function bodies. Previously, these resources were not found under
    some conditions, causing black textures for instance.
  • Fixed too strict error checks for creation of function calls of the array index operator, the ternary
    operator, and the cast operator.
  • Fixed creation of variants without specifying any annotations where the annotations of the prototype
    were erroneously copied to the variants.
  • Fixed loading of string-based modules with absolute file paths for resources.
  • Fixed documentation of generated code interfaces: The results of eval functions are output-only, not

MDL Compiler and Backends

  • Fixed a subtle bug in one of the code caches, which caused ignored argument changes under some
    complex conditions. Typically, boolean parameters were vulnerable, but could happen to parameters
    of any type (nvbugs 2875123).
  • Fixed MDL archive tool failures with Unicode package names. The MDL version of such archives
    is now automatically set to MDL 1.6 as lowest necessary version (bug 19512).
  • A bug in the resource handling was fixed that previously caused resources to be resolved and loaded
    more that once, possibly leading to failures if search paths had been changed in between.
  • Fixed the MDL core compiler’s analysis pass. Some analysis info was computed but not annotated,
    causing JIT failures on functions that consists of a single expression body only.

MDL SDK 2020, build 327300.2022
Added and Changed Features

  • A new function mi::neuraylib::IMdl_compiler::get_df_data_texture() has been added.
  • A new function mi::neuraylib::ITarget_code::get_texture_df_data_kind() has been
  • A new enum mi::neuraylib::Df_data_kind has been added.
  • A new flag on mi::neuraylib::IMdl_configuration instructs the MDL compiler to keep the
    names of let expressions and expose them as temporaries on MDL material and function definitions.
    This brings the structure of the material/function definition presented in the API closer to the one
    in the .mdl file.
  • The FreeImage plugin is now based on FreeImage 3.18.0.

MDL Compiler and Backends

  • Support for the chiang hair bsdf has been added to the code generator for distribution functions.
  • Changes to the internal representation of builtin MDL operators. MDL supports a variety of
    operators, potentially featuring an endless number of instances:
    • array index operator[ ]
    • array length symbol
    • ternary operator ?:
      Previously, ’local’ definitions were created for every used instance of these operators in an MDL
    • array index operator: operator[] (<0>[ ],int)
    • array length symbol : operator_len (<0>[])
    • ternary operator: operator?(bool, <0>,<0>)
      This representation had several drawbacks:
    • there might be one definition for the same operator in every module
    • if the operator was not used inside the source of a module, it was not created
      Especially the second point lead to several problems in the editing application. Hence, starting with the 2020.0.0 release, the internal representation was changed and operators are now represented by ’global’ template-like definitions:
    • array index operator: operator[](<0>[],int)
    • array length operator: operator len(<0>[])
    • ternary operator: operator?(bool,<0>,<0>)
      In addition, the name of the cast operator was changed from operator cast() to operator
      cast(<0>). Drawback: When inspecting the types of the operators definition, ’int’ is returned
      for the template types, but this might be changed in the future by expanding the type system.
  • Support for HLSL scene data renderer runtime functions has been added. See the scene data *
    functions in mdl renderer runtime.hlsl MDL SDK DXR example for an example implementation.

MDL SDK examples

  • example dxr:
    • The texture loading pipeline has been simplified and support for UDIMtextures has been added.
    • Support for scene data introduced in MDL 1.6 (prim vars) has been added.
  • example df cuda:
    • Support for evaluation of hair-bsdfs on an analytical cylinder has been added.

Fixed Bugs
MDL Compiler and Backends

  • Support for multiple multiscatter textures in one target code object has been fixed.
  • Support for multiscatter textures with disabled resolve resources backend option has been fixed.
  • Multiple HLSL code generation problems leading to non-compilable code have been fixed.
  • Names of member selection operators/field access functions for builtin vector types have
    been fixed. For example: float3(float,float,float).x(float3) is wrong, whereas
    float3.x(float3) is correct. This affects bool, int, float, and double vector types.

Also the binary release is now online