Search Unity

Depth of Field on different Vcams: Unity 2020

Discussion in 'Cinemachine' started by Sean__R, Jul 23, 2021.

  1. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    Hello, if I have 3 different Vcams in Timeline, how do I set up a different depth of field for "each" Vcam in Unity 2020? There are a lot of outdated tutorials on the web.

    Sean
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    Assuming you're using HDRP or URP, then you can add a CinemachineVolumeSettings extension to the vcams whose DOFs you want to modify. Add the PostProcessing/DepthOfField override to the custom profile in the extension and set the DoF there.

    It's a good idea also to have a default global volume with the default DoF setting, so that the blends work well. They don't always if there is no default DoF setting.
     
    Sean__R likes this.
  3. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    Hello, I'm using HDRP. When you suggested, "...idea also to have a default global volume with the default DoF setting, so that the blends work well"...did you mean add a default volume to the main camera with global turned on?

    Sean
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    Yes. You don't have to add it to the main camera, you can add it anywhere. If it's global and active, the renderer will pick it up.

    Volumes in general are not associated with specific cameras. They will apply to any camera. Vcam volumes are attached to the vcams only to blend in the effects along with the vcams. Under the hood, they are just creating dynamic global volumes and blending in their weights.
     
    Last edited: Jul 23, 2021
    Sean__R likes this.
  5. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    Thank you, Gregoryl. That helped me.

    Cheers,
     
    Gregoryl likes this.