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

New Cinemachine v1.5

Discussion in 'Cinemachine' started by Adam_Myhill, Mar 5, 2017.

  1. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Big news about the new Cinemachine v1.5 + strategy

    We have made A LOT of improvements and changes since January 1, 2017

    After some testing by you fine folks, we will be updating the free version on the Asset Store with a new v1.5 version.

    Cinemachine v1.5 +Timeline +postFX integration (.unitypackage) [beta]

    It is almost completely good news with one exception: Previous versions of CM, like the one on the asset store, is not compatible with this new v1.5. You'll have to make new v1.5 cameras and reinstall. It looks like deleting your existing Cinemachine folder then installing this new one is the cleanest method.

    We cannot confirm backwards compatibility with this beta or even in between beta updates

    We really wish that the new version could play nice with the old but it wasn't possible for a few reasons which we could not get around.​

    The priority system had to change to match other Unity priority systems (postFX) where bigger numbers are higher priority. We also further componentized the CM architecture to be 'future proof' so we never have to break previous versions again.

    Originally CM was an external system. Now that it's a part of Unity some substantial changes - and improvements! - had to be done in order to make it 'the Unity way'.

    That said, there's an incredible amount of improvement and we can't wait to see what you do with this new far more powerful CM.

    Here's the list of updates. There is so much good stuff!
    • We are no longer going to have 'Base Rig' and 'Game Rig', it will just be 'Cinemachine' with all the components as we test and move them over. So far we have moved FreeLook, Collider and Cloud over to the new Cinemachine v1.5

    • Removed CM "Autogen" singleton which gets created. Now, a component on the main camera called 'Cinemachine Brain' gets added when you initialize CM

    • Each Unity camera in the scene can have its own brain, to which vcams connect.

    • Brains can cull vcams based on layer. This allows support for split screens!

    • Various editor refresh issues have been fixed.

    • Removed confusing "Auto-add to priority queue" checkbox.

    • Removed confusing duplicate “offset” animatable fields. All fields are now animatable.

    • Timeline integration - any vcam can appear on a timeline, and all vcam properties can be animated. No asset files to manage.

    • Multiple timeline tracks are supported: higher-priority tracks override lower-priority ones. Inter-track blending and blending with non-timeline cameras is supported: smoothly blend between game and cut-scenes.

    • No asset files to manage for composer and transposer. 'It just works'

    • Changes made to vcams during play mode are propagated to the scene when play mode is exited.

    • Can change the priority of an active vcam.

    • Simplified and streamlined vcam UI, with Aim/Body/Noise sections. Lens to come.

    • Extensible vcam component pipeline architecture, with the possibility of user-creatable options in the various sections. This includes inspector UI that will self-discover user-authored pipeline components.

    • Vcams children can be wholly-owned by other vcams, giving the ability to craft complex camera behaviours, which are exposed to the brain as a single vcam. SDC, Cloud, and FreeLook are examples of this.

    • Collider is now part of standard Cinemachine.

    • Added concepts of ReferenceUp and ReferenceLookAt to camera state.

    • Implemented agnostic camera blending. Cameras can be blended without specific high-level knowledge of composer settings.

    • Refactored composer logic - now it can handle gimbal-lock situations gracefully.

    • Component copy/paste/reset and Undo are all handled gracefully.

    • New OrbitalTransposer option for vcam body. Use it to make a follow cam.

    • HardConstraint option available for both Body and Aim.

    • Blender can blend orientations gracefully, even when LookAt target changes.

    • Blends can be nested (i.e. blend the result of a blend). This can come up when there are multiple timeline tracks.

    • More than 2 cameras can be blended.

    • FreeLook is now part of standard Cinemachine.

    • FreeLook can have independent LookAt, Follow, and Lens settings for the 3 rigs.

    • FreeLook: smoother transition between top and bottom segments.

    • FreeLook: Velocity and PositionDelta options are working.

    • New StateDrivenCamera. Drive vcams by mapping them to animation states. This is a major feature.

    • New UI for blend curves: set the time, and choose from the preset curve shapes.

    • Draggable composer screen guides.

    • Composer screen guides are grey if looking at an inactive camera.

    • Added current camera and blend display in brain inspector.

    • Added efficient onscreen in-game display of current camera and blends. No need for fullblown debugger.

    • Added camera status display (active/inactive) in vcam inspector.

    • Added Solo button to vcam inspector, which forces the camera to become active while its inspector is up. Indispensable for tuning.

    • Priority meaning is inverted (higher number means higher priority) to be consistent with the rest of Unity.

    • Plays nicely with PostProcessing module. Resets TAA etc when camera cuts.

    • Each vcam can have its own postprocessing effects settings.

    • Brain invokes Camera Cut and Camera Activated events, to which anyone can listen.

    • Camera state includes ShotQuality assessment (WIP) this is for a very interesting upcoming feature....

    • Collider lowers the ShotQuality if it had to move the vcam, or if an obstacle is blocking view of the LookAt target

    • Cloud is now part of standard Cinemachine. Chooses vcam child based on ShotQuality.

    • Cloud has been re-implemented using the SDC model.

    • Cloud refresh problems have been fixed.

    • Added ActivateAfter and MinDuration settings to cloud, to reduce hysteresis.

    • Cloud manages its own blend environment (same as StateDrivenCamera).


    Cinemachine TODO


    • User Manual is outdated and is being updated

    • Code documentation

    • Repackage and put on github - opensource, like PostProcessing

    • Test builds on all platforms

    • Test in split-screen environment.

    • Better UI for Noise module

    • SaveDuringPlay: add ability to save non-transform references (e.g. SDC mappings)

    • Brain needs to check for deleted vcams (edge cases in editor)

    • Improved collider filter, to help reduce jitter

    • Vcam damping

    • Reactor or Andre’s Blackboard/Tags/Query concept

    • Composer II - center/size interface, rounded corners? Allow hard guides to be offscreen

    • Ability to target a group of objects, keeping all in frame

    • Ability to specify the size of a target (keep it all in frame, not just a point)

    • Follow-focus

    • Smart camera navigation

    • More sophisticated shot-quality assessment

    • E-sports console..... (this is very exciting....)
     
    Last edited: Mar 9, 2017
  2. wahyuway

    wahyuway

    Joined:
    Oct 7, 2013
    Posts:
    84
    Hi, i am impress about new features after watching unity keynote at GDC 2017. And i want to try it myself.
    Just downloaded the package above but i have an 30 error about post fx and timeline. Deleted the postfx and timeline fix the error.
     
  3. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hi @wahyuway If you're not using 5.6 or the new postfx plugin, yes you'll need to delete those scripts when installing v1.5 of Cinemachine. Checkout the READ ME doc in the Cinemachine folder which says to do exactly that.

    Is it working ok if you do that?
     
  4. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    Sounds awesome. Before I test, is it worth making a note of my current camera settings to re-enter in the new version or is that effected by the compatibility changes?
     
  5. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    @DominoM yes, make a note. You'll need to make your new CM 1.5 cameras. We are looking at an upgrade script but for now you'll have to remake new cameras. It's worth it for all the new features. Unfortunately we couldn't make it retroactively support your old cameras for a number of reasons.
     
  6. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    @Adam_Myhill
    No problem. Before this announcement I was expecting to have to redo it to change over to the game rig anyway.

    I'm working on a character controller and am using cinemachine as a very nice follow camera on my prototyping scene. I spent about 15 minutes tweaking it when I first set it up and haven't needed to touch it since.

    Edit: I'm going to copy paste that for my review :)
     
    Adam_Myhill likes this.
  7. wahyuway

    wahyuway

    Joined:
    Oct 7, 2013
    Posts:
    84
    Opps my bad, i am still on 5.5.2
    Ok then, i ll try to download 5.6 today.
     
  8. Lightning-Zordon

    Lightning-Zordon

    Joined:
    May 13, 2014
    Posts:
    47
    Love the asset, but..

    Can I ask why so many of the classes are marked as internal sealed classes? Or why so many useful methods are private? It's a great asset used from the editor, but horrendous if you want to use it from code.
     
  9. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
  10. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
    I just got the new 1.5 plugin running. How would you suggest doing an indoor follow camera, I want to have the camera follow a character that is moving, but not get cut off by walls.

    Sort of like if there were a cross of reference points around the camera all raycasting, and when the main camera gets cut off, it adjusts the camera so the main object is in scene. and it raycasts behind, and to the sides of the camera, to make sure it stays in the same room. I don't have the time to try and implement something like that, and was hoping part of your package could handle something like that.

    Thanks for the great work so far, keep it up :)
     
  11. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hi @wirelessdreamer. I'd start out by making a FreeLook camera and giving the Recenter heading checkbox a tick so the camera will follow behind the character. You can do this based on the characters positional delta, the velocity or the angle. Disable the inputs if you don't want to let the user have control.

    As for collisions, add a 'Cinemachine Collider' component to that camera and it will keep itself out of walls. The numbers are really touchy right now and the collider can freak out / vibrate in certain scenarios - we're working on it.

    That should have you covered. Don't forget that you can easily blend between different Freelook cameras, or any cameras, based on trigger volumes or animations. The State Driven Camera is the new system to trigger cameras from any animation event. Super powerful !
     
    Last edited: Mar 6, 2017
    Alverik likes this.
  12. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
  13. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
    wow, it just worked in less then 5 minutes. thanks a ton.
     
  14. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    I love to hear that. Once you get familiar with things it's easy to throw down dozens - hundreds - of cameras into your project so you can make it do exactly what you want under any situation...... without writing any code.

    Glad it worked out!
     
  15. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
  16. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
    I'm doing it in 5.5, just removed the scripts that threw errors
     
    pixelsteam likes this.
  17. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Technically it should go back to 5.4 but we haven't tested all the versions just yet. As wirelessdreamer says, 5.5 is fine after yanking a few things. We'll clean all that up.
     
  18. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    Hello! Everyone & @Adam_Myhill

    I use Cinemachine FreeLook with my own X,Y Axis preferences and every time when i run the game (in-editor) and leave the values are not the same as before, Is there any way to fix it?
     
  19. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hi @JacobSmaga !

    A great question and one which we're well aware of. To further explain for everyone, we're currently not storing the 'initialize' FreeLook settings. This can cause problems, let me explain:

    Let's say you have a default freelook which you'd like to start up right behind the player and at a certain height. After playing the game and using this freelook camera, it will remember where you left it - which is probably a different angle / height than how you initially set it.

    Now, the next time you run the game, that freelook camera starts based on where it was left, not on some desired initial setting. Almost always that looks.... bad !

    Our fix for this idea is to have a checkbox which says 'Initialize camera with these settings'. It's on our feature list and we'll get an update out shortly.
     
    Alverik and JakubSmaga like this.
  20. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    @Adam_Myhill Thank your for fast reply!

    Cinemachine is love, Cinemachine is life.
     
    Alverik and Adam_Myhill like this.
  21. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    I feel this needs to be on a t-shirt !
     
    wetcircuit, JakubSmaga and Alverik like this.
  22. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Please let us know when GITHUB repository is up. Thank you.
     
  23. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Hi!

    Could you provide some kind of example on how to do split screen?
     
  24. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    Hi,
    I was very excited with this new version, because the released one is amazing, but I can't get it working.
    I work on unity 5.5.1f1, so I removed the timeline and postFX parts, but still, scripts won't load. I get a bunch of :
    "FileNotFoundException: Could not load file or assembly 'Cinemachine, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies."

    Where am I wrong ?
     
    Last edited: Mar 10, 2017
  25. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
  26. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    As I mentioned, I removed postFX and Timeline scripts to correct all the errors related to those parts. But the error I'm talking about is not related to them and doesn't refer to any file in particular.
     
  27. wirelessdreamer

    wirelessdreamer

    Joined:
    Apr 13, 2016
    Posts:
    134
    Sorry, I missed that in your last post. Not sure on the cause of your issue.
     
  28. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    No problem. Thx for trying ;)
     
  29. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Same error as @dba999 here, using 5.5.2f1.
     
  30. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    Not wrong. The package was made with a newer version of Unity.
    To use in a pre-5.6 version of Unity, adjust the Cinemachine DLL import settings, as shown here:

    scratch.png
     
    Last edited: Mar 10, 2017
    Alverik likes this.
  31. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    :D many thanks Gregoryl. I had no idea that dll could have import settings. Good to know :) Everything seems ok now.
     
  32. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    It's me again (sorry :oops: )

    Using the documentation I managed to access internal settings of previous cinemachine 1.1
    This new version seems wonderfull but now I have no idea how to do the same.

    For instance this is how I used to change a target and change offset settings in runtime :

    Code (JavaScript):
    1. import Cinemachine;
    2.  
    3. private var CMS :CinemachineVirtualCamera;
    4.  
    5. [...]
    6.  
    7. CMS = Camera.main.GetComponent.<CinemachineVirtualCamera>();
    8.  
    9. CMS.CameraComposerTarget = selectedObject.transform;
    10.  
    11. CMS.CameraTransposerTarget = selectedObject.transform;
    12.  
    13. CMS.TransposerTrackingOffset.y = 12;
    14.  
    15. Etc ...
    Now Unity won't even let me access the CinemachineVirtualCamera component attached to the camera. :(

    Is there a new way to do the same (access the Look At and the Follow target ) or is it now forbidden ?
     
    Last edited: Mar 10, 2017
  33. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    @vamky We have designed CM v1.5 to do split-screen but haven't yet tested it very much.

    You'd make two regular Unity cameras and set them to just draw on each side of the screen for each and then add a unique Cinemachine Brain for each one. Think of the Unity camera more as a render target - drawing just a subregion of the screen. Each unique brain on those cameras will allow you to do separate cameras for each side. It works in theory but we haven't put any time towards it just yet.

    As soon as I get to that round of testing I'll let you know. It's a brand-new set of capabilities so I would expect some issues, some of them outside of Cinemachine and more to do with how Unity handles multiple cameras - I know shadows will be a problem. We will get to addressing that stuff shortly.
     
    Alverik likes this.
  34. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    23
    Hey guys! First of all, thank you for the awesome system! We've just started to scratch it's surface...
    I have some issues with gameplay/follow cameras:
    1) I made some reference transforms with the vcam components, and change thru them by script, enabling and disabling the game objects. Working fine, but some times when I get back to a previous position, it's way far from intended position (they should be fixed, child inside player prefab). Am I doing something wrong?
    2) Tried freelook, but when enabled, BOOM! Game object goes far far away, like 100 meters. Also having this when I try Orbital Transpose with non-freelook script. Not necessary to my case, but might be useful for someone...
    And again, thank you!!
     
  35. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    @dba999 Yes everything has changed, but what you want is not forbidden :)
    We have not yet updated the user documentation (sorry about that) but it's coming soon.
    You can just do a GetComponent<CinemachineVirtualCamera>, as before.
    LookAt and Follow are now simple fields in the CinemachineVirtualCamera class, named m_LookAt and m_Follow. They are public.
    Access to Composer and Transposer is a little more complex, as the system now has a flexible pipeline architecture. We will add convenience methods for this soon. In the meantime, you can instance prefabs, and access their components via CinemachineVirtualCamera.GetComponentPipeline().
     
  36. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    Can you post the code that's giving you trouble?
     
  37. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    Thank you very much Gregoryl for your help.
    Sadly unity 5.5.1f1 doesn't accept anymore CinemachineVirtualCamera as a valid type.
    This is what I get :
    Code (JavaScript):
    1. BCE0018: The name 'CinemachineVirtualCamera' does not denote a valid type ('not found'). Did you mean 'Cinemachine.Assets.CinemachineBlenderSettings'?
    Do I miss something ?
     
  38. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Hi Gregory. Already did that, doesn't work.
    I am on Android target, maybe you didn't test on Android?

    EDIT
    Nope, it's not Android. Created a new project with Windows target, same error.
    Using 5.5.2f1
     
    Last edited: Mar 13, 2017
  39. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    No, you didn't miss anything, I did. On the released beta version, many things are indeed marked internal. I'm working off a newer version, where many more things are public. Thanks for bringing this up! You'll get access to the newer version soon.
     
    Lightning-Zordon likes this.
  40. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    Just tried it with 5.5.0f3. You have to uncheck the "exclude platforms" checkboxes, as follows:

    2017-03-13 08_02_40-Cinemachine - Microsoft Visual Studio.png
     
    Alverik likes this.
  41. dba999

    dba999

    Joined:
    Oct 3, 2014
    Posts:
    19
    Ok, then. Cinemachine deserves our patience ! :)
     
    Alverik likes this.
  42. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Thanks! I never noticed it was saying "exclude platform" when you click on "Any platform" checkbox. It wasn't like this in previous versions. It works now,thanks.
     
  43. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    23
    Hi Gregoryl!
    1)I just have stuff like
    Code (CSharp):
    1. if (Input.GetButtonDown("Fire2"))
    2.             aimPosition.SetActive(true);
    3. if (Input.GetButtonUp("Fire2"))
    4.             aimPosition.SetActive(false);
    Nothing fancy. But if I go back to this cam (or other 2 that I have) on a later time, it's offset, and each time I go into them again, they go farther. Thought it was the collider, but turned off and didn't change a thing.
    2)Tried resetting everything, and stopped it from going so far, but i need a setting like "Local Space Locked to Target", but Orbital Transposer of Free Look doesn't allow me. Will keep standard vcam with my own script on top for now...
     
  44. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    We never see any problems like the ones you describe. I suspect it's got something to do with the way you set up your vcams. I can't get a sense of it from the lines you sent. Could you post a small sample project that illustrates the problem?
     
  45. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    23
    Sure, I'll do it asap
     
  46. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    Hello everyone!

    Is there any way that Cinemachine will get (or if is there anyway to implement it myself) this camera "free" kinda editor mode?

    1:15

    It would really help people who want to take amazing screenshots in-build for their media stuff etc.

    Thank you, Jacob.
     
  47. PhilippJay

    PhilippJay

    Joined:
    Mar 14, 2017
    Posts:
    1
    Hi,
    I am aware that it's written in the FAQ that GameRig will be released soon, but for
    a current Project it would be really helpful if there would be a rough estimate for the release date of v1.5
    (nothing obligatory of Course), or if it is recommended to use the 1.5 beta and then migrate to the stable
    1.5 later? (it's a big project)

    Thanks a lot!
     
  48. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,623
    1. GameRig: Good News! There has been a change of plans since the FAQ was written. GameRig is gradually being absorbed into BaseRig. Instead of having a separate Cinemachine Base and a GameRig extention, there will only be one Cinemachine, with full functionality and user extensibility. As of this week, FreeLook, Collider, and Cloud have been imported into Cinemachine 1.5, and are available for use. Only Reactor remains, and we are actively working on having that become available this spring.
    2. Not-so-good news. The API is expected to change once again after the 1.5 beta, and back-compatibility is unlikely. You will likely need to rebuild your cameras manually when the stable version is released this spring.
     
  49. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Free Camera - yes, that's a fine bit of functionality. I built the NFS free camera a while back and know what you're looking for.

    Let me make one again in Cinemachine and I'll share the rig with you. In short, it's doable but it might need a little bit of code to handle the controller properly.

    Stay tuned
     
    crudeMe, Alverik and JakubSmaga like this.
  50. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    23
    Hey folks! Just managed to resolve my issue. The point is: when follow is used, I can't add the "self" transform to it. Explaining: I had my vcam scripts attached to not-so-empty GOs, and on the position I wanted the cameras to be. So on Follow transform, I referenced itself. But no! This way, sometimes when activating/deactivating/activating again the GO, it would change position or holding it entirely. Now I have Follow working by creating a really empty GO, keeping my vcam GO still and attaching the new one to Follow. Works like magic!
    Hope it helps somebody! ;)
     
    Adam_Myhill likes this.