Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

What exactly does the Cinemachine shot really do?

Discussion in 'Cinemachine' started by mradfo21, Jul 13, 2018.

  1. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160
    So it's entirely possible I'm missing something but I cant see what the Cinemachine Shot does other than provide a cut instead of a blend. I was hoping I could use the Cinemachine Shot to control the blend length in and out of the cut OR cut if I wanted to. But all I can ever get it to do is cut.

    You can see in the provided video if I don't use the Cinemachine Shot, and just turn it on and off then I get a blend. But since Cinemachine handles blending very poorly you can only have one global blend setting (everything is spawned dynamically so I cannot slot in a prefab to the blend settings in the Cinemachine Brain).

    Here's a video of me using the Cinemachine shot and then not. I'd like to be able to make my blends smoother and control how it works through the Cinemachine shot. Except I dont see any way to even blend with CM shot. Is this possible somehow?

     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,319
    CinemachineShot is an activation track. It activates the associated vcam in the brain associated with the track. If you overlap the shot with another one, the vcams will blend, and the duration of the blend will correspond to the duration of the overlap. You can also blend between the shot vcam and the in-game (non-timeline) vcam - or the vcam in a shot on another CM track - by setting the ease-in and ease-out duration times on the clip. It gives you full control of the blending time. I don't understand why you're just getting cuts. It's not clear from your video, but did you bind the CM track to the main camera?
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,319
    About the CinemachineBrain Custom Blends asset. One thing you need to know is that the "from" and "to" cameras are name-based, and are not bound to any specific objects. So you can create a custom blend from "vcam1" to "vcam2", and this will take effect whenever you have a vcam named "vcam1" and then activate a vcam called "vcam2". These vcams can be instanced from prefabs, it will work so long as the object names are right.

    It's true that the inspector UI is a little misleading, presenting you dropdowns to choose from the vcams in the scene. Perhaps we should look into clarifying this. In the meantime you can easily fool it by creating a bunch of temporary vcams with the appropriate names, for the purpose of building the asset. If you then delete those vcams, the asset inspector UI won't recognize them any more so will show "(none)" in the vcam name, but the names will still be there under the hood, and will wake up if appropriately-named vcams are added to the scene.

    So have another look at the blending system, it's not as poor as you suggest :)
     
  4. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160

    Ok I think I understand how you were saying you can blend based on names. Yeah I think a little UI love there to allow a string based mode would make that very clear! Truthfully I was only fighting with CM shot to do exactly the workflow you described with the blend states.

    I think I see what your saying. I should make a cinemachine track for the dynamic main camera, fill in its vcam dynamically when the timeline starts (since who is to say which gameplay camera i'll be using), and then I can use the ease in and out to blend. I'll also try using the generic in and out curves on the Cinemachine Shot, though that didn't seem to work with no other clips to blend to and from. It'd be amazing if there wasn't another cinemachine shot if it would use the blending curves to go in and out of that clip. Maybe I made a mistake there aswell. I'll give it another look over!

    Thanks Gregoryl!
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,319
    If you have a single CM shot clip in your timeline and give it ease-in and ease-out times, it will indeed blend with whatever vcam was active in the background. Let's say you have vcam A active in your game, and then you initiate a timeline with a clip that has vcam B with an ease-in and ease-out on the clip. Your camera will blend from vcam A to vcam B, then back to vcam A when the clip ends. Is that what you're trying to do?
     
  6. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160
    It is...

    Hm I must have screwed up setting the easing curves correctly then. Duuuurp. I'll take a look end of the week to confirm. Cause yeah, that's sounds exactly like what I'm going for!
     
  7. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160
    upload_2018-7-18_12-13-47.png

    though i went and re-watched my repro video and aren't those the easing curves I have set? yet it cuts?
     
  8. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160
    yeah cause on the CM shot clip i have:

    upload_2018-7-18_12-15-5.png
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,319
    Yes it looks correct. It makes no sense that it cuts.
    Can you try to make a new timeline asset from scratch?
    Make sure you bind the CM track to the main camera with the brain.
     
  10. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    160
    Any insight into if CM is going to get some kind of tagging system to use it in more dynamic games like this?

    it'd be great to let CM shot find brains automatically based on name or... tag .. or something. the same for the bound VCAM
     
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,319
    Actually that's a general timeline question: how do you bind the asset references to scene objects? In that respect, CM objects are no different from any other, and if you want dynamic binding we leave it up to you to manage in your own way with your own scripts.