From another perspective: "Focus tracking during exposure"

OK, so this is probably pretty obscure, but it looks like the motion blur system in cycles isn't taking into account camera focus over time.

[EDIT] Just to clarify, I'm using motion blur to refer to the renderer integrating over time. I'm not asking about an image space selective blur or approximation, but a physically accurate render and effect.

I haven't had any luck with either setting a moving object for focus tracking or setting keyframes in the distance field. In both cases focus does change correctly when moving between each frame, just not in a render with motion blur.

enter image description here

  • Attempting to focus track a moving cube (with a static one for reference): enter image description here

Is there something I'm doing wrong or is this on the todo list?

In regard to what this might be used for:

  • Case 1. You actually want to integrate objects transitioning out of/in to focus such as in this photo: Fireworks refocused quickly during an explosion

    There may be none or little actual movement for the motion blur but changing focus during an exposure can add interesting effects. Here, I'm use the name motion blur to refer to integrating over time which is what the effect actually does, rather than literal blur from motion.

  • Case 2. You have a shallow depth of field (and still want the effect that gives), but you want motion blur of a subject moving perpendicular to the focal plane without the defocusing effects of Case 1. Tracking the moving object (with focus only and the camera remaining stationary) would give this effect. In doing so the background will not be blurry from motion, but may change focus a little.

  • $\begingroup$ If I understand correctly, you want to animate the aperture during an "exposure" (within the space of one frame)? $\endgroup$ – gandalf3 Jul 18 '14 at 19:11
  • $\begingroup$ @gandalf3 not aperture but the camera's focal plane (image added) and yes, all within one render. I don't think it can be done in the current version, short of rendering/compositing many frames to do the time integration manually. $\endgroup$ – jozxyqk Jul 18 '14 at 19:28
  • $\begingroup$ It does seem like this isn't possible atm.. You could try asking on one of the mailing lists to make sure it's really not possible, or if it's possible to be added at some point. $\endgroup$ – gandalf3 Jul 19 '14 at 18:16

Motion blur is separate from Depth of field (camera blur). The object will only be more in focus if either the motion blur is turned down or there is less movement of the object relative to the camera.

  • $\begingroup$ Yes it's separate but entirely possible to have them both. There are two cases: 1. moving subject where I want motion blur on only the subject without the defocusing effect seen in my example. 2. a still subject with changing focus over time, yet no motion blur from movement as in the linked image. $\endgroup$ – jozxyqk Jul 18 '14 at 14:07
  • $\begingroup$ Then I think your question could be clearer. e.g. "How to apply motion blur to specific parts of my image?". This doesn't seem to be to do with DoF. The other answer should be of use. $\endgroup$ – Ray Mairlot Jul 18 '14 at 14:13
  • $\begingroup$ You're right, I've tried to describe it better. My question is about DoF being correctly applied during motion, so they're both relevant. $\endgroup$ – jozxyqk Jul 18 '14 at 14:34

Because motion blur blurs everything if your camera is moving. Try adding motion blur via compositing by using the vector pass and blurring manualy. This way you can also create a mask to keep the cube sharp. I hope this is what you where looking for!

  • $\begingroup$ In my example, the camera is still and the object is moving (should have added a background to demonstrate really). Post-process motion blur can only go so far without inaccuracies. It would certainly be a step in the right direction to avoid defocusing a moving subject but wouldn't work in the case of integrating the defocusing of a still subject. $\endgroup$ – jozxyqk Jul 18 '14 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.