HUSK and custom ArResolver

   1812   4   0
User Avatar
Member
15 posts
Joined: Dec. 2019
Offline
Hi,

We are running into issues with rendering through HUSK and using our custom ArResolver plugin.

It seems like HUSK doesn't use the resolver and the CreateDefaultContextForAsset() method doesn't get called at the render step.

The strange thing is that if we add something like this to the preRenderScript:
# Re-open stage to trigger USDResolver
stage: Usd.Stage  # set by husk before this python file is run
stageFilePath = stage.GetRootLayer().realPath
stage = Usd.Stage.Open(stageFilePath)
stage.Reload()
I can see that the resolver does work, just not when it comes to the actual rendering.


We copy the env from the Houdini session where everything is working correctly.

This is the command line we are using:
hfs19.0.498/bin/husk -f 1048 --renderer Karma --usd-input ./file.usd -o ./file.exr --make-output-path

Are there any additional arguments that needs to be parsed to HUSK?
Edited by jacobvfx - June 2, 2022 07:09:17
User Avatar
Staff
4444 posts
Joined: July 2005
Offline
Just to be clear, you want CreateDefaultContextForAsset() to be called on ./file.usd as the "asset"? Or are you looking for a way to configure husk more flexibly to control the asset resolver context?
User Avatar
Member
15 posts
Joined: Dec. 2019
Offline
Yes, that the behavior I'm getting when opening the file with the USD api or in Solaris.
User Avatar
Staff
4444 posts
Joined: July 2005
Offline
Thanks. Mark E has informed me that there is in fact an option on husk already to specify the asset to use for the resolver context (--resolver-context ./file.usd). So hopefully you can use that as a workaround for now. However I think you're right that if no explicit resolver context is provided, we should be using the "main" usd file as the resolver context asset.
User Avatar
Member
15 posts
Joined: Dec. 2019
Offline
Thanks.

Parsing the resolver context argument worked like a charm.
  • Quick Links