Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question Can Timeline handle 40,000 Years? What about 12 Billion?

Discussion in 'Timeline' started by MKde, Feb 13, 2023.

  1. MKde

    MKde

    Joined:
    Mar 20, 2021
    Posts:
    12
    Hi

    Can Timeline handle 40,000 Years? What about 12 Billion?

    Or asked differently, for achieving the Goal below do you think Timeline is: 1) suitable or 2) have suggestions on why or why not and perhaps ways of building such a solution because I'm trying to better conceptualize how I might use timeline to plot human history?

    Goal: build timeline with a time-dial/marker that ticks/plays through the past 250,000 years up to the present (i.e. 2000 BCE to 1999 BCE to 0 BCE to 1 CE, etc) from left to right, revealing inventions/artefacts/etc. which become visible on the chart/map from their respective dates.

    Issues:
    • Base time reference system? For e.g. the time dial/marker starts from -BCE and ticks to AD and then to the present so to get all nested Timelines on a parent timeline and have the correct placements, do i need some base reference system that removes the BCE - years issue? Or perhaps there's another way such as via a deeper reference time system (like ints / unix time.
    • How to bind the reference system to display the correct Time dial / current year that is ticking by.
    • How to hide and enable the artefacts from their correct date - via a nested Timeline? Via signals/events?
    Posted because searched for "timeline" and "thousands of years", etc. but couldn't find much on this.
    Thank you
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I don't think Timeline is appropriate. It is for playing back animation clips etc in real time, combining different animation clips as you wish. So while you might be able to create a Timeline of 40,000 years, playing it back would take a little long... ;-)

    There is no special UI for dials based on years, BCE etc. Its just for linking animations together. E.g. make a character walk then sit.
     
  3. MKde

    MKde

    Joined:
    Mar 20, 2021
    Posts:
    12
    Thanks @akent99
    Was thinking perhaps you could have a master timeline Clip controlling nested timelines (foreach bar on the barchart) then use TimelineClip.timeScale to speed up the playback rate (potentially to days, years, etc. per second) but haven't tried and use a signal or Control track to enable (from disabled) each bar/artefact of data as the time dial reaches it.
    https://forum.unity.com/threads/is-...ier-of-timeline-at-runtime-in-unity-c.531819/

    That said haven't built such a system before so not sure if it'll work and was wondering if Timeline could be a base.
    Please let me know if you have views on how you would build it?
    Thanks
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    What do you want to put on the timeline? It sounds like you want things to appear and disappear? Do you want to "play" the timeline, or just allow time scrubbing?

    But basically I would not think about Timeline's as providing functionality for dates across such a long period. They are not designed for that. They are usually seconds or minutes long. But if you want to have different things appear and disappear in a scene based on time, then a TImeline might be a useful part of a complete solution. E.g do something like map "real world time" to seconds via a function you define, and create all the UI etc yourself. E.g. 40,000 BCE could map to time zero, then time 1000 BCE maps to Timeline offset of 10 seconds, then 0 BCE maps to 20 seconds etc. You can then write a function to convert the current Timeline time (which is in seconds) to the year so as you pan through the Timeline (in seconds) it displays it as a year (if that makes sense).

    But using Timeline to represent years I think will be painful. The timeline timecodes and zoom are not designed to support that.
     
  5. MKde

    MKde

    Joined:
    Mar 20, 2021
    Posts:
    12
    Thanks @akent99 for your suggestions and sorry for the delay.
    The goal is to place a wide variety of media on the timeline. For e.g. images, video, 3d models, etc. We have exact datetimes for example for archive war footage, key moments in history etc. so it makes sense to map these to the timeline exactly where possible.
    Yes, I would like assets to only appear once their DateTime has been reached and allow both Playing (with the ability to adjust the play/speed (in orders of magnitude, not just 2x 3x but potentially days, years or more per second) and scrubbing.
    Noted that you think it'll be painful. If there are other alternatives or tools that come to mind please let me know.
     
  6. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    140
    From the perspective of performance, It's not very practical to control such a long span with One Single Timeline.
    If one put images, video, 3d models into one timeline, that means one will have to load all the contents (~40000 years) even if one just want to get a peak at 2023/02/20. Mind that it also happens in runtime, so players will need very, very large amount of memory to play such a game, and is easy to crash.

    My suggest is to build every event (or events in 1 year that would happen) as an AssetBundle/Addressable Asset, and create a ScriptableObject that links the date with the AssetBundle. By this way, you can runtime load and unload contents when the time pass by, which is more memory conserving. (You can represent each event as a timeline)
    (I don't know if there already exists such an asset that can do this)