-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaterialX search paths are unstable not relocatable and code gen breaks when relocating libraries #1586
Comments
Filed as internal issue #USD-6824 |
pixar-oss
pushed a commit
that referenced
this issue
Nov 16, 2021
UsdMtlx uses the two environment variables PXR_USDMTLX_STDLIB_SEARCH_PATHS and PXR_USDMTLX_PUGIN_SEARCH_PATHS for the user to specify where to find the necessary MaterialX files. The imaging side does not do this. This change adds that behavior to HdMtlx. So now, if the location of the MaterialX provided libraries folder changes from the location originally found at runtime (stored in PXR_MATERIALX_STDLIB_DIR) the new location(s) can be indicated with PXR_MTLX_STDLIB_SEARCH_PATHS. The location(s) to any custom MaterialX files can be indicated with PXR_MTLX_PLUGIN_SEARCH_PATHS. (Based on GitHub PR #1628 by @vlasovi) Fixes #1586 (Internal change: 2197997)
lkerley
pushed a commit
to imageworks/USD
that referenced
this issue
Jan 7, 2022
UsdMtlx uses the two environment variables PXR_USDMTLX_STDLIB_SEARCH_PATHS and PXR_USDMTLX_PUGIN_SEARCH_PATHS for the user to specify where to find the necessary MaterialX files. The imaging side does not do this. This change adds that behavior to HdMtlx. So now, if the location of the MaterialX provided libraries folder changes from the location originally found at runtime (stored in PXR_MATERIALX_STDLIB_DIR) the new location(s) can be indicated with PXR_MTLX_STDLIB_SEARCH_PATHS. The location(s) to any custom MaterialX files can be indicated with PXR_MTLX_PLUGIN_SEARCH_PATHS. (Based on GitHub PR PixarAnimationStudios#1628 by @vlasovi) Fixes PixarAnimationStudios#1586 (Internal change: 2197997)
seando-adsk
pushed a commit
to autodesk-forks/USD
that referenced
this issue
Mar 1, 2024
UsdMtlx uses the two environment variables PXR_USDMTLX_STDLIB_SEARCH_PATHS and PXR_USDMTLX_PUGIN_SEARCH_PATHS for the user to specify where to find the necessary MaterialX files. The imaging side does not do this. This change adds that behavior to HdMtlx. So now, if the location of the MaterialX provided libraries folder changes from the location originally found at runtime (stored in PXR_MATERIALX_STDLIB_DIR) the new location(s) can be indicated with PXR_MTLX_STDLIB_SEARCH_PATHS. The location(s) to any custom MaterialX files can be indicated with PXR_MTLX_PLUGIN_SEARCH_PATHS. (Based on GitHub PR PixarAnimationStudios#1628 by @vlasovi) Fixes PixarAnimationStudios#1586 (Internal change: 2197997)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Issue
When building with materialx the full path to the materialx libraries directory is burned into the build making it hard to relocate a build to a different location.
There seems to be a number of environment variables to allow user defined materialx search paths (PXR_USDMTLX_STDLIB_SEARCH_PATHS, PXR_USDMTLX_PLUGIN_SEARCH_PATHS and MATERIALX_SEARCH_PATH are my candidates) but non of them seem to work fully regardless how I set them.
When properly setting PXR_USDMTLX_STDLIB_SEARCH_PATHS to the library the translation mtlx graphs to USD seems to work but when trying to render the results in hydra storm I get a number of issues along this line:
My ideal solution to this problem is looking up the libraries directory relative to something that is stable when relocating the build rather than relying on environment variables for the default case, I'm not sure what the right solution would be but it would make sense to put it among the resources for the materialx plugin rather than in the global libraries directory for the build and avoid burning in this path in the executable but looking it up relative to the plugin loaded.
With that said, it would also be great if I could get these search paths to work so I can work around the issue for now.
Steps to Reproduce
I have tried to point PXR_USDMTLX_STDLIB_SEARCH_PATHS and PXR_USDMTLX_PLUGIN_SEARCH_PATHS to a number of different locations without success but it might still be a user error on my side.
search_path_issue.zip
System Information (OS, Hardware)
Windows 10 x64
Package Versions
USD 21.08
Build Flags
--MaterialX
The text was updated successfully, but these errors were encountered: