Motion blur, shutterOpen and shutterClose

I am developing a generative procedural plugin for Hydra 2, and would like to integrate motion blur support. To determine whether motion blur is required or not, I fetch the primary camera from HdSceneGlobalsSchema, then ask the camera for its shutterOpen and shutterClose data sources.

The problem I am having is that those data sources initially return 0, even if the camera prim contains authored, non-zero values. They continue to return 0 until I set them manually, using usdview’s interpreter window.

Another problem (perhaps related) is that I declare a dependency on the primary camera’s shutterOpen and shutterClose properties in my plugin’s UpdateDependencies() method, and yet changing their values does not trigger an Update().

Any suggestions…?

1 Like

Well, I found the solution by myself. Changing the shutterOpen and shutterClose attributes from float to double fixes both problems…

I am reopening this issue because, although my procedural plugin sees the shutter values, RenderMan XPU, which I am using to test motion blur, does not see them automatically.

When I run usdview, RenderMan XPU initially ignores the authored values for the camera’s shutter:open and shutter:close properties and says that motion blur is globally disabled. But if I set one of them by hand in usdview’s Python interpreter window, even to the same value, RenderMan XPU then sees the value and performs motion blur correctly.

Any suggestions…?