Converting USD Preview Shader from Maya to MaterialX?

   8910   13   2
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
I have an asset that had look-development performed in Maya using Substance painter and Arnold shaders.
This was exported to a USD file with USD preview shader option selected, using the Maya "official" USD plugin.
I imported this into Houdini 19 Solaris.
Unfortunately, the preview shaders don't look like they import correctly. Only one of the texture maps is mapped to emission.
Is there a procedural way to re-map the preview shader to a MaterialX surface shader?
e.g. with variants?
Any guidance would be appreciated, as manually remapping multiple shaders would be onerous.
Thanks
Edited by syntheticperson - 2021年12月20日 13:31:38

Attachments:
Screen Shot 2021-12-20 at 10.23.34 AM.png (356.7 KB)
Screen Shot 2021-12-20 at 10.23.46 AM.png (215.8 KB)
Screen Shot 2021-12-20 at 10.23.54 AM.png (2.8 MB)
chestPlate_m2022_MacBookPro_M1MAX.jpg (481.0 KB)

User Avatar
Member
8043 posts
Joined: 9月 2011
Offline
Your export is broken. It's missing the shader part of the material. The example has the texture reader connected directly to the surface shader output of the material. There should be a USDPreview material in there between the textures and the material output.
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
jsmack
Your export is broken. It's missing the shader part of the material. The example has the texture reader connected directly to the surface shader output of the material. There should be a USDPreview material in there between the textures and the material output.

Then that means Maya 2022 USD export is broken. I'll post to the Maya/USD forum to see if there is a fix on their end.
Even if I get that working, I still need to find a way to mass convert multiple USD preview shaders to MaterialX.

Thanks
User Avatar
Member
8043 posts
Joined: 9月 2011
Offline
syntheticperson
Even if I get that working, I still need to find a way to mass convert multiple USD preview shaders to MaterialX.

I'm not sure what you mean by convert to mtlx. Do you mean save the materials from the usd as mtlx files, or replace the usdpreview nodes with mtlxusdpreview nodes?
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
jsmack
syntheticperson
Even if I get that working, I still need to find a way to mass convert multiple USD preview shaders to MaterialX.

I'm not sure what you mean by convert to mtlx. Do you mean save the materials from the usd as mtlx files, or replace the usdpreview nodes with mtlxusdpreview nodes?

Sorry. My goal is to export USD from Maya/Arnold such that I end up with MaterialX materials in Houdini 19/Solaris.
i.e. I want all the substance painter textures that work with Maya/Arnold, to port across to Solaris via USD, re-map to MaterialX, and work with Karma.
Edited by syntheticperson - 2021年12月21日 00:21:48
User Avatar
Member
12669 posts
Joined: 7月 2005
Offline
I'm assuming the plugin translates hypershade nodes into Mtlx networks?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
jason_iversen
I'm assuming the plugin translates hypershade nodes into Mtlx networks?
The Maya USD plugin supports USD Preview Surface, RfM Shaders, Arnold Shaders, and RenderMan for Maya.
Whereas, Arnold for Maya has its own USD export menu.
Since Arnold for Maya supports Material X, that might be an option. However, it means converting all the Arnold standard surfaces to Material X on the Maya side, then re-exporting to USD. Which is less than ideal.
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
So it turns out the Arnold plugin for Maya does allow you to export selected geometry materials to Material X. Unfortunately, it is a flavor of Material X specific to the Arnold renderer.
If you have the Arnold Renderer plugin installed in Houdini, you can then import the materials into Houdini.
My goal is to convert them to Houdini/Karma-compatible Material X.
It looks like I'm going to have to bite the bullet and convert them.
Any ideas on how one would go about doing this with Solaris LOPS or python?

Thanks

Attachments:
Screen Shot 2021-12-28 at 11.05.21 AM.png (1.7 MB)

User Avatar
Member
12669 posts
Joined: 7月 2005
Offline
syntheticperson
Unfortunately, it is a flavor of Material X specific to the Arnold renderer.
Sad, as that defeats the point of MaterialX. Are Autodesk able to supply a way to convert to standard MtlX?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
jason_iversen
syntheticperson
Unfortunately, it is a flavor of Material X specific to the Arnold renderer.
Sad, as that defeats the point of MaterialX. Are Autodesk able to supply a way to convert to standard MtlX?

Not that I know of.

In the meantime, I have figured out how to convert Maya Arnold standard surface Material X to Houdini/Karma Material X standard surface. i.e. the python code snippets for each step.
I'm about 3/4 of the way through completing a Houdini 19 HDA which semi-automates this process.
I'm doing this out of necessity. I have assets that were look-dev-ed in Maya Arnold, and I want them in Houdni 19 Material X.

If there is interest, I will open-source the HDA when I get it working.

Thanks
User Avatar
Member
12669 posts
Joined: 7月 2005
Offline
syntheticperson
I'm doing this out of necessity. I have assets that were look-dev-ed in Maya Arnold, and I want them in Houdni 19 Material X.
Yep, understood completely.

I see from https://docs.arnoldrenderer.com/display/A5AFMUG/MaterialX [docs.arnoldrenderer.com] that it's a bit of a mess where there are nodedef extensions and special conditions/etc: no doubt designed to support 1:1 translation of arnold materials to it's mtlx input interface, as well as support reading standard mtlx nodes. They appear unconcerned about using MtlX as an interchange format.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
170 posts
Joined: 7月 2010
Offline
jason_iversen
syntheticperson
I'm doing this out of necessity. I have assets that were look-dev-ed in Maya Arnold, and I want them in Houdni 19 Material X.
Yep, understood completely.

I see from https://docs.arnoldrenderer.com/display/A5AFMUG/MaterialX [docs.arnoldrenderer.com] that it's a bit of a mess where there are nodedef extensions and special conditions/etc: no doubt designed to support 1:1 translation of arnold materials to it's mtlx input interface, as well as support reading standard mtlx nodes. They appear unconcerned about using MtlX as an interchange format.

Yeah, Arnold Material X is cross-platform in the sense that it will work with the Arnold renderer across supported DCCs.
e.g. Maya, Houdini, etc. However, I feel it falls short of the vision of Pixar's Universal Scene Description vision, and ILM's Material X; platform-independent description and exchange across applications and renderers.
User Avatar
Member
136 posts
Joined: 10月 2020
Offline
syntheticperson
jason_iversen
syntheticperson
Unfortunately, it is a flavor of Material X specific to the Arnold renderer.
Sad, as that defeats the point of MaterialX. Are Autodesk able to supply a way to convert to standard MtlX?

Not that I know of.

In the meantime, I have figured out how to convert Maya Arnold standard surface Material X to Houdini/Karma Material X standard surface. i.e. the python code snippets for each step.
I'm about 3/4 of the way through completing a Houdini 19 HDA which semi-automates this process.
I'm doing this out of necessity. I have assets that were look-dev-ed in Maya Arnold, and I want them in Houdni 19 Material X.

If there is interest, I will open-source the HDA when I get it working.

Thanks
I would really love a converter as well. Sadly, I am not so good with python
https://www.youtube.com/channel/UC4NQi8wpYUbR9wLolfHrZVA [www.youtube.com]
User Avatar
Member
8 posts
Joined: 10月 2013
Offline
Hey, just found this on google as I’m going through the exact same problem. Did you get anywhere with the converter? Happy to join in the effort. I think it’d he huge help for many who want to get out of Arnold and into karma! Got some devs who could lend a hand too.
  • Quick Links