Search Unity

"Bake" scene dynamics into the Timeline.

Discussion in 'Cinemachine' started by username132323232, Feb 19, 2018.

  1. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    This is not a Cinemachine question per se, but I think it's pretty relevant. Suppose I want to create a 5-minute long cutscene with several NPCs driven by AI. There are about 15 CM cameras. Let's say I want to get a nice-looking shot at 3 minutes. So every time I do that, I need to wait 3 minutes for the scene to get to that state.

    What I'm looking for is a way to "bake" the scene dynamics into the Timeline so that it would be possible to scrub through it just like a video file. I'm guessing that this is not yet possible, but I wonder if you guys have any suggestions as to how to better handle this situation.

    PS. I did try GameObjectRecorder(). It "kinda" worked, but not very well, probably because of the large number and the complexity of all the animations that I have in the scene.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,720
    You might be out of luck here. If your scene has non-deterministic stuff in it (I don't know what your NPC AI is doing...) then there really is no way. Within the CM cameras, the damping is not scrubbable, because it is based on what was happening on the previous frame which can be in the future if you're scrubbing backwards. The only thing I can suggest is that you break up the long scene into a few short ones, with transitions in between.
     
    username132323232 likes this.
  3. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    @username123432 We are working on doing Animation bakes into Timeline tracks. This allows you to bake down anything which is animated into Unity (I think anything with keyfames or state changes) onto a Timeline track

    So yes, you will be able to do this, it's coming to the Recorder framework on the Asset Store.

    Cinemachine cameras with damping / noise will become standard cameras with keyframes on any frame, becoming non-CM regular cameras which play the same every time.

    Huge scenes may need to be baked down in sections. We'll be announcing this feature at GDC this year.
     
    username132323232 likes this.
  4. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thanks guys for clearing this up! I posted my question without much hope because I can imagine how difficult this would be to implement. But I guess nothing is too hard for the Cinemachine team :) Can't wait to try this feature!
     
  5. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    I'll send your props to the Animation, Timeline and DCC teams! They're the dirty wizards behind this one.
     
  6. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    :) ): They sure are :)

    But seriously, the baking feature would be insanely awesome.
     
  7. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Hi Adam! Watched your GDC presentation (youtube). Didn't hear about the baking feature. Did I miss it? BTW, the storyboard feature looks fantastic :)
     
  8. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    Hey @username132323232 I didn't talk about the camera baking but it works! That's something we'll talk about for Unite Europe. Videos coming very soon. It works great. I'll share ASAP here.
     
  9. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thank you Adam! Sounds good. BTW, that video (the one with 4 friends) that you showed during the GDC talk looks interesting. I wonder how it was created? Any chance you used camera baking for it?
     
  10. Adam_Myhill

    Adam_Myhill

    Joined:
    Dec 22, 2016
    Posts:
    342
    I didn't use camera baking on any of that. We have a whole sequence with tons of cameras but no baking - as we don't need it to go anywhere 'after', it's entirely living in Unity.
     
    username132323232 likes this.