Announcement: MDL SDK 2020.1 released

Get the update on https://github.com/NVIDIA/MDL-SDK https://developer.nvidia.com/mdl-sdk

Changes compared to the last release:

MDL SDK 2020.1, build 334300.2228

MDL 1.6 Language Specification

  • Hyperlinks have been added to the MDL Specification PDF document.

General

  • On Linux, CentOS 7 is now the minimum required version.
  • Enabled support for MDL modules whose names contains parentheses, brackets, or commas.
  • The interface IMdl entity resolver has been redesigned. Support for resolving resources has
    been added.
  • The new interface IMdl module transformer allows to apply certain transformations on MDL
    modules.
  • Various API methods have been added in order to reduce the error-prone parsing of
    MDL-related names: To retrieve DB names from MDL names use get db module name()
    and get db definition name() on IMdl factory. To retrieve parts of the MDL
    name from the corresponding DB element use get mdl package component count(),
    get mdl package component name(), and get mdl simple name() on IModule;
    get mdl module name(), get mdl simple name() on IMaterial definition; and
    get mdl module name(), get mdl simple name(), and get mdl parameter type name() on
    IFunction definition and IAnnotation definition.
  • Added a new overload of IModule::get function overloads() that accepts a simple name
    and an array of parameter type names instead of two strings. This avoids the ambiguity
    when parsing parentheses and commas. The old overload is deprecated and still available if
    MI NEURAYLIB DEPRECATED 11 1 is defined.
  • Improved recursive MDL module reloading: changed the traversal order from pre-order to postorder
    traversal, avoid flagging a module as changed if it did not change at all.
  • Improved Definition wrapper: the creation of functions calls for template-like MDL functions
    requires now an actual argument list since the dummy defaults for such functions easily lead to
    function calls with the wrong types in the signature.
  • Added more options to control the generation of compiled materials in class compilation mode:
    Folding of enum and bool parameters, folding of individual parameters, folding of cutout opacity,
    and folding of transparent layers.
  • Added methods to retrieve the MDL version of modules, and the MDL version when a particular
    function or material definition was added to (and, if applicable, removed from) theMDLspecification.
  • Added methods to retrieve the MDL system and user paths.
  • The legacy behavior of df::simple glossy bsdf can now be controlled via the interface
    IMdl configuration.
  • The return type of IFunction definition::get body() has been changed from const
    IExpression direct call* to const IExpression*.

MDL Compiler and Backends

  • Added support for target code serialization in the HLSL, PTX, and GLSL backends.
    See the new methods get backend kind(), supports serialization(), serialize(),
    and get argument layout count() on ITarget code, and IMdl backend::deserialize
    target code(). The new context option “serialize class instance data” for ITarget
    code::serialize() controls whether per-instance data or only per-class data is serialized.
  • Allow total internal reflection for glossy BSDFs with mode df::scatter transmit (libbsdf).
  • When derivatives are enabled, state::position() is now derivable. Thus, the “position” field
    of Shading state material with derivs is now a derivative type.
  • Added “meters per scene unit” field to Shading state material. It is used, when folding of
    state::meters per scene unit() and state::scene units per meter() has been disabled
    via the new IMdl execution context “fold meters per scene unit” option.
  • Added derivative support for matrices.
  • Added derivative support for scene data functions. Requires new texture runtime functions
    scene data lookup deriv float, scene data lookup deriv float2,
    scene data lookup deriv float3, scene data lookup deriv float4, and
    scene data lookup deriv color (see texture support cuda.h in the MDL SDK examples
    for the prototypes).
  • Added mi::neuraylib::ICompiled material::depends on uniform scene data() analyzing
    whether any scene::data lookup uniform *() functions are called by a material instance.
  • Implemented per function render state usage in ITarget code.
  • Avoid reporting deprecated warnings, if current entity is already deprecated.

MDL SDK examples

  • Examples Shared
    • Added utility headers for strings, enums, I/O, OS, and MDL specific tasks to be used in the
      examples. Updated examples to make use of the new utility headers.
    • Added GUI classes to illustrate MDL parameter editing and to unify user interfaces in examples
      in the future.
  • Example DXR
    • Added a new more structured user interface with various new features including the loading
      of scenes and environments from the menu, the replacement of materials, compilation and
      parameter folding options, and parameter editing in instance compilation mode.
    • Integrated the MDL browser (if built) for the replacement of a selected material.
    • Added shader caching to improve loading times (has to be enabled with option
      enable
      shader cache).
  • GLTF Support
    • Added KHR materials clearcoat support, also in Example DXR.
  • MDL plugin for Arnold
    • Added a new example to illustrate the integration of MDL into an existing advanced CPU
      renderer.
  • Example Code Generation
    • Added a new example to illustrate HLSL, GLSL, and PTX code generation.
  • Example OptiX 7
    • Added a new example to illustrate the use MDL code as OptiX callable programs in a closest
      hit shader, and alternatively, how to link the MDL code directly into a per-material closest hit
      shader for better runtime performance.
  • Example Native
    • Added missing scene data functions of custom texture runtime.

Fixed Bugs

General

  • Fixed documentation of Bsdf evaluate data structs: eval function results are output-only, not
    input/output.
  • Fixed IFunction definition::get mdl name without parameter types() for builtin functions.
  • Fixed compilation of materials using the array length operator.
  • Fixed crash on CentOS 7.1 when importing non-trivial MDL modules.
  • Fixed incorrect behavior during function call creation when implicit casts were enabled.

MDL Compiler and Backends

  • Fixed file resolution during re-export of MDLE modules.
  • Fixed missing clearing of context messages when creating a link unit.
  • Fixed detection of absolute file names on Windows for MDLEs on a network share.
  • Fixed support for the read-only segment and resources inside function bodies when compiling for
    the native target.
  • Fixed rare crash/memory corruption than could occur on MDLE creation.
  • Fixed possible crash when inlining a function containing a for (i = …) loop statement.
  • Fixed potential crash in the auto importer when imports of the current module are erroneous.
  • Fixed handling of suppressed warnings if notes are attached to them, previously these were attached
    to other messages.
  • Fixed possible crash in generating MDLE when array types are involved.
    *Fixed printing of initializers containing sequence expressions, it is T v = (a,b);, not T v = a,
    b;.
  • Improved AST optimizer:
    • Write optimized if conditions back.
    • Write optimized sub-expressions of binary expressions back.
    • Handle constant && x, constant || x, x && constant, x || constant.
  • Fixed folding of calls to state::meters per scene unit() and state::scene units per meter()
    in non-inlined functions.
  • Fixed wrong code generation for int to float conversions with derivatives.
  • Fixed a bug in the generated HLSL code that caused wrong calculations because loads were
    erroneously placed after calls modifying memory.
  • Fixed checking of valid MDL identifiers (names starting with “do” were treated as keywords, but
    not “do” itself).
  • Fixed overload resolution for MDL operators.
  • Fixed crash in MDL runtime when using nonexistent image files with MDL.
  • Fixed invalid translation of int to float conversion with derivatives enabled.
  • Fixed broken math::sincos() on vectors.
  • Fixed failingMDLEcreation due to several missing or non-exported entities (constants, annotations).
  • Fixed failing MDLE creation if the main module was < MDL 1.6, but imported an MDL 1.6 module.
  • Fixed failing MDLE creation if non-absolute imports of ::base were used.
  • Fixed rare crashes occurring when the array constructor is used in annotations.
  • Fixed lost enumeration

MDL SDK examples

  • Examples Shared
    • Fixed failing CUDA checks when minimizing application

MDL SDK 2020.0.2, build 327300.6313

Added and Changed Features

MDL Compiler and Backends

  • Reduced the minimum roughness threshold for microfacet BSDFs from 1e-3 to 1e-7 to make them
    usable for mirrors and clear glass, which is inefficient but could be required by ubershaders.
  • Added “ro data segment” field to Shading state environment (“ro data segment offset”
    for HLSL).
  • Use “direction” for the field name of Shading state environment (HLSL only).
  • Made state::position() derivable.
    Fixed Bugs
    MDL Compiler and Backends
  • Fixed some rare cases were resources inside MDL functions got lost.
  • Fixed crash in MDL code generators due to MDL core compiler missing some error messages when
    a (wrong) member selection has the same name like an enum constant.
  • Fixed rare NaN in microfacet sampling.
  • Fixed error value of ITarget code::get body *() functions.
  • Fixed return value of ITarget code::create argument block() when required resource
    callback is missing.
  • Fixed read-only data segment data not being set for native lambdas.
  • Fixed resource enumeration when compiling multiple expressions in a link unit with
    add material(): ensure that resources in material bodies are enumerated first.of BSDF data textures used by the libbsdf multiscatter.
1 Like