検索 - User list
Full Version: Intercepting UsdShade sourceAsset with a custom resolver
Root » Solaris and Karma » Intercepting UsdShade sourceAsset with a custom resolver
OmerShapira
in LOPS, materials get bound to Karma with:
  def Shader "myMaterial"
        {
            uniform token info:implementationSource = "sourceAsset"
            uniform asset info:sourceAsset = @opdef:/LINK_TO_SOURCE_NODE?ARG_TO_OUTPUT_COMPILED_VEX@
        }
    }

we have USD with materials coming from outside Houdini, all defined with sourceAssetas well. We can write nodes to generate houdini materials for them, and would like to intercept the read of whatever's inside sourceAsset = @THIS_REGION@so we can feed a Hydra renderer with the code output from these nodes. What's more, we would like the sourceAssetto remain unchanged when we re-export this USD.

Is there a way to inject code in the sourceAssetreader that would customize the code being output to Hydra?

Thanks!
mtucker
I think the only way to do that would be by implementing a custom ArResolver.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB