Search Unity

Will new Sequence package help me?

Discussion in 'Virtual Production' started by mishakozlov74, Jan 28, 2022.

  1. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    143
    Hi there!

    In order to do scene management in cutscenes I implemented some markers that can load, unload and bind scenes' objects on runtime.

    Like, you start a cutscene in one scene, then another loads, binds and the previous one unloads. After cutscene ends, gameplay keeps going.

    I see that Sequence package provides similar features, but I'm not sure it was designed for my use case.
    So, could somebody please elaborate upon it?
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    When I ask questions like "is it designed for X", the answer was often "we trying to make it generic so you can come up with crazy new ideas using it". My focus was on video creation, but I am sure the Unity team had cut scenes in mind as well.

    If you are talking about "Scene Activation", I was using it to have a "location scene" (all the buildings and static stuff that does not animate) in one Unity .scene, then the main "Sequence" could load and unload different scenes as required during a longer sequence. In the end however I am using a prefab (once I gave up on baked lighting) as I often did want to animate say a door swinging in a location scene. Animation tracks did not work across the scene boundaries.

    But I am not creating games, just generating video clips, so I don't have to worry about it being real-time like you do. I think if you have something working, stick with it. Set Activation works, its useful at times, but I don't think anything magical about it (and some strange limitations at times as it involves loading multiple concurrent scenes in effect).

    My 2c anyway.
     
    mishakozlov74 likes this.
  3. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    143
    Thanks for the answer! I think I'll keep using markers for now and wait for official package release, maybe Unity will also drop some "how to" videos for different usage cases, such as mine and yours.

    Meanwhile, I noticed dedicated track for scenes on your video, maybe I could learn something from source code of the package.
     
  4. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    As @akent99 said, we are trying to make it generic so you can come up with crazy new ideas using it :D!

    More seriously, I couldn't say if the Scene Activation track in the Sequences package would solve your problem or not. However, if you're willing to try we can assist as best we could! Plus, we are at least very interested on your use case/need and the problem you're trying to solve, as it is always useful for us to better know how we could improve things.

    If you have a setup you're willing to share on how you solved this problem your own way, it might be helpful for us to better understand this use case that is more "video game" oriented.
     
    mishakozlov74 likes this.
  5. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    143
    Wow! Thanks, well, I can't appreciate it enough!

    Yes, I'd like to share my setup with you. So, here is my cutscene. There are two control tracks for two Directors, but they are on different scenes.

    upload_2022-1-28_23-21-46.png

    You can see a marker at the beginning of the timeline - it loads scene, binds its local PlayableDirector to the clip and rebuild playable graph

    upload_2022-1-28_23-24-2.png

    Since we don't have cross-scene references, I had to implement it myself using a modified solution I ran across here.
    (It can also bind objects and Cinemachine shots, but I decided to have local timelines eventually)

    Next, when one director is close to finish his part I do three things using these markers:
    1. Load next scene addictively
    2. Set loaded scene active
    3. Unload previous scene.

    Usually, I put 2th and 3th markers at the same position. I added index to them in order to keep... order.

    upload_2022-1-28_23-27-21.png

    The biggest problem is that it's very hacky solution - binding clips targets requires rebuilding the whole graph and markers sometime behave in unpredictable way...

    So, in bare minimum I need to load/unload scenes and run timelines.
    I have it right now, but if Sequence package may offer something better out of the box, I'd like to try it out!
     
  6. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    Ok! So... here are some facts about the Scene Activation track that is in Sequences (and some documentation):
    • It is an activation track, not a loading track. It doesn't load scenes on demand like you do. What it does instead is that it expect scenes to already be loaded additively and it "activate/deactivate" them, meaning it activate or deactivate all the root GameObjects in the scene.
    • It still doesn't add any support regarding cross scene reference, so unfortunately, if you really need that, you still have the need for your own custom solution :/.
    From what I understand, the 2 control clips on your control tracks drive each one a timeline, one in scene 1 and the other in scene 2. Something that 'may' work, is having the same setup as you do, but always having your 3 scenes loaded (otherwise you won't have your bindings):
    • Main scene, with the timeline you showed and instead of the markers you could have two scene activation track, one for scene 1 and one for scene 2, with the clips aligned with your control clips.
    • 1 and 2: the two scenes to activate or deactivate.
    SceneActivationTrack.PNG

    Didn't test it, and it's really the 'cross-scene-reference' thingy that may cause troubles natively...
     
  7. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    143
    Okay, first of all, thanks for such a detailed and visual answer!

    I think I could show some kind of "Loading screen" for a bit longer, meanwhile load and bind all the scenes I need to the cutscene and then use Scene Activation Track to bounce between them.

    This approach is slightly different, but something is telling me that it's more stable and maintainable.

    Anyway, I'm willing to tame it!

    Thanks for your work and help!
     
    ellka likes this.