Arnold Shutter subframe sampling for motion blur

1,614 views
Skip to first unread message

Jamie Schmitt

unread,
Sep 30, 2021, 2:06:10 PM9/30/21
to gaffer-dev
Hi, I'm doing some work with Arnold in gaffer and am trying to understand a bit better what's going on behind the scenes with some of the motion blur settings.  Any insights would be greatly appreciated!

I am trying to build a setup that will allow me to control a lot of the motion blur settings found on these pages:


I'm trying to render alembics from houdini for some particles/points, and some geometry which has led me to a few questions:
  • Am I correct in assuming that the 'shutter' parameter takes over for all of the 'shutter controls' mentioned in the above link? ie: 'shutter length', and 'position' (center vs start, or end on frame).  It is basically the 'custom position' as seen in maya arnold?

  • based on the shutter parameter settings, am I correct that it will try to sample 3 subframes / frames from the alembics?This is how I think it is working, please let me know if this is correct or not:
    • shutter: [-0.25, 0.25], frame: 5
      • samples frames: 4.75, 5, 5.25
      • shutter length: 0.5
      • shutter angle: 180
      • Houdini alembic rop motion blur export samples: 4
    • shutter: [-0.5,0.5], frame 5
      • samples frames: 4.5, 5, 5.5
      • shutter length: 1
      • shutter angle: 360
      • Houdini alembic rop motion blur export samples: 2
    • shutter: [-0.333,0.333], frame: 5
      • samples frames: 4.666,5,5.333
      • shutter length: 0.666
      • shutter angle: ~239
      • Houdini alembic rop motion blur export samples: 3

  • Is it possible to render motion blur using the velocity attribute instead of sample motion?  I stumbled across this osl example using the 'v' attribute, but was finding that it seems to transport my particles fairly far away when using my velocity from houdini. (please see attached file)

  • Does motion blur not work when rendering points/particles directly using the 'radius' attribute?  So far the most success I've had rendering them with motion blur was by instancing spheres onto them rather than rendering the points directly

  • In the arnold link at the start of this post they mention 'keys' for sampling extra frames for getting things like arcs in the motion blur path.  I found this post in the forum detailing the use of segments instead: https://groups.google.com/g/gaffer-dev/c/6EUDQYbXNto/m/CsgD0r98CQAJ.
    • My question is in order to sample these motion segments (X-X-X) do I need to be making sure that I have more subframes exported in the alembic?  Not sure which subframes would be sampled based on these settings
    • The example gaffer scene from this post has the 'standardAttributes' node adding the motion segments, but it doesn't appear to have a path filter node in it - if there is no path filter node does that mean it will operate on everything that passes through it?
    • does 'ai:motion_start', and 'ai:motion_end' in the 'custom attributes' operate differently from the shutter setting in the standard options?
Sorry for the long winded post,  I've attached a sample scene showing my current setup

Jamie Schmitt

unread,
Sep 30, 2021, 2:09:49 PM9/30/21
to gaffer-dev
can't seem to upload the gaffer file, I've copied the scene code to here:
https://pastebin.com/CdapG6fN

John Haddon

unread,
Oct 1, 2021, 4:02:44 AM10/1/21
to gaffe...@googlegroups.com
  • Am I correct in assuming that the 'shutter' parameter takes over for all of the 'shutter controls' mentioned in the above link? ie: 'shutter length', and 'position' (center vs start, or end on frame).  It is basically the 'custom position' as seen in maya arnold?
Yes, correct. 
  • based on the shutter parameter settings, am I correct that it will try to sample 3 subframes / frames from the alembics?This is how I think it is working, please let me know if this is correct or not:
    • shutter: [-0.25, 0.25], frame: 5
      • samples frames: 4.75, 5, 5.25
      • shutter length: 0.5
      • shutter angle: 180
Almost, but the "samples frames" you have listed are what you'd get for two transform segments in Gaffer, not three. StandardAttributes specifies things in terms of segments, and `samples = segments + 1`.
      • Houdini alembic rop motion blur export samples: 4
I'm not qualified to comment on this part, but my guess would be that you'd want to export 4 samples from Houdini to match 3 segments in Gaffer. I don't know if Houdini uses the shutter settings to determine where those samples go, and therefore if they'd line up exactly with the samples Gaffer takes. If they don't match, Gaffer's SceneReader will perform linear interpolation between the Alembic samples. From memory, I think if you have rotations (rather than matrices) in the Alembic file, then these will interpolate in a smooth arc.
  • Is it possible to render motion blur using the velocity attribute instead of sample motion?  I stumbled across this osl example using the 'v' attribute, but was finding that it seems to transport my particles fairly far away when using my velocity from houdini. (please see attached file)
Not out of the box I'm afraid. There are VelocityBlur nodes knocking about internally but they haven't made it to the open source project. They're a little more sophisticated than the OSL example, but follow the same basic principle. I suspect your velocity is measured in `units/second` rather than `units/frame`, which is why you're getting a bigger offset than you expect.
  • Does motion blur not work when rendering points/particles directly using the 'radius' attribute?  So far the most success I've had rendering them with motion blur was by instancing spheres onto them rather than rendering the points directly
It is certainly intended to work, and I would have expected to get reports from production if it wasn't. If you have a simple repro, I can take a look.
    • My question is in order to sample these motion segments (X-X-X) do I need to be making sure that I have more subframes exported in the alembic?  Not sure which subframes would be sampled based on these settings
I think this is covered somewhat in the answers above. If you don't have extra samples in the Alembic, you'll get interpolation between them. Whether or not your Alembic samples will line up exactly with Gaffer's sampling depends on how Houdini exports the Alembic.
  • The example gaffer scene from this post has the 'standardAttributes' node adding the motion segments, but it doesn't appear to have a path filter node in it - if there is no path filter node does that mean it will operate on everything that passes through it?
 StandardAttributes applies to all locations if it doesn't have a filter applied to it. Several of the earliest nodes operate that way, but we subsequently thought better of it and more recent nodes require a filter before they will do anything. You can use the SceneInspector to verify the effect on each location.
    • does 'ai:motion_start', and 'ai:motion_end' in the 'custom attributes' operate differently from the shutter setting in the standard options?
I don't think this is necessary at all, in fact I don't think it will do anything. Gaffer will automatically set Arnold's `motion_start` etc appropriately based on Gaffer's sampling settings.
 
Sorry for the long winded post,  I've attached a sample scene showing my current setup

It's a complex topic. Hopefully my answers above help somewhat, but I feel I may not have covered everything well enough. Don't hesitate to ask again if anything isn't making sense, or you think you've found a bug...
Cheers...
John  
Reply all
Reply to author
Forward
0 new messages