[hdPrman] Use shutter curve on the camera when available.
authorrajabala <rajabala@users.noreply.github.com>
Sat, 3 Feb 2024 03:54:43 +0000 (19:54 -0800)
committerpixar-oss <pixar-oss@users.noreply.github.com>
Sat, 3 Feb 2024 04:09:39 +0000 (20:09 -0800)
commita1f27682852e8dd61773fd349068399f2b8b0515
tree691f8c9a5726fc66d204b6d820011de67f5f27c8
parent3de7981602b93aedf6b73c10a85616c3bb036804
[hdPrman] Use shutter curve on the camera when available.

- Update HdPrmanCamera to query and cache shutter curve attributes.
- Rework HdPrman_CameraContext to use the camera's shutter curve when available. It no longer needs to cache any of this state nor expose API to set it.
- Add unit test for various shutter interval and curve scenarios. See movingSphere.usda for notes on having motion blur show up correctly when using usdview.
- Update existing motion blur tests to use the fallback shutter curve for batch rendering so the baselines can remain unchanged.

Note that usdImaging wasn't updated to accomplish this. The reason this works is because the 1.0 and 2.0 getters (UsdImagingDelegate::GetCameraParamValue and UsdImagingDataSourceCameraPrim) fallback to querying the attribute on the USD prim. The shutter curve attributes are auto-applied by the UsdRi PxrCameraAPI schema on any UsdGeomCamera prim and thus always available when using hdPrman with USD.

It would however be useful to add an UsdImagingAPISchemaAdapter for PxrCameraAPI to allow its attributes to be inspectable in the Hydra Scene Browser.

(Internal change: 2313615)
third_party/renderman-25/plugin/hdPrman/camera.cpp
third_party/renderman-25/plugin/hdPrman/camera.h
third_party/renderman-25/plugin/hdPrman/cameraContext.cpp
third_party/renderman-25/plugin/hdPrman/cameraContext.h
third_party/renderman-25/plugin/hdPrman/renderParam.cpp
third_party/renderman-25/plugin/hdPrman/renderParam.h
third_party/renderman-25/plugin/hdPrman/renderPass.cpp
third_party/renderman-25/plugin/hdPrman/renderSettings.cpp