Can vMaterials be used by VRayMDLMtl?

Can vMaterials be used by VRayMDLMtl? NVIDIA vMaterials Lets You Create Custom Materials, Looks, and Layers

A “Could not load module” error is shown on Compiler Output.

I’m getting the same problem. Tried a couple of different ones and they all say “Could not load module”

Most of them work, but there’s an environment variable that you need to set, let me try to remember what it was…

Best regards,
Vlado

The ones that come with VRay work, but none of the Nvidia ones work. I tried messing with the paths as described here:

but that didnt do anything (I’m geussing because the Nvidia ones weren’t exported from Substance possibly. I also don’t have subtsance)

Also, some of the ones that come with VRay only applies the texture to the top of cubes. For example “asphalt” and “walnut_semi_gloss” renders black on the sides, but correct on the top surface (even after uvmapping the cubes)

Last thing, the link at the bottom of the page to NVidia MDL is incorrect. Currently it links to the OSL page

I’ll get you more details on this on Monday.

Best regards,
Vlado

So the trick to this is to add to the environment variable VRAY_MDL_PATH_3DSMAX2017_x64 (or the respective 3ds Max version) the paths to the vMaterials MDL sources, f.e. C:\ProgramData\NVIDIA Corporation\mdl;C:\Users\[i]username[/i]\Documents\mdl;C:\Program Files\Chaos Group\V-Ray\3dsmax 2017 for x64\mdl

Where username is the name of the Windows user account. You can set environment variables from the Control Panel > System > Advanced system settings > Environment variables…

Let me know if this helps. We’ll try to find a way to make this more automatic in the future.

Best regards,
Vlado

Thank you Vlado! This did the trick!

I’ll also note that the Environment Variable did not exist at first on my computer, so I had to create it myself. I used the exact wording in the prior post, and the file paths that were suggested.

Secondly, if you want to add the ability to use MDLs from Substance Designer 5, this is another path to be added: C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray

The whole environment variable will look like this:
C:\ProgramData\NVIDIA Corporation\mdl;C:\Users\username\Documents\mdl;C:\Program Files\Allegorithmic\Substance Designer 5\resources\view3d\iray

^This is a wood texture from SD exported as a MDL and the Teapot is a NVIDIA vMaterial

Good to know that it works :slight_smile:

Best regards,
Vlado

I still can’t get it to work and it still says could not load module on all the Nvidia downloaded MDLs that was installed with default paths

The ones that come with VRay work fine

Not sure what else to tell you. Double Check that the Environment Variable is typed in correctly, or even there. One of my computers did not have the variable, and I had to add it in myself. Then copy and paste the Path from the Code section in my previous post. I’ve done this on a few computers already, and it has worked just fine.

Did you actually restart 3dsMax when updating/adding environment variables? It is a must operation in order for 3dsMax to pick up the changes.

That was it, thanks it’s working now