What comes first.... Motion blur or lens defocus?

hot take: if you are working in Scene Linear it doesn’t matter what order you do them.

I had a hunch that some of this issue may be due to rec709 destroying highlight detail so I ran a test.

I made a 3d object in action, set the colorspace to ACEScg, and my viewing lut to “ACES to SDR video (rec709 limited)”.

I lit the heck out of it so the highlights were well above 1 (my rim light was set to 10,000 brightness). I rendered it out both sharp and motion blurred. With the sharp image I applied a defocus first, then a directional blur to simulate the “defocus first” approach. Next, with the already-motion blurred one I applied a defocus on top of that to simulate the opposite approach.

There are some differences but they’re all within the realm of taste; none are clearly better.

As someone who spent years rolling my eyes at people telling me, “scene linear is better! the math works! I can’t explain any of it, but it does!” I feel examples like this are useful. The reason this works is because scene linear mimic’s real-world light values, which means that something that looks white IRL is BRIGHT AS FUUUUUCK.

The highlight in this shot meters 135 and the shadow is 0.04 (approx 16 stops of difference) before any blur is applied. When blurred (motion and defocus) that highlight stays bright (metering around 3.0 in all three examples depicted), regardless of the order in which the operations happen. In rec709 the highlight is clipped to 1 and the shadow is 0.07 so you have to do a lot of labor to retain highlights when blurring (motion or defocus)

6 Likes

here’s the same image if I convert it to rec709 after coming out of action (so the motion blurred example is still linear for one of the two blur stages. You can see how in all cases the highlight detail gets mashed into the general blur of the image.

Thanks Andy, I see that. I’m still not entirely convinced that the trouble of working in linear is worth it in many cases. It’s a lot of jumping through confusing and inefficient hoops, then the end result is the same image that I make just winging it and making things look purdy.

Of course I have clients that I work in linear, no problem. But in a lot of cases it’s a solution in search of a problem.

Oh totally. Any shot that gets approved was done “correctly”. Hahaha.

1 Like

Doing DoF and MB in post on CG is always a ‘hack’ atm… … can’t use motionvector pass after things have been defocussed and even DoF is missing data on what’s ‘behind’ the pixels it’s moving. Defocussed objects really close to the camera become almost transparant, especially near the edges. So you’d need to know what’s behind. Years ago I worked with a TD to have mental ray (yeah, that long ago) render a ‘behind-pass’ which we could use to do proper DoF… but then he got snatched by Weta and that was that… hah…

I’m with GPM… wing it until it looks good… but then in linear… :wink:

1 Like

Argument for deep right there…

1 Like