Author Topic: [SOLVED] MDL with Nvidia Core Definitions: Cannot import to UE4 and Maya Vray  (Read 144 times)

Hello,

I've created an MDL file based on the "flake paint" material, available in Substance Designer by default.  I've created all the necessary parameters to get a great looking carpaint.  It looks perfect in the Substance Designer 3D View, as well as exports to file without any errors.

I created the MDL in Substance Designer 2018.3.4 because any version thereafter creates the MDL with MDL core v1.5 or newer, which to the best of my ability to find, is not supported in VRay.  It's important for my pipeline work to be able to use the same MDL file in Maya/Vray and UE4.

When I try to import this file to UE4 4.26.2, or to Maya 2020.4 with VRay 5.0, I get errors and it fails to import.

I've attached my working sbs as well as the exported MDL module.  Any help on this topic would be greatly appreciated!

The error messages:
In UE4 4.26.2:
C:\Users\xxxxx\xxxxx\xxxxxx\xxxxxx\nvdia_flake_paint\Nvidia_Flake_Paint_Template.mdl(120,11): 'nvidia::core_definitions' is not a package or module name
C:\Users\xxxxx\xxxxx\xxxxxx\xxxxxx\nvdia_flake_paint\Nvidia_Flake_Paint_Template.mdl(17,10): could not find module '::nvidia::core_definitions' in module path
No materials are present in the MDL module!

In Maya 2020.4/VRay 5.0:
// Error: V-Ray : Error while loading MDL module from 'C:/Users/xxxxx/xxxxx/xxxxxx/xxxxxx/nvdia_flake_paint/nvdia_flake_paint/Nvidia_Flake_Paint_Template.mdl': [MDLIntegrator::loadModule] -2: Could not load module "::Nvidia_Flake_Paint_Template" (-2) //
Last Edit: April 26, 2021, 08:49:19 am

Hello @evanhammelvfx,

Thank you for reaching out to us!

The error messages seem to indicate the dependencies necessary for the MDL module were not found.
Code: [Select]
could not find module '::nvidia::core_definitions' in module pathCurrently,  dependencies are not embedded in the exported MDL module. We are assessing this issue internally.

Please take a look at this thread, which may be relevant to your issue. I am unfortunately not familiar with the specifics of the Vray workflow and its implementation in Unreal engine, thus I can only suggest looking into how to point Vray to the paths which contain the necessary dependencies to load MDL modules – e.g. the MDL Material Exchange package.

I hope this is helpful!

Best regards,
Luca
QA Analyst
Substance Designer Team

Luca, thank you!  You pointed me in the right direction with the MDL Material Exchange.

The solve for UE4 was to install the MDL Material Exchange, and copy the contents of this folder (from the default install location):
C:\ProgramData\NVIDIA Corporation\mdl\nvidia

to:

C:\Program Files\Epic Games\UE_4.26\Engine\Plugins\Enterprise\MDLImporter\Content\mdl

The MDL files import correctly to UE4 after that.

The solve for Maya 2020.4 / VRay 5.0 was to install the MDL Material Exchange, and add an environment variable on your system pointing to it.  Per the VRay 5 documentation:
VRAY_MDL_PATH_MAYA20yy_x64=%PROGRAMFILES%\Chaos Group\V-Ray\Maya 20yy for x64\mdl;%PROGRAMDATA%\NVIDIA Corporation\mdl;%USERPROFILE%\Documents\mdl
(Where yy is the version of Maya installed.)

Once that's done, VRay will also correctly import the MDL module.

Thanks again for your help!

Hello @evanhammelvfx,

Thank you for following up, I am glad this was helpful!

I appreciate you sharing the steps to solve the issue for both Maya and Unreal Engine. This is useful information for us and a valuable reference for other users!

Feel free to get back to us if you need further assistance with the Substance tools.

Best regards,
Luca
QA Analyst
Substance Designer Team