Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cinemachine blending doesn't make sense?

Discussion in 'Cinemachine' started by mradfo21, May 25, 2018.

  1. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    im trying to blend from my camera rig into another setup and cinemachine completely fails to blend in a way that makes any sense. i made a video



    whats crazy is the bizzare blending its doing... i dont even know where its getting that camera. all the cameras are set up correctly in the scene..

    upload_2018-5-25_14-5-21.png
     
  2. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    Does the Cinemachine API have any exposure for what the currently active camera is? I might actually just do the blending myself using a normal unity camera.
     
  3. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    ok i made a simpler set up just to see if it was my custom stuff

    nope

    i dont know how this blending is working but its quite bad. it needs to smoothly translate and blend the rotations and positions not perform some awful spherical lerp sweep thing. I'm so confused... i just.. am i missing something?

     
  4. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    i found the bug! when you have a lookat target the blending is F***ed.

    lets fix this bad boy!

     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    When LookAt targets change between cameras, there are multiple strategies for blending between them, which look different, and are appropriate in different situations. Unfortunately there is no one-size-fits-all strategy to handle these kinds of blends. There simply isn't enough information available to disambiguate your intentions.

    Recent CM versions have had some work done in this area, it's now possible to give blend hints to the vcam. That helps a lot. I reproduced your situation with the latest CM, and it performs sensibly, even with the LookAt target change.

    What version of CM are you using?
     
    Last edited: May 28, 2018
  6. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    I chatted with adam via email hoping to get some info on this and he sent me the latest version with the hints. I tried them too, no go : (

    when I recreate a simple setup like this with it all pre-made before the scene begins I can also get the blending to work correctly. Is there a way you could look at whats causing my stuff to behave so incorrectly? I instantiate things at run-time and i dynamically switch cinemachine blends at runtime, but I cant think of anything else im doing out of the ordinary.
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    If you would make me a little demo project showing the problem I'd be happy to take a look at it.
     
  8. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    will do!
     
  9. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hey @mradfo21 how did this go? Would love to get you sorted out
     
  10. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    still no luck with this! I've got a few things I want to narrow down before I submit the entire project to you guys. Will keep you updated! Thanks so much for following up!
     
    Adam_Myhill likes this.
  11. mite51

    mite51

    Joined:
    Jun 25, 2015
    Posts:
    23
    Having very similar problems. My cameras orientation for camera A and camera B are exactly the same, but the blend insists on rotating toward the target position while blending. Don't try to blend targets, just blend the camera positions and rotations. The hints don't seem to do anything at all and there is not way to implement a custom blend class.
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    The single biggest hint for rotation blending is the LookAt target. If that is set, then CM assumes that you care about looking at that thing, and will take it into account. If you want a pure rotation blend, set the LookAt target of one or the other vcams to null.