When USD is handling the material processing, shadows exhibit fine (see usdPreviewSurfaceSelfShadow.usda and screenshot).
However, when we use MaterialX, the shadows are unsupported - whether using standard surface - see: mtlxSelfShadow.usda and screenshot;
or using usd preview surface - see: mtlxPreviewSurfaceSelfShadow.usda and screenshot:
All of the above shows shadows fine on Windows with OpenGL.
Steps to Reproduce
Build using dev branch and the attached patch file. Note: The attached patch hacks shadows in usdview for simple demonstration, with a simple fixed light.
shadow-patch-using-dev.patch
Launch usdview with eg. the attached mtlxSelfShadow.usda file.
shadow_test.zip
Expected results: Shows a shadow on the wall. Exhibits self-shadowing on the spirals of the object.
Actual results: No shadows on the wall. No self-shadows.
Description of Issue
When USD is handling the material processing, shadows exhibit fine (see usdPreviewSurfaceSelfShadow.usda and screenshot).![image](https://github.com/user-attachments/assets/4994d7e0-fcec-4f02-a3fd-2cf47ca8b937)
However, when we use MaterialX, the shadows are unsupported - whether using standard surface - see: mtlxSelfShadow.usda and screenshot;![image](https://github.com/user-attachments/assets/93c3b756-70f5-4c87-abee-678116fb0549)
or using usd preview surface - see: mtlxPreviewSurfaceSelfShadow.usda and screenshot:![image](https://github.com/user-attachments/assets/f5ac0467-63ef-4bea-b523-427f9f98faca)
All of the above shows shadows fine on Windows with OpenGL.
Steps to Reproduce
Build using dev branch and the attached patch file. Note: The attached patch hacks shadows in usdview for simple demonstration, with a simple fixed light. shadow-patch-using-dev.patch
Launch usdview with eg. the attached mtlxSelfShadow.usda file. shadow_test.zip
Expected results: Shows a shadow on the wall. Exhibits self-shadowing on the spirals of the object.
Actual results: No shadows on the wall. No self-shadows.
System Information (OS, Hardware)
Macbook Pro, MacOS Sonoma 14.5 Apple M1 16 GB
Package Versions
N/A - using https://github.com/PixarAnimationStudios/OpenUSD/tree/dev with attached patch
Build Flags
python build_scripts/build_usd.py --generator Ninja --build-variant debug -j 8 --build ./Build ./Install --build-args OpenImageIO,-DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=OFF USD,-DCMAKE_CXX_FLAGS=\"-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION\"