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
Add empty sublayer will invalidate the 3 attribute queries in UsdSkelAnimQuery. LayerStack in resolveinfo is not updated.
Steps to Reproduce
sublayer_resync.zip
1 decompress this zip file. The folder "UsdSkelExamples" is almost empty (it is too big and unneccesary to upload), put pixar UsdSkelExample here.
2. use usdview to run with the Scene.usda, which is an empty scene as rootlayer.
3. run the first part of Script_PixarUsdSkelExample.py in interpreter to load the "HumanFemale.walk.usd" as sublayer.
You'll see the animation plays well.
4 run the second part of Script_PixarUsdSkelExample.py in interpreter to load the "Empty.usda" as sublayer.
The animation will be broken.
The easy fix is to remove the !sublayer->IsEmpty() check, and full scene can be retriggered (this behavior is the same as you add a scene with any prim(s) as sublayer). And skelAnimationQuery will be normal.
I understand that add a layer literally should resync the full scene since any data might change, but add a sublayer means that only attribute layerstack might change, it will be expensive to resync the whole scene, only the layerstack update is required. I wonder if Pixar already have any ideas for sparsely invalidating/updating the attributeQuery in usdimaging, especailly for UsdSkelImaging? Thanks.
The text was updated successfully, but these errors were encountered:
Thanks, @onamiforest , we're having a look. The line you identified in Pcp was an explicit optimization added in response to performance concerns in Solaris; however, we hadn't realized it would invalidate UsdAttributeQuery objects.
Description of Issue
Add empty sublayer will invalidate the 3 attribute queries in UsdSkelAnimQuery. LayerStack in resolveinfo is not updated.
Steps to Reproduce
sublayer_resync.zip
1 decompress this zip file. The folder "UsdSkelExamples" is almost empty (it is too big and unneccesary to upload), put pixar UsdSkelExample here.
2. use usdview to run with the Scene.usda, which is an empty scene as rootlayer.
3. run the first part of Script_PixarUsdSkelExample.py in interpreter to load the "HumanFemale.walk.usd" as sublayer.
You'll see the animation plays well.
4 run the second part of Script_PixarUsdSkelExample.py in interpreter to load the "Empty.usda" as sublayer.
The animation will be broken.
System Information (OS, Hardware)
Win10 (doesn't matter)
Package Versions
21.05 and before.
Build Flags
We actually have some debug on the reason. It is because this line.
https://github.com/PixarAnimationStudios/USD/blob/2b38362e4a0d93d4741ca4dd89cbdb9e59f2abcd/pxr/usd/pcp/changes.cpp#L1794
If the sublayer is empty, this line will stop the scene from doing a full resync. which makes the 3 attributeQuery in UsdSkelAnimQuery(implementation) invalid.
https://github.com/PixarAnimationStudios/USD/blob/dev/pxr/usd/usdSkel/animQueryImpl.cpp#L99
The easy fix is to remove the
!sublayer->IsEmpty()
check, and full scene can be retriggered (this behavior is the same as you add a scene with any prim(s) as sublayer). And skelAnimationQuery will be normal.I understand that add a layer literally should resync the full scene since any data might change, but add a sublayer means that only attribute layerstack might change, it will be expensive to resync the whole scene, only the layerstack update is required. I wonder if Pixar already have any ideas for sparsely invalidating/updating the attributeQuery in usdimaging, especailly for UsdSkelImaging? Thanks.
The text was updated successfully, but these errors were encountered: