Search Unity

Cinemachine v2.0 release candidate

Discussion in 'Cinemachine' started by Adam_Myhill, May 11, 2017.

  1. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Here's a link to our release candidate for Cinemachine v2.0.

    It works with Unity 2017.1b4 +


    https://drive.google.com/drive/u/1/folders/0BxXa-EKSOUL9a20tU2lydDhYdVk

    There's an incredibly large list of new and improved features.

    NO DOCUMENTATION YET ! COMING VERY SOON

    • New open API, able to drive practically anything in Cinemachine by code
    • Collision component. Keeps cameras from getting stuck in the world. Preserves compositional intention
    • Improvements to free-look
    • Improvements to Orbital Transposer. New follow modes. Super easy to make great follow cameras.
    • New Cinemachine Cloud - the ability to call a Cloud shot and have it pick the best camera from all the child shots + priority + random. This feature is really quite powerful. Shot evaluation !
    • New Composer layout, the same functionality but with less controls, easier to animate in Timeline.
    • Smart update awareness. CM looks at how the target is animated and sets its own update method to best suit the target. If something is animated with fixed update, CM will adapt, if something is animated with late update, CM will adapt per shot. Differing types even blend together.
    • Post Process Stack support. Custom PostFX per shot including autofocus to drive the DOF plus and offset control you can animate for rack focus / human errror mistakes mojo
    • New SmartFOV feature. Ability to preserve the size of subjects on screen. IE cutting between head shots will keep the heads the same size on screen even if the characters or camera move
    • Everything CM animates in Timeline. Super east to do really complex shots with shifting composition, position and FOV. FAST FAST to use.
    • Spline based camera dolly ! Animate the camera position on the dolloy or have it 'auto follow' for gameplay / trough type scenarios (it even looks like a dolly track, we geeked out)
     
    Last edited: May 12, 2017
  2. texdata

    texdata

    Joined:
    May 23, 2013
    Posts:
    15
    Are there delegates for OnTimelinePlay, OnTimelineEnded or something similar to know when timeline ended?
    How can one change target object of a track with script ?
    Is there something like Event track or how can i trigger an event ?

    edit: sorry this is not correct thread, should ask this somewhere in timeline threads
     
  3. texdata

    texdata

    Joined:
    May 23, 2013
    Posts:
    15
    are there any samples how to use collision component ?
     
  4. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Not yet coming soon, we wanted to get into your hands ASAP.
     
    Alverik likes this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,012
    The examples seem to be the old ones. Tried to understand clouds: dropped in a custom blend containing a few virtual cameras all aiming at the cube, look at set to the cube, press play, moved the cube by hand so it moves closer to certain virtucams, nothing, the view still shows the same virtucam.

    The noise definition is an position and an orientation array, what do each element represent?

    Naming: in the inspector the component that does the cinemaching stuff is called Cinemachine Brain, when I add a component and type "Cine" there are no brain or camera, just post vfx. when i type brain brain shows up but when i add it it's now called cinemachine brain. You need to keep the component naming consistent to Cinemachine ***

    The blending between shots in Timeline works really well, you guys did some rotation magic in there! Only gripe is adding shots should be drag and drop.
     
    Alverik likes this.
  6. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Thanks @laurentlavigne, great feedback

    - Cloud cameras - the child cameras - need a Collider component on them. It does the shot evaluation work. Add a Cinemachine Collider component to all the Cloud's sub cameras.

    - Noise allows for multiple orientation or position layers and will combine them. Inside each is a frequency and amplitude per axis. By layering low, medium and high frequency functions, you can create pretty believable motion. There's some presets in there to get you started.

    - Agreed on consistent naming.

    - The blending math is pretty bananas. Try tracking something right overhead. No gimbal lock. GregoryL is a fine wizard. A lot of time has been spent on the blending math, you have no idea.

    - Drag and drop - we totally agree, it's being worked on by the Timeline team.
     
    Last edited: May 15, 2017
  7. conr4d

    conr4d

    Joined:
    Jan 31, 2014
    Posts:
    2

    Attached Files:

  8. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    415
    Unity changed some Playables API in 2017.1b4 and Cinemachine 2.0 uses the newest API aswell, if you want to test Cinemachine 2.0 you need at least Unity 2017.1b4.
     
    Alverik and Adam_Myhill like this.
  9. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    415
    You can download the newest beta here: https://unity3d.com/unity/beta
     
  10. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    333
    Congratulations!!!
    Cinemachine is a masterpiece. I use it all the time ;)
    The new features are insane! I need more time to capture the whole magnificence!
     
    Last edited: May 12, 2017
  11. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    29
    Cinemachine rocks - just starting using it and loving it.

    Main bit of feedback so far - any way to make simple pans across objects easier would be amazing! I tried all manner of composing modes, following paths, animating a look at target etc but all of those didn't work for various reasons. I understand it's a hard problem but with an object on a table, transitioning between two cameras looking straight down with just a difference on the x-axis, the camera rotated randomly and with the case of an animated lookat target, juddered.

    In the end I made two separate virtual cameras, pointed them in the desired direction, gave them a new post fx component and created a duplicate postprocessing asset with a fixed focal distance. Which is fine except the auto focus distance is really nice and means I can freely move my cams around without changing the post asset (plus not having to duplicate grading changes across both etc). Perhaps a Virtual Camera could have an override for the focal distance? A 'Focus On' transform separate from a 'Look At' might be nice except with a pan across, you'd have to animate the focus target which is a nuisance for such a simple move. Perhaps you folks can come up with a better solution?

    Please keep up the awesome work and apologies if any of the above didn't make sense or I missed an obvious solution!

    (Edited: Originally I thought there was a problem with activating a gameobject at the same time as crossfading cameras but I had mistakenly added a normal camera to said gameobject... dumbass :))
     
    Last edited: May 13, 2017
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    @conr4d The messages are coming from the Timeline integration portion of Cinemachine. Your version of Unity does not have Timeline support. To use Cinemachine with a non-timeline Unity, just delete (i.e. don't import) Cinemachine/Timeline.
     
  13. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    I think Adam made a brain-fart here. I believe he meant to say Add a Cinemachine/Collider component to the cloud's sub-cameras.

    Alternatively, if you don't need different settings for the different cloud children, you could add a single Collider to the cloud itself. It will apply to all the children.
     
    Alverik likes this.
  14. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,736
    Love it! I tried it without reading any documentation first and just fooled around a little to get a feel for it. I find it super intuitive to use so far. Two things I noticed immediately on my first test, though:
    1. Is there a way to also display dopesheet in the timeline instead of just the curves or is it supposed to work with an animation window open parallel to it?
    2. I found that particle system while they can be turned on and off super easy - they won't display the particles in the scene view. Is this by design or can this be enabled somewhere?
     
  15. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    Thanks for the feedback!

    I think your main problem is that you're trying to control down-looking cameras. Cinemachine is designed to mimic the behaviour of human camera operators, standing in a world where gravity points down. They use the down direction as input for interpreting the composition rules that you give them. To make a long story short: they don't like looking straight up or straight down. They will do it in passing, but if you want to have good control over how they do it, you will need to help them out.

    The easiest way to do that is to redefine the Down direction for them. This should be perpendicular to the direction in which they will normally, on average, be looking. If you look at the inspector for CinemachineBrain, you will find a WorldUp field. Point that to a game object in your scene, and the virtual cameras will use that object's Up vector as their world Up. Choose an appropriate up, and I think you will find that your camera moves work better in your environment.

    Once you have defined a good Up, your pan can be accomplished either by animating a lookAt target, or by animating the composer's settings on the vcam (animate the screen X field). You can do a dolly (changing the vcam's X pos) either by animating the vcam's position, or by having it follow an animated object. Alternatively, using the new Dolly vcam body controller, you can dolly along a CinemachinePath that you have built.

    Blending between different statically-positioned vcams is also an option for a camera move.

    Judder should never happen. I'd like to know more about what you did to produce it.

    Thanks again for your valuable feedback, we really appreciate it.
     
    Alverik likes this.
  16. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Yes, jetlag typo. Corrected above.
     
    Alverik likes this.
  17. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    113
    For some reason, the viewport rect of the main camera is always visible in my scene view after I add my first Cinemachine virtual camera to a scene. Is there a way to disable this? I find it distracting, to say the least.

    Thanks!
     
  18. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    There is no way in the UI, but you can disable it by modifying the CinemachineBrainEditor script. Look there for "DrawFrustum" and comment it out.
     
    Alverik likes this.
  19. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    113
    That's awesome. Thanks!
     
  20. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    62
    Hi:

    I am current exprimenting timeline & cinemachine on 2017 beta and working on cutscene with Slate in 5.6.
    There is a "animate on path feature" that can keyframe the object's position on designated path, with this feature the user can assign a path to camera, and control it's movement on path in the cutscene. But with timeline and cinemachine dolly track I have not find away to control the position of virtual camera on the track. Is there a way to achieve the same "animate on path" function?
     
  21. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Alverik likes this.
  22. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    62
  23. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    I got your emails. I'll respond shortly!
     
  24. GouDZ

    GouDZ

    Joined:
    May 17, 2017
    Posts:
    3
    Is it possible to run Cinemachine 2.0 on 2017.1.0 Beta 5?

    *Auto answer... just try it and yes :)
     
    Last edited: May 17, 2017
    Adam_Myhill likes this.
  25. caosdoar

    caosdoar

    Joined:
    Oct 29, 2016
    Posts:
    26
    @Adam_Myhill is there any plan for PostFX profile blending?
     
  26. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Yes there is. We are working with the Post Processing team to make this happen. Only float values will blend - which is most stuff - but things like the DOF kernal size won't blend from 'small' to 'medium' or whatever obviously, they'll pop at the start of the transition.

    That will be around 2017.2 - officially. Good chance we'll have something working before then since it's not that difficult.
     
    laurentlavigne and Alverik like this.
  27. caosdoar

    caosdoar

    Joined:
    Oct 29, 2016
    Posts:
    26
    Great! I was thinking about hacking it myself buy I thought it will worth asking.
    Thank you!
     
  28. Emiles

    Emiles

    Joined:
    Jan 22, 2014
    Posts:
    32
    Do you have any advice on how to get cameras to crossfade? Is this something thats already available or in the pipeline?
     
  29. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Crossfade, like a dissolve?
    That's actually a big challenge because you need to render both cameras and combine them. Your framrate would drop to less than half of what it currently is

    We are looking into supporting this but it would be more for VFX pipelines as the game would probably not run at a decent framerate unless the scene you're drawing is really basic.
     
    Skyfly likes this.
  30. ESludden

    ESludden

    Joined:
    Aug 27, 2012
    Posts:
    9
    I understand that the Documentation is on its way, but I was wondering if there will be instructions on how to properly set up the Orbital Camera?. I've been playing with Cinemachine all week and its very impressive. I can see it being implemented in our project very soon.
     
  31. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    89
    does it work with 5.6.1 or juz 2017?
     
  32. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    415
    2017.1b4+
     
  33. Emiles

    Emiles

    Joined:
    Jan 22, 2014
    Posts:
    32
    Thanks, and yeah, its reasonably complex. I might get away with a fade to black, then cut, then fade up. Rather than a dissolve. So essentially a soft cut.
     
    Adam_Myhill likes this.
  34. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    97
    I'm getting some strange camera behaviour when pointing (lookAt) a virtual camera at a character's head, when it has a Nav Mesh Agent component. It looks like I'm seeing double or something, and it doesn't show on a screen shot. If I remove the Nav Mesh i works.

    I believe this should be easy to reproduce, but if not, I can provide an example.

    I'm using Unity 2017.1.0b7 and Cinemachine-2-b8-2017-05-09. This also occurred in 2017.0b6.
     
  35. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    Thanks for the feedback. Could you upload a simple project that illustrates this problem? Thanks.
     
  36. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    97
    I just figured out what was wrong, and it had nothing to do with Cinemachine. I had added both a Rigidbody and a Nav Mesh Agent, so they were working against each other. Sorry about the mixup.

    I love working with cameras after i started using Cinemachine! Keep up the good work!
     
    Adam_Myhill, GouDZ and Alverik like this.
  37. FunkyFancy

    FunkyFancy

    Joined:
    Nov 23, 2016
    Posts:
    9
    Hey :)
    I'm using Cinemachine-2-b8-2017-05-09 with Unity 2017.1.0b5 and have problems with blending between to virtual cameras. It seems that the blending time doesn't effect anything and the blend depends on my framerate. Is it possible do get a realy fixed blendtime no matter the fps?
    My framerate changes between 140 and 30 depending on some renderings.

    btw cinemachine is realy awesome!! :)
     
  38. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    @FunkyFancy Thanks for the feedback! In the current implementation, the blend time is indeed framerate-dependent, and there is no official way to modify that. Let me look into it and get back to you.
     
  39. Cedric-Bidaud

    Cedric-Bidaud

    Joined:
    Jan 5, 2016
    Posts:
    1
    Hi !
    First of all, thank you for letting us play with this tool, it's really impressive !

    We've come across a weird issue. On a simple Cinemachine Virtual Camera, if we change the name of the GameObject linked in LookAt field at runtime (same with Follow), the object reference is then lost when exiting play mode.
    My guess is it has something to do with the SaveDuringPlay magic which occurs when you quit play mode.

    We're using Unity 2017.1.0b8 with the latest Cinemachine 2.0 package.

    Keep up the good work, it's really really cool :)
     
    Last edited: Jun 6, 2017
  40. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    @FunkyFancy Good news: we have a fix. Blend time will be constant. The fix will be in the next beta, coming soon, keep your eyes peeled. Thanks again for the great feedback!
     
    FunkyFancy likes this.
  41. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    Yes, that's a side-effect of SaveDuringPlay. If it's really getting in your way, you can always turn off SaveDuringPlay (it's just a stopgap anyway, waiting for Unity to support SaveDuringPlay natively).
     
  42. LordMortis

    LordMortis

    Joined:
    Jan 25, 2014
    Posts:
    23
    I haven't tried the 2017.1 version (but all the above stuff looks awesome!) but I had a question about having multiple cameras?

    If we're doing a game that does split screen multiplayer, and each player gets their own follow camera - will that work?
     
  43. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    @LordMortis Great question!

    Yes you can set this up with Cinemachine 2.0. Make 2 Unity Cameras, give each one its own CinemachineBrain, and set up their viewports.

    Now make 2 virtual cameras to follow the players. Assign those virtual cameras to different layers. I'll call them layer A and layer B. Go back to the two Unity cameras, and set their culling masks so that one camera sees layer A but not layer B, and the other camera does the opposite. And there you go. Camera A will be driven by virtual cameras on layer A, and camera B will be driven by virtual cameras on layer B. They will do their blending etc independently.

    Add as many layers as you like.
     
    Alverik likes this.
  44. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    99
    Can you explain the collision component parameters ajustments?

    I am using it with a camera following Surfer on a surf wave and I don't want the camera to go into the water.
     
  45. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,507
    Here is a section from the (still unreleased) documentation:

    CinemachineCollider

    An add-on module for CinemachineVirtualCamera that post-processes the final position of the virtual camera. Based on the supplied settings, the CinemachineCollider will attempt to preserve the line of sight with the compositional target of the Virtual Camera and/or keep a certain distance away from objects around the Virtual Camera.

    Settings

    • Collide Against: The Unity layer mask which the collider will raycast against.
    • Preserve Line Of Sight: When enabled, will move the camera in front of anything which intersects the Line of Sight feeler.
    • Line Of Sight Feeler Distance: The raycast distance to test for when checking if the line of sight to this camera’s target is clear. If the distance is 0 or less, then the current distance to target will be used.
    • Minimum Distance From Target: Never get closer to the target than this.
    • Minimum Distance From Camera: Ignore obstacles that are closer to the camera than this.
    • Use Curb Feelers: When enabled, will push the camera away from any object touching a curb feeler.
    • Curb Feeler Distance: The raycast distance used to check if the camera is colliding against objects in the world.
    • Curb Resistance: The firmness with which the collider will push back against any object.
    • Position Smoothing: The strength of the jitter reduction for position. Higher numbers smooth more but reduce performance and introduce lag.
    • Optimal Target Distance: If greater than zero, a higher score will be given to shots when the target is closer to this distance. Set this to zero to disable this feature.
     
    yc960 and Corvwyn like this.
  46. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    99
    Thanks Gregoryl. Making now the ajustments.
     
    Last edited: Jun 15, 2017
  47. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    519
    any chance for video tutorial ?
     
  48. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    325
    Blackbird, yes. We're filming one today in fact. I'll let you know when it's out
     
    Gametyme, Alverik, blackbird and 2 others like this.
  49. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    519
    thank you very much !
     
  50. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    43
    Hey, thanks for the great update!

    I got a question regarding camera dolly tracks though. Would it be possible to have branches at certain points within the track? Or have the camera transition from one track to another programatically?

    The game is from a 2.5D perspective, but we allow a small amount of room where the player can walk into the "depth" with optional paths along the side.

    We currently use a simple custom solution that works fine, but the fine grained control of the new spline-based tracks really amaze me.
     
    Alverik likes this.