MaterialX Materials

Hallo

I have been looking on Polyhaven and they do provide materials in a MaterialX format. Is it possible to use this in VRAY SDK and if so, is there an example available. Do I use it as a BRDF?

Anton

Hi Anton,

You can use MtlVRmat to load MaterialX files in your V-Ray scenes. Simply set the filename and mtlindex parameters and you can use it in place of any other material (e.g. directly in a Node::material parameter).

If you already downloaded the newly released V-Ray AppSDK 7.30, you can find a new example under material/11-vrmat that shows a very simple setup.

Thank you for the information. I have something working. My concern however is how to ‘control’ the material e.g. alter the roughness or increase the normal map scale. I have looked at the mtlx XML files and even though it is supposed to be a ‘standard’, there are many different flavours of it. Is there a consistent way of changing these kind of parameters?

Anton

Not from V-Ray AppSDK directly, at least not that I know of. It is possible to somewhat control the MtlX shaders by using user_attributes, but for that the MtlX shader has to be authored specifically with that in mind.
If you find a way to manipulate MtlX itself in-memory, MtlVRmat can also take the xml itself by string, without the need to save it to a file.

Sorry I couldn’t be of more help.