Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
244 stars 57 forks source link

Motion blur UsdSkel in the procedural #951

Closed sebastienblor closed 2 years ago

sebastienblor commented 2 years ago

This ticket is similar to #738, but for a fix in the procedural. To Reproduce Steps to reproduce the behavior:

Download the UsdSkel example file from https://graphics.pixar.com/usd/downloads.html In Maya, read the file in Arnold Stand-In. Enable motion blur in arnold rendersettings. Render. You will see that motionblur exists but its only the transformation of the skeleton that shows up. Mute the transform animation on the top group. The character will now walk on the same spot, with no motion blur whatsoever.

sebastienblor commented 2 years ago

Based on my current tests, this seems to be a bug in the USD implementation of UsdSkelBakeSkinning . If the skinning has a key on frames 1, 2, 3, etc... and that we render frame 1 with motion blur (shutter -0.5/0.5), then we'll call UsdSkelBakeSkinning with a time interval of 0.5 / 1.5. Since that interval only contains a single skinning key, it will return us a static attribute. So we won't have any way to get motion blur. If on the other hand we use a bigger shutter and that encompasses frame 2, then we'll have several baked keys and a proper motion blur.

We could decide to extend the interval to apply the skinning, to at least the surrounding integer frames. But that would work only if there is a key per frame, and might still fail if there are less keys. The only way to have a fully correct result would perhaps be to ask to bake the skinning on the whole interval, but that would be overkill