Hey I'm trying to export a flattened stage file with materials that have texture files linked to them.
In the source HIP file those textures appear as relative paths.
I export a USD file with Use Relative Paths.
I import this USD file into a new HIP file.
Some assets have relative paths @../../../myfile.png@
Some have absolute paths baked in @V:/_library/tree.png@. The assets that used to be relative now are absolute.
I can't figure out why. They're all on the same drive (deeply nested far from each other).
Relative paths not working for some assets
674 4 2-
- alexmajewski
- Member
- 136 posts
- Joined: Aug. 2017
- Offline
-
- mtucker
- Staff
- 4589 posts
- Joined: July 2005
- Offline
When doing the conversion to relative paths, if you have to ".." your way all the way to the root of the drive before diving back down again, we throw away all the ".."s and just put in an absolute path. The "relativeness" of these paths is basically useless at this point and just makes it hard to see how to get from one file to another. That was the thinking anyway. Perhaps that's what is going on here?
If this is the problem, and you don't like this behavior, the "relativepaths" output processor is very easy to change so that it generates relative paths even in this case. Just change the `allow_relative_path_from_root` parameter from False to True in the call to `relpath`.
If this is the problem, and you don't like this behavior, the "relativepaths" output processor is very easy to change so that it generates relative paths even in this case. Just change the `allow_relative_path_from_root` parameter from False to True in the call to `relpath`.
-
- alexmajewski
- Member
- 136 posts
- Joined: Aug. 2017
- Offline
I see. This default behavior has been incompatible with one cloud render farm that I've been using. It breaks their automated upload of assets to the cloud.
Can you tell me where exactly can I change that? Should I edit houdini source code in
?
Can you tell me where exactly can I change that? Should I edit houdini source code in
$HFS/houdini/husdplugins/outputprocessors/simplerelativepaths.pyand change the return value of:def processReferencePath( ... return hou.text.relpath(asset_path, referencing_layer_path, allow_relative_path_from_root = False)
-
- Heileif
- Member
- 310 posts
- Joined: Jan. 2015
- Offline
-
- alexmajewski
- Member
- 136 posts
- Joined: Aug. 2017
- Offline
Drop&Render farm. Using their automated asset collection/discovery (the default workflow) which, at the time of writing, relies on relative links. As a result the final render would be missing any assets that had absolute links.
I'll let them know about this issue. Seems not uncommon that somebody would keep a library of assets at the root of the disk, right next to project folders.
I'll let them know about this issue. Seems not uncommon that somebody would keep a library of assets at the root of the disk, right next to project folders.
-
- Quick Links


