Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question With Sequences package and Set Sequence, can you animate objects in the set scene?

Discussion in 'Virtual Production' started by akent99, Oct 24, 2021.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I am using "Set Sequence" to load up a (shared) set scene. But I wanted to animate a door closing. It looks like this is not possible - it can only animate objects in the main scene. (Trying to record will not pick up the changes.) So I am now moving any objects I need to animate from the set scene to the main scene (like the door). Is there a better way?

    upload_2021-10-24_11-31-7.png
     
  2. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    Hello!

    There are some limitation at using a multi-scene setup and animation is one of them. Cross scene reference doesn't exist in Unity, so you can't really animate something that is in a different scene than the one that has the Playable Director and Timeline you are animating in.

    However, it looks like your set is a Prefab, so you could directly use that in your main scene. Is it something you already try? Do you specifically need to use a scene for this specific set?
     
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Thanks for the feedback. I was afraid that was the case.

    I was wondering if I could create a "controller" object in the main scene and some how reach over into the other scene to adjust the door etc. For now I am just moving objects I need to animate across to another prefab - but I might end up doing what you suggest and just discard use of Set Scenes. Just use a project per location.

    The use of Set Scenes was a bit of a hold over - originally I had multiple sets in one project, but Unity got too slow. Now I create a Unity project per location, so I probably can just merge the set into the main scene again. But I decided to stop making further big changes until I got a complete episode or two done, to learn as much as possible first about workflows.

    My concern with the project per location is I have a lot of shared assets (the characters for example, animation clips for them). I am using a symlink at the moment to share those files easily, but there is a 2021 beta bug/feature where Unity crashes in the presence of symlinks. So that is another problem I am still deciding on. E.g. try git sub modules instead? Or file syncing between project directories? Going to see if Unity fixes the symlink problem before making more changes.

    (The other area I keep hitting is animation rigging in timelines - would be very useful, but not being able to see in preview mode is annoying. E.g. I want the character to hold the door handle here as the door swings closed. So pushing on with other things, then will come back to do a final project reorg once its clear which way Unity goes on some of these issues.)

    Thanks!
     
  4. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    Disclaimer: What I'm about to propose is NOT an official best practice, but simply a good workaround that seem to work for larger projects.

    Some people use Unity packages to share data across multiple projects. Usually they also have a versioning system of some sort. But basically, in your case, you could have the assets you need to share between projects, bundled in a Unity package that you import in every Unity project. It is not the same as really sharing your assets, but maybe it makes it more manageable + Unity compliant.

    Curiosity question(s):
    1. What exactly do you call a "Set Scene"? I guessed it is a Unity scene, with a set in it, that you control with the Scene Activation track to have it for specific sequences?
    2. Would you be able to tell us how big are your sets and projects and what is the threshold where one project becomes too big to make Unity slow? Like rough number of assets/how big they are...
    3. I know now that you're doing something that looks like a series, with multiple episodes... And I think you use one Master Sequence per episode, right? When you say that you'll do one project per "Set Scenes", does it correspond to one project per episode?
    About your parenthesis, that's a bit out of scope of this thread but: new versions of the Timeline package just have been released, 1.6.3 or 1.5.7, that should fix your issue with Sequences + Rig Animation. I will answer that in the other forum thread, so you can tell us how it goes with this fix! Cause I know you had multiple problems... so maybe not all are fixed yet.
     
  5. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Yes, it looks like I will need to change my workflow. I just need to decide which way to go. The symlink approach had the advantage of instant sharing with no effort, but Unity crashing on startup is a bit of a hinderance for being productive... ;-)

    So I have to pick a new sharing approach before I can upgrade. If rigging animation is working, that might push me to start experimenting again. Current thoughts: unity packages (but seems painful), git submodules (makes merging and sharing easier, but a few manuals steps needed), file sync software (nicest workflow).

    Rigging animation is proving very important. I am not a filmmaker, but even my novice eyes can see things are much more engaging if there is action/movement rather than just standing and talking. Opening a door (holding the handle while it swings), picking up objects, what may seem like little things make it a lot more "interesting" to watch (to me anyway!), and the rigging animation makes that sort of thing much easier. I am using it in 1 in 10 shots. Getting live recordings to exactly hold something is too hard.
    1. Yes, exactly. I started with a mega project with everything in it (~20G). In that world I had a master sequence per episode, nested sequence per location/set (using Scene Activation), and a nested-nested-sequence per camera shot (sometimes I sneak multiple camera shots into one nested-nested-sequence, but I am finding this is rare, and when I do it I often get bitten by it - it is easier to have another copy of the characters so I can change their values per shot, or angle of lighting per shot - its just overall easier with a separate sequence per camera shot). Its mainly assets from the Unity store that take up the bulk. Someone from Unity recommended going with smaller projects also as a safety thing (don't lose everything if something goes wrong). It did speed things up, and the git repo was a more reasonable size etc., especially when I stopped committing the asset store purchases (a pity they go under Assets - I now try to put anything I change in Assets/_LOCAL/ so I only have to commit that... normally). But it makes sharing harder, and the total disk space is much bigger. I am not yet sure if its an overall win to be honest, but I was trying to stop experimenting with project structure until I got an episode or 2 complete - see what other learnings came out of it all. (Removing symlinks while sharing files easily is my next question mark before I decide the mega project question.)
    2. The mega project was around 20G in the Assets directory. The individual projects depend on the asset sizes. (purchases from Unity asset store). School 13G. Lake house 10G. Houses in the hills 13G. Army base 8G. (I have around 20 locations, only half split out of the mega project so far.) Because I started with everything merged, I might not have deleted everything to slim down the individual projects correctly. Merged I could use any asset from any Unity asset store purchase to spruce up any scene, so I kept a store asset if I used a single prefab or material from it. I need to go back and look closer, after I finish a few episodes. It may have been more the number of scripts or number of files rather than size of files that slowed things down - not sure. But clearly there must be a lot of shared stuff still there since the total project I started from was only 20G and some location projects are 13G. The shared directory area is 2.5G (characters, props used across locations, animation clips for walk cycles etc).
    3. I started with everything merged, then split it by location (not per episode). I did not restructure the sequence hierarchy in case I decide to go back to a mega project (this is all experimenting and learning still). There is a lot more disk bloat with separate projects. Current plan is to use a project per set/location (I cannot afford the disk space per episode!!), then a new master sequence in each location project if it is used in an episode. E.g. in my downtown project I have ep1/location1/shots, in my school project I have ep1/location2/shots. When I start ep2 I plan to start a new master sequence so will have ep1/location1/shots as a separate hierarchy. So I am not really getting benefit from the top two levels of sequence nesting with separate location projects, but if I remerge I am hoping it will be easier. (Note: I label shots using epE-LL-SSS where E is the episode number, LL is the location number (I use 10, 20, 30 so I can insert a new one if needed without renumbering), and 3-digit shot number (again in increments of 10 since renaming sequences does not seem possible). [Observation - I cannot see how to rename and reorder nested sequences, so the Sequences window gets out of order after a while and I cannot fix it. I can however reorder things in the unity scene, so it has not been too bad. The numbers are critical to me - I sort all the video clips for an episode by filename later to compose the final product.]
    A part of my thinking is consistency in organization. My ambition (day dreaming?) is say 20 episodes, each one using 2 or 3 locations. Episode 1 has around 10 to 20 shots per location. I have done a solid pass of 2 of 3 locations for episode 1, working on shots and animations for the third location now. It is getting faster though - e.g. location 3 I discovered the house asset from the store I used had a slightly different scale factor (0.8 = 1m) which I did not notice until I dropped the characters into it. So I had to mess around my location rescaling everything.
     
  6. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    The following overlaps with my previous reply, but as feedback for my "ideal" world (with reasons why).

    Option1: Mega project. If this was safe it solves all problems pretty well. But I did hit some performance slowdown (e.g. so many scripts recompiling) and some Unity folks recommended not putting all eggs in one basket (practical advice). It is by far the easiest solution though.

    Option 2: Project per location/set. This is where I wanted to focus here, on things that would make this work better (and why).

    2.1 Asset store purchases.

    I wish asset store purchases did not go under the Assets directory. I also wish they were read only. More like Unity packages. That way it is easily/safe to not put them under source code version control.

    Workaround: I create a _LOCAL directory for my files and try to only make changes to files there (self-discipline). Then I .gitignore everything outside that directory.

    I tried turning an asset store purchase into a package but it failed. The asset store code assumed it was under Assets/ when loading resources, and packages wanted "Runtime" and "Editor" directories. It was not trivial to refactor asset store purchases into packages.

    2.2 Sharing files between projects

    I am using the following pattern.
    • I have a project per location (with all asset store purchases needed loaded into it). I will not start a new project per episode because of disk space bloat - 10G is common for a single location.
    • I have an Assets/_LOCAL/ directory that I put everything in I want to modify, specific to that location, which is under source code control.
    • I have an Assets/_SHARED/ directory that I put everything in that I want to modify but share between projects. Currently using a symlink, but looks like that no longer works (??). Examples: scripts, characters, props.
    I never update (on purpose!) the files from the asset store. I update _LOCAL continuously. I update _SHARED daily.

    If there was a way to share files between projects easier:
    • I would love asset store purchases to be in read-only Unity packages (or similar) that I can share easily. That would make it feasible to start a project per location and episode, or maybe even episode (and I load a 2 or 3 locations together out of my 20+ locations). I need to reuse locations (sets) across episodes to save effort (having a project per location solves this, doing anything different needs a good way to share all the assets for a location between multiple other projects).
    • I need to share _SHARED between projects. I make frequent changes to characters as I go, and need those characters to be identical across episodes. I don't want to fork them. E.g. I need to fix the hair bones on a character as its not right. I don't want to repeat across multiple projects by hand.
    For the shared directory, I would accept only being allowed to have one Unity editor open at a time on it (e.g. lock it so a second project would refuse to start if still in use by another project). Or only one editor has "write" access at a time. Having a copy per project is painful as I have to carefully keep them in sync manually.

    I normally make changes in the context of a location (to test the change) - it would be harder to make the changes in a "master" project. Using a unity package I believe would require me to have a master project, make the change (with out all the context of a real location), "publish the package", import into the real project, test, then repeat until its working. This is a pretty common activity, so all the extra steps sound painful. (Can I avoid some of the steps? Can I use the "master" project as a package in other projects without needing to go through a "publish" process for each change?)


    Bottom line: I am finding _SHARED really important for animation projects as I need to have characters shared across projects if I have separate projects per location or episode (as recommended by some Unity folks). They are updated "frequently" (e.g. every hour of work). If I need to use a separate master project, the workflow to get changes pushed out needs to be slick and automated (button click). Advice on best way to do this appreciated!
     
  7. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    And because I cannot resist in terms of trends (Adobe Photoshop is going into public beta on the web!), a quote: "it’s back to the customer. It’s knowing these are people who grew up in the age of Google Docs, they expect to be able to just share by clicking an icon. They don’t want to have to send an email and have a version control issue from day one.” - Scott Belsky on The Verge’s decoder podcast

    I would love faster and collaborative sharing in Unity... even if it is just collaborating with myself in different projects! ;-)
     
  8. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    Disclaimer: feel free to skip some of my questions if you don't have easy answer for them, especially the one about the size of your project. Those are more curiosity question, and to be able to compare with some other "big" project we have.

    Answering Post #5:

    Ok, so one project per location.

    And you mentioned ~20G when you used 1 mega project, and you're already around 30/40G with the multi-project setup. And you said that your shared assets are only 2.5G but it's possible that you still have assets that should be shared that are currently duplicated in all project, did I interpreted that correctly?

    Do you know how many assets you have (basically how many files on disk in the Assets folder should be a good rough estimated I guess)? I don't know if it's easy for you to provide that info...

    Are you able to say how big a location alone is? For example if you put just the location in a scene or in a prefab, how big it is and how many GameObjects (roughly) it contains?

    Does it happen that one location is seen twice (in two different sequences) in the same episode? If yes, how do you handle that?

    You mention "remerging" your episodes, is it something you will do in Unity? Or you intend to you and editorial software to "stich back" your episodes together?

    Indeed, you can rename all you want... but you can only re-order thing in Timeline or in the Hierarchy (or both). We are actually currently focusing on improving Sequences for bigger projects... and re-ordering (automatic, like alphabetical ordering or manual) are part of the work. We'll provide you some update when we have stuff to test in this area if you want.

    Answering Post #6, 7:
    That's all interesting feedback! I don't have advice myself, but I can pock around to find some guidelines on how to better collaborate across project. I actually don't know how often people do that... At best I find someone to come answer here directly!

    Also, I like this quote of Scott Belsky, I hope Unity ends up there soon :D! I believe everything will move toward that little by little.

    Digression:
    I'm going completely out of scope here, but I very recently watched "The Way of the Househusband" on Netflix. I was impressed how lively it was despite the minimal (very minimal) quantity of animation. It's really in-between just reading the manga and watching an anime... It's like, watching the manga ^^. What you're saying here makes me think of that. I completely agree that some movement/animation makes it more interesting to watch! And I was actually surprised to not be bothered by the "lack of" animation in this series... Even more than that, it actually took me a few episodes to realized that characters was not (or almost not) animated! Do you know this series?
     
  9. gekidoslayer

    gekidoslayer

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    134
    Hey there,

    I've done quite a bit of experimentation with shared assets across projects for episodic work etc.

    One approach that we've used (and had some pretty good success with) is (ab)using the unity package structure for cross-project asset management.

    Packages in Unity are typically for code sharing, but there's no reason you can't use them for content as well, and in fact it's actually pretty efficient for using them like this:

    The directory structure that we used for a project just recently is like so:

    /Client/Episode01 <== actual unity project here
    /Client/Episode02 <== actual unity project here
    /ContentPackages/Characters <== the actual content here (fbx / materials / textures)
    /Packages/CustomCodePackage <== custom code package etc...

    One challenge with packages & multi-project workflows is whether the packages are read only or not. Packages are typically 'meant' to be read only - so an ideal workflow for a larger studio would be something like:

    1) Lookdev project => do work on asset here
    2) publish changes to content package
    3) Episode project => ingest read only versioned package.

    This way you can have explicitly versioned content that are used for different episodes (taking into account any episode specific changes), like so:

    /ContentPackages/characterA.v001 <== used by episode 01
    /ContentPackages/characterA.v002 <== used by episode 02
    /ContentPackages/characterB.v003 <== used by episode 01

    etc...
     
  10. gekidoslayer

    gekidoslayer

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    134
    I talk a bit about this in this presentation that I did at Unite Europe a few years ago (jump to about 25 minutes in):

     
    akent99 likes this.
  11. gekidoslayer

    gekidoslayer

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    134
    also re your comment about asset store packages being 'unity packages' - this is exactly how I manage asset store work for my own projects - for content packages, it works very well.

    in fact, I created a utility to generate packages for this very reason:

    https://github.com/PixelWizards/com.pixelwizards.package-utils

    You basically give it a root directory (within Assets) and then an output folder and it will generate the manifest.json and copy the files to the output folder.
     
    akent99 likes this.
  12. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    For me, I am not an artist / 3D designer etc, so my locations are basically Unity Asset store purchases. They make up the bulk of the files. I move things around a bit, but its 95% from those assets. I use packages such as:
    But then I might add some other packages for their assets, like
    Then throw in tree packs, add some terrain around the city, add a bridge, etc. I don't create much myself (too much work!!). I use existing sets from the asset store, so they are bigger than I need almost certainly, but it takes too much effort to prune them down. (I tried a few times and broke things!)

    When I threw it all into one, it was like a candy store. Oooh, that park bench is nice! I am going to put it over in this city location too. Detangling it all was hard (err, is hard - still not finished!!). The size of a location is driven primarily from assets like the above - whatever scene looked good, whatever size that package is. The diner is smaller for example - but I might combine with a city location so you can look out the window and see the street traffic.

    I used Windows explorer on the Assets directory of one location (downtown city, starting of the video I shared previously). It says 5.02GB, 5174 files, 351 folders. Another one is 10.5GB in 17607 files (but it has 8 Unity store assets still). A small one is 3.01GB 1205 files (Modular Tunnels package and about nothing else - no windows to look outside of in a tunnel!).

    Do I use a location in one epsiode multiple times? I have only completed one episode! Lol! But yes, it definitely happens in upcoming scripts that do that. I number each episode, each location (or location shooting to be more precise), then each shot. E.g. if at home, at school, at home, I number them "10" for first at home, then "20" for at school, and "30" for at home again. The at home location project then has an "episode 2" master sequence with two location nested sequences "10" and "30" with all the camera shot sequences under 10 and 30. It just helps me stay organized. I call all the video clip files "epE-LL-SSS" (E=episode number, LL=2 digit location number, SSS=3 digit shot number) - all the files sort nicely in a single directory of video clips then. The school also has a master sequence for ep2, but it only has one location child (20) with all the shots under that.

    (Shh! I also cheat! If I have a single camera shot for like a flashback, I might not create a new location subsequence in the middle of 20 - I just get the numbering right of the video clip files. To be 100% correct, a flash back from school (location 20) back at home (locations 10 and 30) would actually need me to split 20 into say 20 and 24, then create a new at-home location 22 for that single flashback shot - full sequence at home 10, at school 20, at home 22, at school 24, at home 30. But if I move that single flashback shot to a different spot, I have to do major renumbering of everything! So instead I have snuck into "at home 10" a video clip with location number 20 and a shot number the slot between all the result in location 20.)

    Cheating I say, but it saved me time in my first episode already, so maybe it is common? I had a scene "downtown", then a major scene "at school", with a third one "at home". But I put a static character summary card between locations, partly to help people understand its a new scene and location. The last shot of location 1 was Sam arriving late to school in the morning. After that I put the end of part summary card located back in the downtown location. So I really should have created 5 location takes (downtown, school (one shot), downtown (one shot), school, home), but I only did 3 so the shots in my Unity Sequences were out of order, but the final order was correct because I control the filenames Unity recorder output used. (I hope that makes sense!)


    When I said re-merging, its more if I decided to go the mega project route again, I would have all these smaller episodes. I would try to create episode sequence 1 with 10, 20, and 30 under it in the one episode 1 master sequence. So I would need to merge the ep1/10+20 master sequence in the home location with the ep1/20 master sequence in the school location. That is what I meant by merging the projects.

    Video clips I merge outside Unity. I write out WebM files (MP4 files from the Unity recorder are poor quality if the scene complexity gets too high). So I use a Python scripts to convert the WebM to MP4 outside Unity, bundle them all up etc.


    Regarding action, yes, you are right. How you use a medium is important. Comic books / Manga etc can be really engaging with still images. I was originally going to use static images for the comic, with minimal animation (move eyes, turn head). It might actually be better. I just found more movement easier to convey the story - but that may be due to lack of skill on my part rather than it actually being better!
     
  13. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Thanks for sharing! I hit a few annoying speed bumps when I tried this approach (but overall I agree that it makes a lot of sense).
    • Assets from the store frequently have multiple root directories - e.g. a few put a scene file in the Assets/Scene/ directory. Or some would include files from some other package. Basically the asset store assets were not always "clean".
    • Some assets are hard coded to look for resource files in the Assets/<package-name>/... directory. They did not work when I packaged them. (And fixing the problem meant getting updates from the store was problematic later.)
    • Updating scripts was more painful (less of an issue once the project settles down) – I found it useful to experiment with scripts in an location project. Having a package per character (for example) means I have to copy changes from the current project back to the master package repo.
    • I found splitting code into Runtime and Editor directories required me to understand the code more than I wanted. Again, if it was built into an asset store default that would be nicer.
    But for big projects, I think it makes a lot of sense separating "read only" asset store files (that do not need to go into git etc) from project files that must be backed up. Better core support from Unity would be helpful, especially if asset store packages where cleaned up a bit as a result.
     
  14. gekidoslayer

    gekidoslayer

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    134
    Yes I agree, far too many of the 'code' asset store extensions aren't properly set up with assembly definitions etc. For the key ones that I use regularly I tend to bite the bullet and re-mangle the extension for my own purposes.

    Luckily most of the content-specific packages are fairly straightforward to migrate into packages.