houdiniUsers
2026年6月29日 12:08:52
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?
jsmack
2026年6月29日 13:55:24
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.
edlgm
2026年6月29日 20:35:26
We usually do it this way if you don't care about using a Karma_AOV node.
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.