You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I build the MaterialX plugin and set PXR_MATERIALX_STDLIB_DIR in my build I get errors.
If I point it to the install_dir the nodes are loaded properly but the code generation fails since it can't find the implementations.
If I point it to install_dir/libraries, the nodes are not found
Note install_dir refers to your install_dir passed to build_usd.py
Steps to Reproduce
Build with PXR_MATERIALX_STDLIB_DIR to the build directory
Make sure any other environment variable helping MaterialX finding nodes and implementations are unset (I never managed to get any of them to work either)
Reference a simple MaterialX material into a scene and apply it to an object
Now you will get errors like this:
ERROR: Usdview encountered an error while rendering.Failed to get source code from file 'lights\genglsl\mx_point_light.glsl' used by implementation 'IM_point_light_genglsl'
My workaround which may or may not be great is setting PXR_MATERIALX_STDLIB_DIR to install_dir and adding searchPath.append(mx::FilePath(PXR_MATERIALX_STDLIB_DIR)/"libraries"); to the function HdSt_ApplyMaterialXFilter where the search paths are created.
I've attached a file reproducing the issue. Make sure you update the path to standard_surface_marble_solid.mtlx in the MaterialX package. materialx_issue.zip
System Information (OS, Hardware)
Windows 10, NVIDIA GPU, Visual Studio 2017, AMD 64
Package Versions
21.05 RC 1
Build Flags
MaterialX enabled, PXR_MATERIALX_STDLIB_DIR set to the install_dir
The text was updated successfully, but these errors were encountered:
Description of Issue
When I build the MaterialX plugin and set PXR_MATERIALX_STDLIB_DIR in my build I get errors.
If I point it to the install_dir the nodes are loaded properly but the code generation fails since it can't find the implementations.
If I point it to install_dir/libraries, the nodes are not found
Note install_dir refers to your install_dir passed to build_usd.py
Steps to Reproduce
Now you will get errors like this:
ERROR: Usdview encountered an error while rendering.Failed to get source code from file 'lights\genglsl\mx_point_light.glsl' used by implementation 'IM_point_light_genglsl'
My workaround which may or may not be great is setting PXR_MATERIALX_STDLIB_DIR to install_dir and adding
searchPath.append(mx::FilePath(PXR_MATERIALX_STDLIB_DIR)/"libraries");
to the function HdSt_ApplyMaterialXFilter where the search paths are created.I've attached a file reproducing the issue. Make sure you update the path to standard_surface_marble_solid.mtlx in the MaterialX package.
materialx_issue.zip
System Information (OS, Hardware)
Windows 10, NVIDIA GPU, Visual Studio 2017, AMD 64
Package Versions
21.05 RC 1
Build Flags
MaterialX enabled, PXR_MATERIALX_STDLIB_DIR set to the install_dir
The text was updated successfully, but these errors were encountered: