Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug? blending draws weird circle when blending two close cameras

Discussion in 'Cinemachine' started by ant-papa, Mar 23, 2022.

  1. ant-papa

    ant-papa

    Joined:
    Feb 27, 2021
    Posts:
    2
    When blending two cameras, cinemachine default blending draws circle instead of straight line.
    it always happens when camera's rotation is around 90 degree.

    the test project set up is as follows.
    1. Make new 3d project, unity 2019.4.36f1
    2. Install Cinemachine, version 2.6.11
    3. Cinemachine -> Create Virtual Camera (vcam)
    4. reset the created vcam, so its position is at zero
    5. duplicate the vcam, so you have two cameras with identical setting.
    6. for vcam1, rotate 95 degree along with x axis
    7. for vcam2, rotate 85 degree along with x axis.
    8. play the project, now the main camera brain is set to vcam1.
    9. turn off and on the vcam2 to see how blending works.
    -> it draws weird circle instead of straight line.

    this doesnt happen when blending 10 degree camera and 20 degree camera.
    it only happens when number "90" is involved.
    is this natural?

    bugreport.gif
    blending.png





    Below is the image of camera settings.
    vcam1.png vcam2.png maincam.png
     
    Last edited: Mar 23, 2022
  2. ant-papa

    ant-papa

    Joined:
    Feb 27, 2021
    Posts:
    2
    I tested with 89 degree rotated camera and 91 degree rotated camera, and it creates same problem as above.
    Also, I have tried solutions mentioned here,
    https://forum.unity.com/threads/issue-of-camera-flipping-rotating-during-a-blend.592783/
    which is changing body or Aim to other options including none, framing transposer, and etc.
    Nothing worked. Blending makes weird circle instead of straight line when going from 89 degree to 91 degree.

    I also tried many different combinations of settings, such as using Look At target, changing Blending hit for all possible combinations.
    Nothing worked.

    I don't know why 90 degree causes this problem, but I guess I have to write my own script for blending.
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    6,010
    There is logic in the blending code to preserve the up orientation wherever possible. This is good for many reasons, but the downside is that you can run into gimbal-lock situations, such as this one. +-90 pitch is special because of this.

    If your cameras are going to be pointing mostly down (or up) in this manner, you can get around this problem by setting the world up override in the CM Brain. Create an empty object, put 90 in its X rotation, and assign that object to the CM Brain World Up Override field:

    upload_2022-3-28_13-59-52.png
     
    ant-papa likes this.
unityunity