Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

New Cinemachine v1.5

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

  1. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    198
    Thanks for your clarification.

    But since CM was created closely related to Cinema Director, my question would be better put this way:

    Is the new CM *still* compatible with Cinema Director?

    R.
     
    Alverik likes this.
  2. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    The first sequence ever used with Cinemachine was Cinema Director. Dan and his team were super helpful in getting everything working together.

    I no longer have the latest version of Cinema Director to test it with but will happily provide the guys at Cinema Suite the latest Cinemachine to test it with. I'll reach out to him.
     
    Rod-Galvao and Alverik like this.
  3. wayneh654

    wayneh654

    Joined:
    Nov 25, 2012
    Posts:
    11
    Hello.
    When one builds a Windows Store app using SDK Windows 10 you get a error that reads:
    UnityException:Failed to run serialization weaver with command "Temp\StagingArea\Data\Managed\Cinemachine.dll" .... and so on.

    Be good to sort this as my target device is Xbox One using Windows Store.

    Thanks in advanced, Wayne
     
  4. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    Hi @wayneh654, we are pretty sure this has been fixed. It will require you to move to CM v1.5 or ideally v2.0 when that comes out as it will be a full release future proof version.

    When is your ship date? Can you wait a couple of weeks for CM 2.0?
     
    Alverik likes this.
  5. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Hey, I was reading back through these posts and saw that version 2 will be bundled with the Post Effects stack and the Timeline. Will these be in separate folders that they can easily be deselected at import? The Post Effects stack is excellent, but I use five different Amplify products and therefore won't be using the stack feature (sadly, as they are incompatible). The same applies to the Timeline, not quite sure what it does, but I imagine it would only be used by a select few mostly for cut-scenes, so again doesn't need to be imported with the Cinemachine. Thanks.
     
  6. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    @jonfinlay Cinemachine 2.0 won't be packaged with either the postfx stack or Timeline. The PostFX stack will be on the Asset Store for a while and you'll need to install that and let Cinemachine know it's there.

    As for Timeline, it's built straight into 2017.1 - and it's a heck of a lot more than a cutscene tool - so I suggest maybe giving some of the example videos a look at because it's great for choreographing... anything.

    I helped do the lighting on a project with NASA and Blackbird Interactive and we used Timeline to animate the time of day, sky, all lighting and the fog - simply by blending Timeline clips together. It was a really neat non-cutscene use of Timeline which goes to show how versatile it is.

    https://venturebeat.com/2017/02/22/...s-vision-of-what-a-mars-base-would-look-like/
     
    jonfinlay and Alverik like this.
  7. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    Indeed, Timeline is most likely going to revolutionize Unity's workflow entirely. Many tasks that in the past used to be hard or impossible to accomplish, or which needed a lot of programming, will be a breeze, and in most case scenarios, with no coding at all.

    People must not be confused, Timeline allows you to build more than just interactive or non interactive cutscenes. You'll be able to give life to your levels and much, much more. Right now I'm just waiting for 2017.1 beta to get more stable to start introducing Timeline permanently into my workflow (will wait 2 or 3 weeks I think). Been testing the 5.6 beta build for a while though. People should take a look at the examples, they're pretty cool (though I noticed the dog example is outdated, gave me error warnings I had to fix before I could play it).

    I also can't wait for Cinemachine 2.0. I'm even delaying some personal projects just to wait for it, because I want to make sure it's central part of my workflow (will need to integrate it to some of my tools).

    By the way, Project eagle looks extremely cool. Wish it was an actual game. lol
     
    Adam_Myhill and jonfinlay like this.
  8. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Just checked out the video and I agree it looks wonderful, I could sure use that in my safari game (provided its quite straightforward to use, like Cinemachine is). Looking forward to seeing its release! My original question was mostly concerning the use of Amplify products with Cinemachine, but it appears from your comment that as long as the stack is in the project then it doesn't need to be used. Cheers.
     
    Alverik likes this.
  9. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    So many errors after upgrading to 2017.1 Beta 3 :eek:
     
  10. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    @JacobSmaga I know. It's not Cinemachine, it's coming from TImeline. We are on it now. It has to do with bringing old projects forward. I'll hopefully have an answer for you shortly.
     
    artofcode, Alverik and JakubSmaga like this.
  11. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Thank you for fast respond Adam! Also my another question: Is 'Initialize camera with these settings' checkbox coming in v1.x or 2.0 which is coming out within 2 weeks?

    Thank you, Jacob.
     
  12. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    69
    Hi Adam

    I hope each virtual camera can have more control over camera property. For example each virtual camera in the scene can have it's own culling mask setting, etc.
     
  13. artofcode

    artofcode

    Joined:
    Mar 18, 2013
    Posts:
    8
    I've quickly hacked the changes in to Cinemachine 1.5 to get it to "work" (more like compile) with Unity 2017.1.0b3. My changes can be found in this diff file here:

    http://cinemachine.artofcode.nl/cinemachine1.5-unity2017b-changes.patch

    Adjusted files:
    - CinemachineMixer.cs
    - CinemachineShot.cs
    - CinemachineTrack.cs

    It probably won't make Cinemachine work as you want it, but it gets rid of the errors and can be a starting point for someone else if they feel inclined to get it to work before Adam has a proper release ready for us.

    PS. I've also had to download the Post Processing Plugin from here:
    https://www.assetstore.unity3d.com/en/#!/content/83912
     
    Adam_Myhill and ArthurT like this.
  14. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    Hi all, thanks for your feedback on this.

    Nice work @artofcode !
    @vamky culling mask support. Great idea. Added to the list. They won't blend obviously so they'll pop as soon as a new camera starts. Sound alright?
    @JacobSmaga - what was this again? Could you please refresh my memory on this one - thanks.

    The changes in 2017.1b3 will break earlier Cinemachines. There were changes to how TImeline works and it had knock-ons, not just with CM....

    I would stay with 2017.1b2 for now as that was before the changes and when CM v2.0 comes out you'll be free to use any 2017.1b3+

    CM v2.0 won't be beta. It will be good to go for production. finally

    We have updated CM v2.0 to work with 2017.1b3+ BUT ! It's the new CM which has the totally open API and it's not backwards compatible with previous Cinemachines.

    I realize this is frustrating and we don't want to hide behind the 'This is Beta software, proceed with caution' thing needlessly. We truly want to share that we try to keep these upsets to an absolute minimum. That said, during development as all of you know, many different areas are shifting and configuring and the glue doesn't set and hold until the end. It's not all in our (Cinemachine's) control. Imagine how big Unity is and how we have to get everyone, all the departments aligned. Non-trivial.

    Your project should go into 2017.1x just fine. When you get CM v2.0 you'll have to start clean with your cameras. If you do this and you're ever in Montreal I'll buy you a beer. I'm going to wait about a week though until you see what you can do with CM v2.0 and then you'll buy me (and GregoryL!) a beer.
     
    JakubSmaga and Alverik like this.
  15. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    I'm talking about this
     
  16. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    AH yes we fixed that a while ago. Do you have the latest v1.5? if not it's fixed in 2.0
     
  17. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Yeah i have v1.5 and it's still not fixed
     
  18. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    44
    Any chance of a version of Cinemachine which works with 2017.1b2/b3? I've tried both the Asset Store version and 1.5 which was linked in this thread to no avail. Both Cinemachine versions in b2+ give "MissingMethodException: Method not found: 'UnityEngine.Texture2D.LoadImage'." errors in "Cinemachine.Editor.CinemachineSettings..cctor". Apparently this API's been deprecated, I guess as of b2. On import (and reimport), the assembly updater fails to update the CinemachineEditor dll. Was excited to try this but can't spend any more time downloading, swiching and reimporting between different betas.
     
  19. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    @Jacob, v2 fixed that. I just checked and the fix came in at the first of the open API / v2.0 .

    @teutonicus, yes this is frustrating. See my note above about the challenges within the beta stage. Things happen outside of our control. Everything will be clear by official release - this is beta - so wait until then for all the bugs to be ironed out.

    I'm going to post the latest CM 2.0 for you guys here who are close to this because I'd love your feedback.

    There will be an official CM v2.0 post soon with all the features, etc., but here's a quick delivery for you guys because you've been so active here on the forum.

    Brief notes:
    • It will work with 2017.1b3+
    • It IS NOT backward compatible with any other version of Cinemachine
    • It figures out if you have the Post Processing Stack installed or not (get it though, it's amazing)
    • Delete your existing CM folder and then install CM v2.0.
    • See if you can find all the new features :)
    https://drive.google.com/drive/u/1/folders/0BxXa-EKSOUL9a20tU2lydDhYdVk
     
    conro, dba999, teutonicus and 5 others like this.
  20. artofcode

    artofcode

    Joined:
    Mar 18, 2013
    Posts:
    8
    Nice, thank you very much!
     
  21. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    Wasn't planning to download Unity 2017.1 for a little longer, but what the hell :)
     
  22. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    @Alverik Check it out. There's still a few wrinkles to work out for sure but it has a lot of goodness in there. Future updates once you're in the 2017.1x zone should go smoothly. 2017.1b4 should be out next week
     
    Alverik likes this.
  23. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Cinemachine 2.0 only for us... Christmas day is too early this year.



    Cinemachine is love, Cinemachine is life.
     
    Alverik and Adam_Myhill like this.
  24. Airlight

    Airlight

    Joined:
    Apr 21, 2017
    Posts:
    1
    This is so timely. It goes straight into the demo of the new AR app that we are building in the next two days. It's a hackaton :)

    Thank you so much, Adam
     
    Alverik and Adam_Myhill like this.
  25. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    Hi, I was wondering, what's the proper way to get to the active camera's lookAt and Follow fields to assign them at runtime? The way I used to do it doesn't seem to work anymore in 2.0 (I was getting the active camera from the brain and then using fields like m_LooktAt... but they seem to be gone now).

    Anyway, any advice will be greatly appreciated.
     
  26. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    There's no proper way! There is only a Get, no Set. You have found a little hole in the API... I'll look into stopping that up. In the meantime, you can cast the ICinemachineCamera to one of the leaf classes that implement the field, e.g. CinemachineVirtualCamera, or CinemachineFreeLook, etc. Ugly, but only temporary.
     
    Alverik likes this.
  27. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    So the fix is in 2.0, but not in 1.5.
    However, don't look for a checkbox, because it's not there.
    The problem came about because Cinemachine's "hot-save" feature was saving the state of the axes in the freelook, so next time you used it, it would be how you left it rather than how you set it up. The fix was for hot-save to NOT save the axis states. No checkbox necessary.
     
    JakubSmaga and Alverik like this.
  28. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    @Alverik Don't bother with the hacky cast - already added the missing bit to the API. LookAt, Follow, and Priority all have get/set in ICinemachineCamera. Will post soon.
     
    Alverik likes this.
  29. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    Cool! Will wait with bated breath :)
     
  30. conro

    conro

    Joined:
    Mar 15, 2015
    Posts:
    6
    Excellent!:D I have previously posted about jitter on Rigidbody objects. I tried the beta version of 2017-5-4. In my project, the jitter problem is now perfectly fixed.
    As long as CinemaBrain's UpdateMethod is Fixed or Smart, even in tracking my airplane which consists of dozens of non-interpolated Rigidbody parts connected by joints, I will never see jitter.
    @Adam_Myhill @Gregoryl Thank you for taking the time to solve this problem:)
     
    Alverik likes this.
  31. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    @conro Glad it worked for you! My advice: keep the brain on SmartUpdate, and then you don't have to worry about how things are animated. It will do the right thing on a per-vcam basis, depending on whether the target is animated in FixedUpdate or in regular Update. You can even blend between vcams that are driven in different Update methods. How cool is that? :)
     
    conro and Alverik like this.
  32. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    @Gregoryl Hi. Any update about the Cinemachine version with the new Setters?
     
  33. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    @Alverik It's in the queue, waiting for @Adam_Myhill to upload. Should land within the next few hours.
     
    Alverik likes this.
  34. BinaryByron

    BinaryByron

    Joined:
    Sep 16, 2016
    Posts:
    6
    I'm machine a build error when trying to build for Windows 10 UWP any help would be much appreciated.

    Error: method `System.Reflection.Assembly System.Reflection.Assembly::GetExecutingAssembly()` doesn't exist in target framework. It is referenced from Cinemachine.dll at System.Void Cinemachine.Utility.CinemachineDebugLogger::.cctor().
    Error: method `System.Object[] System.Reflection.Assembly::GetCustomAttributes(System.Type,System.Boolean)` doesn't exist in target framework. It is referenced from Cinemachine.dll at System.Void Cinemachine.Utility.CinemachineDebugLogger::.cctor().
     
  35. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    artofcode, JakubSmaga and Alverik like this.
  36. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Thank you guys for making such a great camera system, So... Where can i get Cinemachine T-Shirt? :rolleyes:
     
    Alverik and Adam_Myhill like this.
  37. Adam_Myhill

    Adam_Myhill

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    332
    I'm going to make some! Stay tuned !
     
    Alverik and JakubSmaga like this.
  38. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Please also make some Hoodies! :cool:
     
    Adam_Myhill likes this.
  39. glumjamesbrown

    glumjamesbrown

    Joined:
    Aug 6, 2014
    Posts:
    1
    I have been evaluating moving to Cinemachine from our current camera implementation but wanted to ask where I can read which Cinemachine features will be supported in Unity 5.6 (or not); I am specifically interested in the Freelook and Collider modules (and multiple object tracking) which I think I have read are currently being rolled into Cinemachine 2.0 but I haven't read if Cinemachine 2.0 will work with 5.6, please can someone advise, thank you.
     
  40. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    Can you tell me what versions of Unity and Cinemachine you are using?
     
  41. artofcode

    artofcode

    Joined:
    Mar 18, 2013
    Posts:
    8
    Currently testing out the latest build from CM, and noticed that the cutscene never "quits" after starting it. Investigating the code led me to believe that the virtual cameras are never removed from the CinemachineCore.Instance.AllCameras list, which causes it to return one of those after the cutscene has finished playing. This results in the last virtual camera to be set as ActiveVirtualCamera -> TopCameraFromPriorityQueue and override the game camera in my case (through the PushStateToUnityCamera function).

    Is there a specific way of finishing a cutscene, some callback that I can hook into? I can add one, but I have a feeling I might have missed something that does exactly that.
     
  42. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    @artofcode Cinemachine will choose a virtual camera according to the following formula:
    1. The dominant Cinemachine Shot in an active Timeline. The shot may refer to enabled or disabled CinemachineVirtualCameras. Enabled status makes no difference here. Timeline always wins.
    2. If nothing found in 1, choose the highest-priority camera in the AllCameras list. All *enabled* CinemachineVirtual cameras are automatically added to this list.
    If you want the brain to *not* use a CinemachineVirtualCamera when your cutscene stops, then you must ensure that there are no enabled CinemachineVirtualCameras in your scene. Note that in such a situation, you won't be able to blend between your cutscene and your gameplay camera, unless you expose your gameplay camera to the Cinemachine system. One way to to that is to add a Cinemachine/ExternalCamera as a component to your non-CM gameplay camera. It is a passive component that is designed to enable blending. In that case, the brain will choose your non-CM external camera, which is what you want, I think.
     
    Alverik and artofcode like this.
  43. artofcode

    artofcode

    Joined:
    Mar 18, 2013
    Posts:
    8
    @Gregoryl Cheers, that does the trick.

    Still would be cool to have some callback when a cutscene is finished. I'm currently re-enabling player input by waiting for the duration of the playableAsset that I grab from the Director, but a general callback would be a bit cleaner I recon.
     
  44. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    There is a camera-activated event on the brain. You could hook into that and wait for your gameplay camera to become active. In that case your gameplay camera would need the ExternalCamera component in order to be recognized as a vcam.
     
    artofcode and Alverik like this.
  45. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,132
    @artofcode Even better, derive your own class from CinemachineExternalCamera, add it as a component to your non-CM camera, and override the following method:

    public virtual void OnTransitionFromCamera(ICinemachineCamera fromCam) {}
    In there, you could do whatever mojo you need to do in order to wake up your camera.
     
    artofcode and Alverik like this.
  46. artofcode

    artofcode

    Joined:
    Mar 18, 2013
    Posts:
    8
    Sounds good, I'll give it a shot!
     
  47. TomekCoduar

    TomekCoduar

    Joined:
    May 16, 2017
    Posts:
    22
    Hi there! First of all thanks for your amazing job, now to the point: went through a few tutorials already that somehow explained cinemachine and timeline but couldn't find any good way to handle events via script in Timeline. I mean the Playable Track and PlayableAsset/PlayableBehaviour. If there was some tutorial/explanation or demo scene and i missed it I apologize for spaming. I would be grateful for some help here. Any tutorial or explanation would be very helpful :)
    Thanks in advance.
    Thomas.
     
  48. Skyfly

    Skyfly

    Joined:
    Jan 25, 2014
    Posts:
    101
    You're doing great things here!
    I tried to import cm 2b8, 2b7 and 1.5 with unity 5.5.0p3 but it won' start. right after import I get these two (I unchecked timeline and postfx on import, currently CM 2b8 error output):
    "Assets/Cinemachine/Base/Editor/Editors/CinemachineComposerEditor.cs(140,36): error CS0117: `UnityEngine.Matrix4x4' does not contain a definition for `Translate'"
    and
    "Assets/Cinemachine/Base/Editor/Editors/CinemachineComposerEditor.cs(127,53): error CS1061: Type `UnityEngine.Camera' does not contain a definition for `activeTexture' and no extension method `activeTexture' of type `UnityEngine.Camera' could be found. Are you missing an assembly reference?"

    Any idea? I could really need the composer and cloud features :)
     
  49. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    I think they're new API just available in 5.6 or 2017.1... It would be nice to have a version which works on 5.5 though, since a few people can't change their version so often. I am currently testing it in 2017.1 though and it's sweet. lol
     
  50. Skyfly

    Skyfly

    Joined:
    Jan 25, 2014
    Posts:
    101
    Even 1.1 wont work here. It imports and doesnt throw an error, but it simply wont move the main cam, allthough I can see the tracking (red wireframe in scene view) moving with the composer target.