Thanks for this, Thomas (@tamte). It helped with a long standing question I had.
The issue I now have is that Ii can't seem to pipe the aov into materialx shaders, only karmamaterialbuilder.
The materialx material builder has different ray options and the materil itself doesn't have the AOV output on the subnet outputs.
I tried setting up the same node setup in mtlx material builder as in the karma material builder but it doesn't come out in the aov pass.
What am I missing?
Image Not Found
I have an enomous amount of Kitbash materials that come in with the assets and it's not feasible to rebuild all the materials in karmamaterialbuilder nodes.