[usdview] Add the option to step through authored samples in usdview.
Description of Change(s)
- Adds a new feature to
usdviewthat allows users to step through authored samples instead of a fixed time step - Adds a utility method to
UsdStageto get all of the authored samples across all prims of a stage. A wrapped command is also made available to python.
Credit to @sirpalee for the original implementation :)
Use Cases
This has been an essential feature at our studio for debugging sample related issues in caches. The feature really shines when using renderers with "frame relative samples".
- If artists need to troubleshoot any motion blur issues, they can use this mode to play through an export and quickly determine if the issue has to do with a bad cache sample or the interpolation between samples.
- It is also a very handy way to quickly determine where the samples exist in a cache using the timeline. This can be a lot more fluid and intuitive for artists than inspecting the attribute data.
Example Screenshots
Here I am loading in a cache with frame relative samples at -.25, 0, and +.25.
With the feature disabled (default), you can scrub by a constant frame step and see the .5 frame (which does not have an actual sample).
With the feature enabled, you can scrub through and only see authored frames (If you input 1005.5 it will be rounded to 1005.75).
Let me know what you think, and whether we can contribute this back to the core.
- [X] I have verified that all unit tests pass with the proposed changes
- [X] I have submitted a signed Contributor License Agreement
Filed as internal issue #USD-8738
Hi @nxkb ! This definitely seems like a useful feature - I have a few concerns/questions, though:
- The method added to UsdStage could be very expensive, and is easily parallelizable by prim, with proper concurrent gathering of results
- Although this could change with the future introduction of constraints and other "non-local" dependencies, does it seem more useful that you'd want this analysis for a selected prim and its ancestors only, rather than always considering samples from all prims in the scene? I realize that would complicate the use of the results in usdview, but wanted to explore the space
- I'm concerned about the fact that once computed, the set-of-all-timeSamples is fixed. If you change stage load-state or switch a variant (or of course mutate the stage), that could change. usdview can listen for authoring changes (including variant selections made in the UI), which should also cover the load/unload case, as that triggers ObjectsChanged notices.