NX Error "Failed to import MDL file" when attempting to import NVidia vMaterial in NX

2021-10-06T23:27:25Z
NX for Design

Summary


Details

In the July 2019 Functional Release of NX (1872) it is now possible to import material definition language (MDL) materials into NX for use with Advanced Studio or Ray Traced Studio.

A full description of the new functionality can be found here:
https://docs.plm.automation.siemens.com/tdoc/nx/1872/nx_help#uid:index_whatsnew:id1242917:xid1601474



When attempting to use the new command - Import MDL File and selecting a .mdl file  the operation is failing and the error message "Failed to import MDL File" is displayed. 

How can the MDL file be imported without error?





Solution

This error is occurring because:

- You are attempting to use NVIDIA vMaterials on a system where the corresponding NVIDIA MDL Material Exchange package is not installed

Or

- You copied vMaterials from the original installed location to a user directory and didn't use/set the NX_RENDER_LWIRAY_MDL_USER_PATHS environment variable to reference the user directory


To avoid the error you will need to perform the following:

Install the Nvidia MDL Material exchange package.
This can be downloaded from here:
https://d3fcmia9cdl7u7.cloudfront.net/packages/MDLMaterialExchange/MDLMaterialExchange_v18.0.7090.exe
Optionally,  you can also install the complete vMaterials library.
https://www.nvidia.com/en-us/design-visualization/technologies/vmaterials/

OR

If you do not wish to install the Nvidia MDL Material exchange package on multiple machines you can place the files onto a shared network location and point to these using the variable  NX_RENDER_LWIRAY_MDL_USER_PATHS.

For example, if the MDL Material Exchange package is located at network path "Z:\NVIDIA Corporation\mdl\" and the NVIDIA vMaterials package is located at network path "Z:\Documents\mdl\", set the following [NOTE: if a directory path contains space(s) it must be enclosed in "" when defining the environment variable]:

NX_RENDER_LWIRAY_MDL_USER_PATHS="Z:\NVIDIA Corporation\mdl\;Z:\Documents\mdl\"

Full details of these steps will be included in a future update of the NX Help Documentation.



Notes and References

Additional Technical notes:

MDL material libraries depend on core material components that ship with the library.  System environment variable(s), MDL_SYSTEM_PATH and MDL_USER_PATH, are defined during the library/package install process that point to the location of the library and core components.  The environment variables enable a material to contain relative references to core components. 

For example, NVIDIA vMaterials (pointed to by MDL_USER_PATH) require access to the NVIDIA MDL Material Exchange package (pointed to by MDL_SYSTEM_PATH).  
If a user chooses to move/copy MDL materials from the installed directory location (pointed to by MDL_USER_PATH) to another location, they must set the NX_RENDER_LWIRAY_MDL_USER_PATHS environment variable (described below and in the NX kits\ugii\ugii_env_ug.dat file) to point to this location.

   #
   # NX_RENDER_LWIRAY_MDL_USER_PATHS
   #
   # This defines a path (or multiple paths, separated by semi-colons) to
   # location(s) where user installed MDL material content is installed.  Note that
   # the following MDL-related system environment variables are referenced automatically
   # by NX; MDL content located at these locations does not need 
   #
   #    MDL_USER_PATH: Set when the NVIDIA vMaterials collection is installed.  Points to
   #       MDL component and texture/image resources. 
   #    
   #    MDL_SYSTEM_PATH: Set When the MDL Material Exchange package is installed.  This
   #       package is required to support exchange of MDL between supporting applications.
   #       Points to MDL component resources.
   #  
   # NOTE: Texture/image resources needed to support MDL materials (not located under the
   #    MDL_USER_PATH) should be placed in the directory referenced by the UGII_TEXTURE_LIB
   #    environment variable.
   #
   #NX_RENDER_LWIRAY_MDL_USER_PATHS=C:\users\user1\custom_mdl\;C:\users\user2\my_mdl\



Hardware/Software Configuration

Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: STUDIO_DESIGN
Version: V1872
Function: VISUALIZE
Product: NX
Application: SYSENG
Version: V1872
Function: VISUALIZATION

Ref: 002-8014837

KB Article ID# PL8014837

Contents

SummaryDetails

Associated Components

Modeling