Custom aovs for materialX shaders.

   258   3   2
User Avatar
Member
7 posts
Joined: 5月 2020
Offline
Hi,

I have some custom shader elements I'd like to export in a materialx shader.
As much I as could find out the only way to write custom aovs from a mtlx shading network is to create a mtlx dot node and write my aov name into the notes input, e.g. aov:my_great_aov and create the appropriate renderVar.
Can anyone approve this, or did I miss another way to do it?
Edited by houdiniUsers - 2026年6月29日 12:09:55
User Avatar
Member
8364 posts
Joined: 9月 2011
Online
Is this for Karma? Does it need to be a mtlx material and not a karma material?
When using a karma material the karma aov node can be used.
MaterialX doesn't natively support AOVs which is why the dot workaround is needed.
User Avatar
Member
39 posts
Joined: 10月 2020
Offline
We usually do it this way if you don't care about using a Karma_AOV node.

Attachments:
karma_AOV.png (78.0 KB)

Enrique De la Garza
CG Supervisor @Frame48
User Avatar
Member
7 posts
Joined: 5月 2020
Offline
Unfortunately we export our shading networks from Maya as materialx so we do not have access to the karma aov node.
But it looks as if only a shading connection is needed in the surface shader e.g.:

color3f inputs:aov:mtlxAOV.connect = </materials/mtlxmaterial/mtlxcheckerboard1.outputs:out>

If I insert this line in my shader I was able to write the mtlx outputs. So I can manipulate the material USD file after export and add this connection to my exported surface shaders and it could work.
Edited by houdiniUsers - 2026年6月30日 04:14:13
  • Quick Links