Where does DOF focus come from?

I am switching between 2 cameras, each with different focus points (one close, the other far away). I then send the scene to the compositor with a DOF blur node, but the pass does not change camera focal points!

The result is that only the first focal point is used for the duration of the render.

I also tried using an empty as a DOF target but that didn’t work either.

If I can’t switch cameras during a scene (while compositing) what should I do? should I make a dup scene for every camera change?

How are you switching cameras? Since there are a lot of different ways to do this (some more hackish than others), let’s start there.

I am using the vse function on a scene strip to switch between cameras. And I am swapping the order they appear on the timeline.

If you’re doing it that way, it seems like you may have stumbled across a bug (or, at the very least, a limitation of Blender). I’d suggest doing two things:

  • Submit a bug report. Of course, first check to make sure that someone hasn’t already reported the bug. Also, it may be useful to include an example .blend that exhibits the bug’s behavior.
  • In the meantime, you can work around this by creating a new scene that’s a copy of the original; the only difference being which camera is active. Then, in a third scene, use the VSE to do your sequencing and switching between cameras by using scene strips.

Fweeb thankyou, that is exactly what I did. I just haven’t been near an internets to tell anyone.

I think it was because the camera switcher in the VSE happens without telling the compositor in other scenes. I’m not sure it is a bug but would be handy if that call could propogate outside of the VSE. I guess it depends on the order of events, as the VSE is last.

In my experience, it’s still worth it to report the bug. Worst case, the devs mark it as NOTABUG and move on. However, the usage you were aiming for is most certainly something a user would expect to be allowed. If it was an implementation oversight, then it’s a bug and it should be fixed. If it’s not something that a user should be able to do, then it is a usability bug and changes should be made to prevent the user from being able to do it as you’ve tried.

Of course, this is all just my opinion.