Cross-platform reference paths

   2117   4   3
User Avatar
Member
19 posts
Joined: Dec. 2015
Offline
What's the best way to make USD references cross-platform?

I know 1 option is to just use relative paths, but if the reference is a very different path, you end up with a ton of "../" in the reference path. And if you are referencing across different drives on Windows, relative paths don't work.

There is also the Asset Resolver option, but this seems very complicated for basic string manipulations. This requires you to write C++ and compile with USD. I hate to say it, but I'm just not technical enough to pull this off.
User Avatar
Member
112 posts
Joined: Oct. 2011
Online
maybe search paths are an option:

you can define multiple paths in the PXR_AR_DEFAULT_SEARCH_PATH environment variable (needs to be set before launching houdini)

this could look like this
windows: C:/myassets;D:/myotherassets;E:/myshots
linux: /drive/myassets:/anotherdrive/myotherassets:/someotherdrive/myshots


when referencing the files in houdini you could link to a C:/myasset/treeA/treeA.usd by just using the searchpath: treeA/treeA.usd
which, if the PXR_AR_DEFAULT_SEARCH_PATH is set correctly should work on windows and linux
Pipeline @ RISE Visual Effects Studios
User Avatar
Member
19 posts
Joined: Dec. 2015
Offline
Thank you risefx! I'll give it a try!
User Avatar
Member
1737 posts
Joined: May 2006
Online
Or maybe this asset resolver from Rodeo? Never used it myself, but sounds like it could be handy for simple path mods:

https://github.com/rodeofx/rdo_replace_resolver [github.com]
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
129 posts
Joined: Oct. 2020
Offline
wish there was documentation/ tutorials for the AR since I do want to use it
https://www.youtube.com/channel/UC4NQi8wpYUbR9wLolfHrZVA [www.youtube.com]
  • Quick Links