Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
236 stars 56 forks source link

Using custom USD asset resolver plugin with kick #1869

Closed dovanbel closed 3 months ago

dovanbel commented 3 months ago

Hi,

I'm starting to test a custom Usd asset resolver plugin in our pipeline.

I have forked the excellent VFX-UsdAssetResolver from https://github.com/LucaScheller. My fork is here : https://github.com/dovanbel/VFX-UsdAssetResolver

Unfortunately I have zero knowledge of c++, but thanks to the provided instructions I could compile the resolver for Houdini 20, and also for Maya 2024 (thanks to https://github.com/kreppene for the maya port )

I tested it successfully in Houdini and in Maya (on Windows), meaning the plugin resolves custom identifiers to actual file paths, as expected.

Now : I would like to use this custom resolver with kick.exe. IOW, I would like to be able to do "kick.exe -i test.usd" and have the custom resolver do it's work. I tried this using the compiled resolver I have for Houdini and Maya but without success. I can see in the logs of the kick command that the default ArDefaultResolver is used, not the custom one.

To compile the plugin for Maya or Houdini, it needs to be linked against Maya's (or Houdini's) USD. I suspect this would also need to be done to build the plugin for Arnold. I tried to understand the various files/libraries the plugin depends on, and I could find those in Maya (and the maya usd devkit) but I can't find the same kind of files in the Arnold SDK (for example, I can't find any boost related files in the Arnold SDK)

Could you elaborate on how I could compile this plugin to make it work using the kick command ?

Regards

autodesk-oss-arnold-bot[bot] commented 3 months ago

Issue synced internally to ARNOLD-14773

sebastienblor commented 3 months ago

Hi, this is not possible at the moment. Arnold ships its usd support in the file usd_proc.dll that links against a static USD library, and that isn't part of the Arnold SDK.

The only way to do that would be that you recompile the usd procedural from this repository, and use that usd_proc.dll instead of the one shipped with Arnold. Then you can make it so that your asset resolver can be found by your own usd libs.

dovanbel commented 3 months ago

Hi,

Thanks for anwering @sebastienblor

Hi, this is not possible at the moment. Arnold ships its usd support in the file usd_proc.dll that links against a static USD library, and that isn't part of the Arnold SDK.

When you say 'at the moment', does it mean there is a plan to facilitate this request ?

The only way to do that would be that you recompile the usd procedural from this repository, and use that usd_proc.dll instead of the one shipped with Arnold. Then you can make it so that your asset resolver can be found by your own usd libs.

I'm sorry to ask, but could you elaborate a bit (knowing that I'm not a c++ dev). You say "recompile from this repository" : do you mean the arnold-usd repo ?

Thanks

sebastienblor commented 3 months ago

There is a plan to allow for that, but not in the short term. The existing ticket is #28

Yes, for now you'd need to recompile the procedural node from the arnold-usd repository, against the same USD libs that you used to build your asset resolver. The build documentation is https://github.com/Autodesk/arnold-usd/blob/master/docs/building.md (in this case you want to enable BUILDPROCEDURAL and disable all the other "BUILD*" options). But indeed it requires knowledge of how to compile C++ code, you'll also need precompile usd libs, etc... so it might not be trivial to do.

sebastienblor commented 3 months ago

Since this is a duplicate of the existing issue #28 , I'll close this ticket. But we can continue in the Discussions section, either if you have questions, or if you need help.