Search Unity

Cinemachine PostFX blending issues.

Discussion in 'Cinemachine' started by Krasshirsch, Aug 5, 2018.

  1. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Hello folks,

    we are currently using Cinemachine (Asset Store Version) to blend between camera angles, obviously ...
    Additionally we are utilizing the "Post Processing Stack V2" to blend between post effect setups. Unfortunately some post effects do blend in a, let's call it, unexpected way with the "Depth of Field" being the most obvious one.

    For testing purposes we have created a scene with two identical cameras. They both have the same position, orientation, viewports and post effect, namely the "DoF". With this setup we expect the focus not to change during the transition, since the DoF setup is identical as well.



    Below we can see that this is not the case at all, the depth of field seems to defocus and refocus during the two transitions in the video.



    I was wondering whether we are doing something wrong here.
    Any and all help is greatly appreciated.

    Regards
    Alexander
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    This is something specific to Depth of Field, due to the maths involved. Unity cannot infer a default value for this, and so does not have enough information to perform the blend, that's why it looks weird. The solution is simple: you need to define a default PP volume on the camera, with a Depth of Field set, to provide a default scene value for Depth of Field. Then your blend will behave properly.
     
  3. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Thanks for the rapid reply.
    The camera already has a PP volume attached. I have now added a default "DoF" effect to it.


    I have given the global PP profile the same "DoF" effect as both cameras.


    Unfortunately nothing has changed :(
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    If the weight is zero then the global profile will have no effect. Turn the weight to 1 and see if that helps
     
    Last edited: Aug 5, 2018
  5. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Setting the weight to 1 had no effect either :(

    In addition the bloom effect suffers from a somewhat similar issue. The effect disappears completely during the transition and reappears at the end. Chromatic Abberation on the other hand works perfectly.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Strange.
    I'd like to have a look at the scene.
    Can you export a small package that shows this problem, and post it here?
    Also tell me which version of Unity and which version of Post.
    Is there a reason you're using the AssetStore version of CM and not the latest? It's very old...
     
  7. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    I will try and setup a small scene illustrating the issue.
    We currently using Unity 2017.4.8f1 LTS and the GitHub master branch of the PP stack.

    We'd be happy to move to a newer CM version but we cant upgrade to Unity 2018 for various reasons involving some legacy components which simply break. If you can provide us with a method of updating CM without a switch to 2018 we would do so immediately.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    It can be done:
    1. Open an empty project in Unity 2018, download CM from the package manager.
    2. This will create a cache of the CM sources somewhere on your local machine. Locate it by editing a CM script (e.g. create a vcam, then choose "edit script" from the little gear thingy)
    3. Then copy the com.unity.cineachine folder from the cache to the Assets folder of your 2017 project. It should work.
    4. Important note: before you try this
      1. Make a backup of your project
      2. Delete the old Cinemachine asset, including any CM/PostProcessing adapter code. Do it first, or there will be metafile hell
      3. Understand that we do not test new CM on old Unity versions. It will very likely work fine, but we make no promises.
     
    Last edited: Aug 6, 2018
  9. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Thanks for the hint. I will try and migrate to the newer CM version within the next couple of days and report back, perhaps this issue has already been resolved.
     
  10. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    We have upgraded Cinemachine to the latest version and are happy to say that the blending issues have disappeared. It seems to be an issue with the Asset Store version.
     
    Gregoryl likes this.