Search Unity

Cinemachine & Timeline Soft Blend between 3 virtual cameras

Discussion in 'Cinemachine' started by LarsBlack, Nov 30, 2019.

  1. LarsBlack

    LarsBlack

    Joined:
    Aug 3, 2018
    Posts:
    6
    Dear devs,

    I'm trying to implement a blend between 3 cameras in cinemachine with a cinemachine track in the timeline.
    Im developing a car race prototype and my idea is to get some practice with cinemachine making all the car cameras with this asset.
    I need this blend in order to move from the back (first virtual camera) of the car to the front (third vcamera) but going through a car side (second vcamera).
    All three cameras have the body set to Transposer and the BindingMode set to "Lock to target with world up" so I've been forced to use the timpline because I'm unable to rotate the vcameras through code.
    I need this transition as smooth as posible, and what I get at the moment is a somooth transition to camera1 to camera2 but from camera2 to camera3 an obvious cut.
    I tried modifying the Blend Curves of each camera but I didn't get any successful result.
    Does anybody know what should I do?
    Thanks in advance!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Maybe you can show a short clip of what you have? It's difficult with only words to understand what you want.
     
  3. LarsBlack

    LarsBlack

    Joined:
    Aug 3, 2018
    Posts:
    6
    Srry,
    As you can see in the attached gif I show the config from the three virtual cameras and the behaviour thath I'm having right now. What I'm looking right now is to have a smooth transition between the 3 cameras.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Thank you, that's helpful.

    It seems to me that you don't need the middle vcam. Just use 2 vcams, and with Spherical Position set in the transitions you should get a nice smooth blend.

    You can do this without timeline simply by activating the second vcam from code, and allowing the brain to make the blend for you.
     
  5. LarsBlack

    LarsBlack

    Joined:
    Aug 3, 2018
    Posts:
    6
    That works fantastic for what I was looking for, thank you very much!
    Do you know if setting the Transition> Blend Hint to Cylindrical Position I can decide from which side will do the rotation?
    As you can see on the video attached the camara is always moving for the left side of the car.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    The blend will take the shortest path, so if you put the vcam a little to the right of center the blend will go that way.
     
  7. LarsBlack

    LarsBlack

    Joined:
    Aug 3, 2018
    Posts:
    6
    Nice, thanks!
    I asume then that trying to blend three cameras in order to get the effect that I achieved now with your method is something impossible?
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    I wouldn't say impossible but it would be tricky to get the blend curves right.

    An alternative might be to use an orbital transposer in the vcam Body section, with the Input Name set to blank (i.e. no user input), and animate the bias from one side to the other, in whatever direction you like.
     
  9. LarsBlack

    LarsBlack

    Joined:
    Aug 3, 2018
    Posts:
    6
    Nice! Very interesting information, I will try to inplement this method on the replay system.
    Thank you so much for your help!

    Regards!