Can't blend between Depth of Field / Having problems with Focus

Hello!

I’m having problems blending between Depth of Field, using Timeline.

In my timeline, I have VirtualCameraA and VirtualCameraB, each with their own profile.
When I make a blend between the two cameras, the actual camera makes its transition and the profiles blend- except for the Depth of Field effect. Here’s a drawing of what I’m trying to do.

The camera is supposed to switch focus, based on my profiles, when I reach a new flag. It does change to the next profiles Depth of Field settings, but it just snaps, rather than blend. Even better, I also get weird cuts like these:

With my first camera position I have the logo in full focus, while the second camera is supposed to focus on the orange object, starting to appear in the image. But the Depth of Field doesn’t change until I’m at the very end of CameraB’s position.

Any suggestions? My main camera does have a profile aswell, it does have Depth of Field active.

1 Like

Unity: 2019.1.5f
Cinemachine: 2.3.5
Timeline: 1.0.0

Also, all my virtual cameras (expect for one) lose their Cinemachine Post Processing script whenever I open Unity. I’ve tried reinstalling Timeline and Cinemachine, no luck.

I can’t find them by searching for the component. I rely on that one camera working, copying+pasting its component every time I open the project.

Oh wow, new cool problem. All the Virtual cameras loose their Cinemachine Post Processing component whenever I try to record…

Here’s an example of how the Depth of Field snaps to certain points. Notice the logo:

For the scripts disappearing, this is a known issue, for which we are working on a fix. In the meantime, a workaround is described here: PostProcessing Adapter conflicts with CM 2.3.3

Did Cinemachine virtual camera blends with depth of field ever get solved? I am trying to do the same thing but not sure the right way to set things up. I am still using the standard pipeline, post processing v2, 2021.2.b5.

It’s not specifically a Cinemachine problem, it’s more to do with how the depth of field is implemented in PostProcessing. Some pointers for getting the best results:

  • Make sure you are using max float resolution in the DoF effect
  • Have a default DoF profile on the main camera with a reasonable value. When you blend from one DoF to another, it will pass through this default. Putting a reasonable value in there will help make nice blends.

I will give it another go, but nothing changed for depth of field when blending. The position of the camera etc changes, but no DoF impact. For now I animated the distance value on the camera directly… which had the extra benefit i could use the visualize flag on the main camera.

Here is when I animated it directly (just sharing for fun):

https://www.youtube.com/watch?v=2joqDvrMew8

I wish I could get the background more blurry - need to play with more settings I guess. Once uploaded to YouTube, the quality drop makes the blur not very noticeable. [UPDATE: Turned out YouTube had not finished processing the video in the background. The quality is much better when I checked later.]