PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.17k stars 1.23k forks source link

Cannot see the assigned material on a GeomSubset under Hydra Storm #3437

Open lanierd-adsk opened 1 day ago

lanierd-adsk commented 1 day ago

Description of Issue

When being under Hydra Storm in maya-hydra and assigning a usd preview surface, one of the Usd imaging stage scene index is not updating the material bindings, it's the flattening scene index. A stage file to repro the issue is given in the zip file attached to this issue.

Please see the video from : https://myshare.autodesk.com/:v:/g/personal/david_lanier_autodesk_com/EbILShDlUndHljnG9K9-xeUBKlGUvgglX6TSkRPbaS_8bg?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=2ZltJw

And the fact it's the flattening scene index that removes the material bindings : https://myshare.autodesk.com/:v:/g/personal/david_lanier_autodesk_com/Eelr4R3iGqRArTg2WKkjFlkBUz3ot9fMn-OpSRIhleKtSQ?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=Fqa7Lp

And in the materialBindingsResolvingSceneIndex if I set a breakpoint on this line : https://github.com/PixarAnimationStudios/OpenUSD/blob/9b0c13b2efa6233c8a4a4af411833628c5435bde/pxr/usdImaging/usdImaging/materialBindingsResolvingSceneIndex.cpp#L191 I have Hydra materials bindings here exactly as we don't expect to have some as stated the comment.

One possible workaround for assigning the material and seeing it being displayed under hydra Storm is to set a material binding strength to UsdShadeTokens->strongerThanDescendants, this workaround fixes the issue.

Steps to Reproduce

  1. Please see the video and use the ascii usd stage from the .zip file attached to this issue and under hydra storm, try to assign a usd preview surface to the geomsubset, you should not see the material assigned being displayed as one of the scene index (the flattening scene index) is ignoring the material binding.

System Information (OS, Hardware)

Windows

Package Versions

24.11

Build Flags

testGeomSubset.zip GeomSubsetUnderHydraStorm

jesschimein commented 1 day ago

Filed as internal issue #USD-10461