Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Other [0.9.4] Latios Framework for ECS megathread

Discussion in 'Entity Component System' started by DreamingImLatios, Dec 21, 2019.

  1. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    https://github.com/Dreaming381/Latios-Framework

    Latios Framework for Unity ECS – [0.9.X]
    The Latios Framework is a powerful suite of high-performance low-level APIs and feature-sets for Unity’s ECS which aims to give you back control over your gameplay. If you like the general paradigms, syntax, and workflows of Unity’s ECS, but find Unity’s offerings to be incomplete or frustratingly full of quirky unintuitive details, then this framework may be exactly what you need to achieve your vision.

    The Latios Framework does not replace Unity’s ECS, but rather complements it with additional APIs and tools. In some cases, the Latios Framework may override Unity ECS’s underlying mechanisms to provide more features or improve performance. Desktop platforms are supported out-of-the-box. Other platforms may require additional effort (i.e. compiling native plugins) to achieve functionality and performance benefits.

    Originally, this framework was for my own personal hobbyist game development, and in a sense, still is. However, after several years of development, it has proven a valuable resource to the Unity ECS community. It is provided here free to use for personal or commercial usage and modification. All modules are licensed under the Unity Companion License. The modules may contain code borrowed from official Unity packages and therefore may be seen as derivative works. Despite this, the Latios Framework contains many adaptations of top-class solutions in the industry (see Third Party Notices) as well as original inventions geared towards Unity’s ECS.

    The Latios Framework is best-known in the community for Kinemation, a module which provides extremely high-performance CPU animation and GPU skinned mesh rendering features.

    This version targets Entities 1.1.0-pre.3. If you are still using Entities 1.0.16, please reach out if you face regressions when updating Unity packages.

    Note: This release is not compatible with Unity Transforms. Compatibility may be added in the future via a community effort.

    [0.8.x] users, please read the Upgrade Guide!

    If you have any experience with DOTS, please take this survey!

    Modules
    The Latios Framework contains multiple modules, each of which contain public API for your own use. Additionally, each module may contain addons. Addons are community contributed features, and consequently may have different design philosophies or support guarantees as other features. With that said, some addon authors are very active and offer support and reliability that surpasses native features.

    Modules and addons are disabled by default and are installed via a custom bootstrap. Bootstrap templates are provided in the Assets Create menu.

    Core
    Core is an essentials kit for handling common programming concerns in Unity’s ECS. It contains many features you might have heard of such as Rng, Blackboard Entities, Collection Components, Instantiate Command Buffers, Smart Blobbers, and Baking Bootstraps. But there are many more features around. If there is a common “hard” problem in ECS, there’s a good chance Core has a tool to address it.

    QVVS Transforms
    QVVS Transforms provide custom transforms systems based on the concept of QVVS transforms, which are vector-based transforms that can represent non-uniform scale without ever creating shear. There are three modes: Cached QVVS, Uncached QVVS, and Unity Compatibility. Currently only Cached QVVS is implemented.

    Along with QVVS representations, this module contains replacements for baking and systems that offer more performance and determinism than what is shipped with Unity.

    Psyshock
    Psyshock Physics is a physics and spatial query module focused on user control. While most physics engines provide out-of-the-box simulation, Psyshock instead provides direct access to the underlying algorithms so that you can craft the perfect physics simulation for your game and not waste any computation on things you don’t need. Psyshock’s Collision Layers can be built directly from Entity Queries, removing all the archetype guesswork out of collisions and triggers.

    Myri
    Myri Audio is an out-of-the-box pure ECS audio solution. It features 3D spatialization of both looping and non-looping audio sources, multiple listeners, directional and non-directional sources, and a voice combining feature to support massive amounts of sources at once. Playing audio is as simple as instantiating prefabs.

    Kinemation
    Kinemation Animation and Renderering provides authored animation, simulated animation, and everything in between. It includes an overhauled Entities Graphics for significantly improved performance of both skinned and non-skinned entities, and also provides extra features such as enabled bit toggled rendering and mesh modifications in Burst jobs.

    On the animation side, Kinemation supports bone entity and optimized bone buffer configurations. It includes utilities for inertial blending. And for animation clips it leverages ACL, a powerful high quality animation compression solution used in AAA titles such as Rise of the Tomb Raider, Fortnite, and Valorant.

    Calligraphics
    Calligraphics is a world-space text rendering module. It uses TextCore fonts and formats text to be rendered via the Kinemation rendering pipeline, complete with custom ECS material property support. The text can be animated with the built-in tweening engine, or you can make your own animations with the glyph mapping API. A subset of rich text tags is also supported. Use Calligraphics for world-space dialog, player names, and damage numbers.

    Mimic
    Mimic provides behavioral replicas of popular solutions within the Unity ecosystem, rewritten to leverage the features of the other modules and the performance benefits of Unity’s ECS. With Mimic, teams can continue to use familiar and proven authoring tools and workflows while simultaneously being fully invested into Unity ECS and the Latios Framework.
    • Addons
      • Mecanim by Sovogal – Replication of Unity’s Animator Controller state machine with support for blend trees, interrupts, root motion, and events.
    Future Modules
    • Mach-Axle AI – An infinite axis utility evaluator designed for high throughput
    • Unika – A high-performance scripting solution including support for interfaces and coroutines using source generators
    • Life FX – VFX simulations which add immersion to stylized worlds
    • Unnamed Environment – Terrain, water, vegetation, weather, proc-gen, and many other things to build worlds
    • Unnamed Networking – Something fast and flexible at scale
    Why Use the Latios Framework?
    Typically, “frameworks” fall into one of two categories. Either, they are someone’s collection of convenience classes and extension methods, or they define a specific architecture and workflow for describing gameplay code.

    While the Latios Framework has some of those things, its primary concerns are at the engine level. Many of its tools and solutions are inspired by GDC presentations, technical blogs, and research papers. A key focus of the framework is to make these advanced technologies usable within a DOTS-based production environment. But another common theme is fixing or providing alternatives for fundamental design issues in the official ECS packages. For technical reasons, it is a “framework”, but the individual APIs act more like a toolkit and stay out of the way. A developer using it should always feel in control. If not, there’s likely an issue worth bringing to attention.

    0.5 marked the end of Phase II, where focus was placed on enabling technologies in Unity ECS such as audio and animation. Current Phase III development focuses on modernizing the technology for Entities 1.X and facilitating gameplay design.

    Long term, the Latios Framework’s mission is to dramatically reduce the development effort required to make highly artistic 3D games and short films.

    Still not convinced? Here's a video showcasing the performance impacts:


    And if you are concerned about all the ways this affects existing ECS workflows, there's a comprehensive guide detailing the changes here: https://github.com/Dreaming381/Latios-Framework-Documentation/blob/main/What Parts of ECS Does the Latios Framework Change.md

    Getting Started
    There are three methods to install the framework package (contains all publicly released modules).

    • Clone or submodule this repository into your project’s Packages folder (recommended for contributors or those wanting faster bugfixes and updates)
    • Add package via Package Manager -> Add package from git URL
    • Add via OpenUPM
    After installing the framework package, follow the instructions in the first section here. You may also want to look through the compatibility guide.

    Getting Started pages and documentation are provided with each module.

    Learning Resources

    Well, in the midst of the crazy roller coaster that has been DOTS in the last month, I kicked into overdrive to try and get my framework out and in the public.
    https://github.com/Dreaming381/Latios-Framework
    It is probably littered with bugs, as I have not actually updated any of my personal projects to this version yet. But if I held off on releasing it any longer for "quality reasons", I would have never released it.

    It's also not the complete framework. This is just the subset I am willing to publicly support at the moment.

    While this framework is not for everyone, if you use it, like the direction it is headed, and/or have any other feedback, please let me know!

    Enjoy!
     
    Last edited: Mar 16, 2024
    koonm, rawna, saskenergy and 35 others like this.
  2. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    73
    I haven't gotten around to trying it yet, but the docs look great. Especially the physics FindPairs optimization article was very interesting, it's rare to find such in-depth articles.

    I agree with your notes on Unity Physics and it's nice to see an alternative for different design purposes (e.g. games that need mutable colliders). But what I think is even more important is that right now there is no other "build your own solution" frameworks for Unity's ECS (and the ones that are engine agnostic would have interop overhead). Many devs including me want their game to use its own unique 'non-realistic' physics, or maybe even don't have a need for physics simulation and just want to check trigger overlaps, but don't have the knowledge to build the part that handles the actual queries (with efficient broad/narrowphase algorithms etc). This seems to solve that while still letting games handle the simulation part (gravity, collision responses etc) tailored to the game, which imo is easier to build than efficient broad/narrowphases.

    I see a lot of potential here, I hope you'll keep at it!
     
    deus0 likes this.
  3. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Thanks for the kind words! I don't blame you for not having tried it. this first release was a little rushed before the holidays because I mostly wanted to use it as an example to provide feedback to core DOTS and also get some feedback on the general design if I was lucky enough. The next few releases should hopefully make the framework a lot more usable.

    To your comment about custom physics, that is totally the goal with this project. Most Unity games don't need true physics, but often relied on trigger colliders and raycasts to make development simpler. That's exactly what I am targeting. The reason I don't comment on it much is because Unity.Physics has an ISimulation interface which allows the simulation aspect to be written custom or just straight-up omitted. I don't think this solution is nearly as flexible or as intuitive as a library of stateless algorithms and acceleration structures, but it is there.
     
    mikaelK and GilCat like this.
  4. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    I haven't tried Unity.Physics yet but you make an excellent point on your documentation, those are some solid arguments with good explanation on your decisions.
    This is something I would use or take some ideas for my projects.
    Thanks a lot for putting it together.
     
    DreamingImLatios likes this.
  5. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Hello everyone!

    A lot has happened to me since January, much of which has interfered with the release of 0.2.0. I wanted this release out months ago.

    A special feature of 0.2.0 is that I had planned to release it alongside a space shooter sample. This sample game would serve both as an example and as a project to ensure a suitable amount of stability in the framework.

    I have gotten the game to the point where things feel stable enough to share. So rather than horde my tech until I finish, I have decided to migrate the game to a public repo and attached a preview version of the framework as an embedded package. https://github.com/Dreaming381/lsss-wip

    Feel free to copy the package or game for your own use cases, or just the snippets you care about.

    In addition, if you would like to contribute and help me move on to documentation and version 0.3.0, by all means do so!
     
  6. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Hello again! After 9 months of distractions and well... more distractions...

    Latios Framework 0.2.0 is officially released!

    Link here

    This release is designed to work with Entities 0.14.0 and is significantly more stable. It is currently powering several game projects of mine including this one: Latios Space Shooter Sample

    • Core Features
      • Fluent EntityQuery construction API
      • Collection components with automatic dependency handling (store NativeContainers on entities)
      • Component copying by ComponentType
      • Scene management with entity destruction on scene change
      • Scene and Global scope entities with entity merging capabilities
      • Top down system construction and ordering
      • Hierarchical disabling of systems by custom criteria
      • Custom bootstrap helpers
      • simdFloat3 type (4 packed float3s)
      • Interface-constrained generic job scheduling from generic functions with Burst support in builds
    • Physics Features
      • Multithreaded broadphase with parallel thread-safe event dispatch
      • ...Uh yeah... That's all its really good for at the moment
      • There's some collider types and queries too, but this is still really early
    • Documentation
      • There is documentation for both Core and Physics
      • There is also an article series I call "Optimization Adventures" which some of you may find informative
    If you try it out, please let me know what you think! I want this to eventually become something people can use to kick-start their DOTS projects (especially small game jam projects).

    Also, I have yet to decide which features will end up in v0.3.0. You can find a list of features at the bottom of these two pages and let me know which ones you would like to see prioritized:
    https://github.com/Dreaming381/Latios-Framework/blob/v0.2.0/Documentation~/Core/README.md
    https://github.com/Dreaming381/Latios-Framework/blob/v0.2.0/Documentation~/Physics/README.md

    Feel free to share your thoughts on this thread! You can also PM me if you prefer that. I don't mind. :D
     
    FlavioIT, NotaNaN, _met44 and 14 others like this.
  7. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    77
    Main things I'd like to see right now are box colliders and collider casts.
     
    DreamingImLatios likes this.
  8. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    77
    Oh, just started porting my character controller to use your library instead of Unity.Physics and realized that raycast vs collision layer doesn't exist yet. Not sure why I thought it did. So I'd like to have that as well.

    Still, what's there worked wonderfully for my animated hitboxes and hurtboxes.
     
    DreamingImLatios likes this.
  9. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Yeah. I've been faking the raycast broadphase with capsule colliders. The issue right now is that proper raycasting requires a simd binary search and an inverse walk along the x-axis for negative x directions. Those will take time to get right and are dependent on some other optimizations like sentinels.

    I'm waiting to see how badly the next Entities release breaks Core before I lock in for v0.3. But I know that box colliders and some debugging improvements will be coming before the end of this year.
     
    djsell likes this.
  10. jasonboukheir

    jasonboukheir

    Joined:
    May 3, 2017
    Posts:
    83
    I am loving your documentation so much. A lot of these docs would be great blog posts, and it could be easy to host with github pages and Jekyll.
     
    DreamingImLatios likes this.
  11. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Thank you! I'm glad they are useful.

    I actually have considered doing a blog with GitHub pages. But I am not exactly sure what advantage that would have over the current format (I am really bad at web design and CSS so that is a factor). I don't have much of a following, otherwise I would probably stream my dev on weekends. Anyways, are there specific topics you would like me to cover in a more blog-like format?

    As a side note, my active development (with the exception of rough prototypes) is still happening in this repo: https://github.com/Dreaming381/lsss-wip
    I try to leave relatively detailed commit messages in case people get curious about my progress.
     
    charleshendry and florianhanke like this.
  12. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Hey everyone! So I didn't have to wait very long for the next DOTS to drop.

    First off, Latios Framework 0.2.0 is incompatible with Entities 0.16.0. Unity broke ComponentSystemGroup, again. :mad::mad::mad::rolleyes:

    I will be making a patch release this weekend. However, if you are using LatiosFramework 0.2.0 and doing any of the following:
    • Adding or removing systems after bootstrap
    • Running systems inside of InitializationSystemGroup but outside of LatiosSyncPointGroup
    • Reordering or omitting Core systems
    • Doing something I likely wouldn't expect someone to do with system ordering
    Please tell me so I can ensure your needs are met in the patch!

    With that out of the way, here's what's coming in v0.3:
    • Core
      • Smart Sync Points and specialized command buffers
      • Deprecation of Burst Patcher (no longer required due to some new discoveries about generics)
      • Updates for future DOTS releases (mostly dependent on if unmanaged systems arrive)
    • Physics
      • FindPairs.ScheduleParallelUnsafe
      • Box Colliders (using SAT)
      • Entity aliasing safety checks for FindPairs.ScheduleParallel
      • PhysicsDebug improvements including full job and Burst support
      • Minor CompoundCollider improvements
    • Audio (dependent on unmanaged systems not arriving)
      • Music
      • One shots
      • Looped Effects
      • Spatialization
      • Culling
      • Voice combining
      • Sync point job thread saturation
    ETA: Late December 2020
     
    jasonboukheir, Krajca and djsell like this.
  13. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Yeah, that is the issue with any frameworks at this stage of Entities.
    It is rather risky using any atm., if not own to be honest.
     
  14. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    I'm a bit confused, you're saying the framework isn't compatible with Entities 0.16.0, but the most recent version of Entities I can find is 0.14.0, is there something I'm missing?
     
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    0.14 is the last one displayed, in package manager. Maybe is visible in Unity 2020 beta. There is info somwhere here on forum as well, that entities version 0.15 is skipped.
     
  16. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    I am legitimately confused why you wrote this. There's obviously a value/risk tradeoff when using other people's code. I try to mitigate that risk by being open and proactive about communication. And while I don't think this was your intent, what you wrote slightly comes off as "This thread is stupid". I'm not asking for an apology or anything. But I am genuinely curious, why did you write this?

    Entities 0.16.0-preview.21 dropped yesterday, along with new Collections, Jobs, Hybrid Renderer, DOTS Editor, Data Flow Graph, Animation, and possibly some of their dependencies. The documentation for these are still not up on the website.

    I am seeing this in Unity 2020.1.7f1 and 9f1. These versions are apparently compatible with 2020.1 still.
     
  17. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    Interesting, I'm seeing the new version of Unity Physics in 2020.2.0b8, but not the new versions of the other packages.
     
  18. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Try replacing the hybrid renderer entry in your manifest.json with this:
    Code (CSharp):
    1. "com.unity.rendering.hybrid": "0.10.0-preview.21",
     
  19. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Firstly, I never indicated that your work is useless, or anything like that.
    You should be open for a critique as well.
    Why you so defencive and wording in such way. Please don't put such words into my mouth like "this thread is stupid". It is really not in place.
    You can defend your point of view, but please dont be mean to others.

    It is open source that's great.
    But the reason I see as risky, because for once DOTS evolves very fast and changes quickly.
    For second, if framework stops being developed tomorrow for any reason (nothing new here, happens to many in past), very little can be done, other than trying fixing it on its own.

    Anyway, anything is good for learning resources.
     
  20. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Like I said, I did not think it was your intent. But I am letting you know that whether you intended it to or not (in this case, not), that was how some people could perceive it.

    I'm 100% open to criticism. But in this case, I'm not exactly sure what you were trying to accomplish. There's no real action item I can extract. The problems you are presenting are things I am already taking every possible step to mitigate that I can think of. Because of this, the only logical meaning I could extract was that your statement was being dismissive. I wasn't sure if that was your intent before, and I definitely know it wasn't now. So hopefully we can agree this was a misunderstanding on both our ends and I will try to find better words when reacting to such situations in the future.

    I'm still absolutely baffled as to what your real intent is though.
     
    FlavioIT likes this.
  21. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    Keep up the good work, it’s fantastic when people share their work.
     
    Antypodish and DreamingImLatios like this.
  22. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I think you are over thinking the matter too much.

    In short
    My point was nothing more, than having frameworks and identifying a risk of using such with later packages, which are actively changing. As you experienced yourself, things get broken as you pointed out. There is nothing more to it. :)

    Expanding upon
    We have somwhere on the forum, source of well developed physics framework in DOTS. It was maintained to the certain point. Then consider first DOTS FPS samples, or even Megacity. People get really upset, when they find out, resources are not going to be maintained and kept up to date. It was just few months, or so, when each of them stopped being compatible with later evolving entities packages. Hence maybe you will see my reasons for concerns?

    Identifying risk early, helps to mitigate it, as you aiming to do so. Which is great.
    Again, I am not against such works, as each is great learning source. I do kindly investigate such, when I got a time. But I am looking at the matter realistically and I hope you see my point now. :)
     
    Last edited: Oct 30, 2020
  23. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    Even more important than writing good code, is being a good person to work with. Unfortunately, this kind of thing does not make a good impression. I hate to say it, but I would have to think twice about using code if it’s author was responding to people this way. I have nothing against you, and I’m not saying this was your intention. But maybe it’s not a good idea.
     
  24. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    I don't want to step into the middle of anything here, but this has taken a really dark turn and fast.

    I don't post a lot on the boards, but I've spent a lot of time lurking in the DOTS forum over the past year and I've seen all three of your handles (DreamingImLatios, Antypodish, PublicEnumE) show up repeatedly asking and answering questions on the threads. I have to say it's a bummer seeing such negatively breaking out in the community.
     
  25. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    You’re right. I don’t mean any animosity here, and I’ll back out. I always appreciate people sharing their code, and @DreamingImLatios, you’ve done a ton of good here on these forums - sharing code, bringing up important issues, and helping folks by answering their questions - including mine. I didn’t like your response here, but that’s all. I probably poured gas on a fire, and that’s not helpful.
     
    florianhanke likes this.
  26. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    I am probably overthinking it. And I do get your point. In fact I agree with it. I just don't know why you decided to tell me that. I appreciate you clarifying that it wasn't intended to be malicious. And I'm sorry that I offended you and everyone else in trying to figure that out. :oops: My goal was to tell you where my thoughts were so that you could answer my question in a more helpful way. I still think understanding why you decided to type out your thoughts the first time (I fully understand your subsequent replies) could potentially lead me towards new solutions to further reduce risk for such projects. But I will leave that up to you. PM is probably better though.

    To everyone else, I encourage feedback. And I fully recognize I am not perfect and sometimes you may need to call me out in order to help me reach an understanding. If you would like to discuss more, please PM me. I'm here to grow and improve, and appreciate any thoughts or tips you can provide.

    And to avoid this issue in the future, if you are going to make a negative comment on this thread about what I am doing for the sake of discussing a more general problem rather than something I should take as direct feedback, please indicate as such. Otherwise I am just going to be really confused and say dumb things again.
     
  27. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    @DreamingImLatios No worry, we are good. Thx :)
    I will try to be more clear next time.
    All best in the project :cool:
     
    DreamingImLatios and PublicEnumE like this.
  28. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,683
    Strange last part of this thread :D Things just happen, no matter what @Antypodish intended or how @DreamingImLatios get it, bad days happens and everyone can take something wrong because of mood, especially at Autumn :D Just deep breathe and move forward ;)
     
  29. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Latios Framework 0.2.1 is officially released!
    This is a patch release that supports Entities 0.16.0.

    There are no new features as this just resolves some breaking changes.

    Link Here

    Enjoy Entities 0.16.0 and stay safe!
     
  30. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I just want to say -- thanks for releasing this framework!

    Honestly, I am trying to get back into DOTS and ECS again, as I took a hiatus due to life (and waiting for the technology to actually evolve a little). However, I am stumped right now as to whether or not DOTS has actually evolved that much. D:
    After looking through your github, it looks like you've been writing your own version of using DOTS that may or may not be compatible with Unity's "grand vision" in the end.
    I say this because, as far as I can tell, you've been doing more with DOTS than it appears Unity has been since I last took a dive into DOTS / ECS methodologies. The fact that we don't have scene/subscene references, or basic things like decent physics / animation (provided by default) right now bothers me. However, it looks like you are really tackling this in a bit-by-bit fashion with your framework -- which is awesome.

    For those of us who have been out of the loop with DOTS, I was curious what kind of things are coming with DOTS, and what kind of things we will probably have to wait a while for -- and for the latter stuff, I would like to know where making a full-on game with DOTS would need to compromise on (with and without your system) in order to supplement that with a Mono equivalent?


    I want to get started with understanding your framework, but I'm afraid I don't have enough current knowledge on DOTS to actually get me up to speed with what it can (and cannot) currently do in terms of more full-featured games. In particular, I am trying to establish the expected workflow with DOTS as it currently stands.
    You mentioned possibly streaming some stuff, so I would also like to see you showcase some of what your system can do in regards to scene loading and/or unloading, or making entities behave in a certain way (locally and globally), etc. I am working on a trait-based Unity Editor tooling system right now, with ECS as the core, but I'm curious as to how (or if) an entity can be processed with a (dataless) component, for example -- especially at the bit/byte level -- w/DOTS, for example.
    Please keep in mind that I am a programmer -- but only out of years of necessity. I am more of a designer at heart, and as such, I'm just looking to understand how I might design my own visual tools with ECS and DOTS as the foundation technology. I am trying to understand the current state of the technology before I jump into that though, so any examples on how to handle and understand the low-level side of DOTS and/or ECS with your framework as an example would be greatly appreciated! :)

    Your docs are amazing btw! :)
     
  31. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Wow! Thank you for the kind words! I'm really glad you like it! Such comments make my day! :D
    Hard for me to speak in the context outside of my framework. There are other veterans on these forums that can better answer to that, though I suspect they have similar but different solutions to the problems this framework addresses.
    If you have a specific game idea, I can tell you what parts have high-level functionality already implemented by Unity, what parts I may have solutions for (or solutions in the works), and what parts you would be on your own for. Games just have too wildly varying requirements for me to give you a good answer without context.
    While this unfortunately doesn't fully demonstrate the power of streaming (the code is there other than some subscene caching bugs, but I haven't invested the time to design levels that use it), I do have a game project that I have made public and is one of the main projects I've been using to sort of "battle test" this framework. It is at the point where new ships and levels can be added to the game without touching a single line of code. The repository for it is here: https://github.com/Dreaming381/lsss-wip/tree/master
    If you would like a personal tour of that repository and how it all works, PM me and we can work out a time to meet through Discord. :cool:
     
    NotaNaN, bb8_1 and florianhanke like this.
  32. InfiBatnisGame

    InfiBatnisGame

    Joined:
    Jun 26, 2019
    Posts:
    17

    Attached Files:

  33. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    What GPU are you using? Are your graphics drivers up to date?
    One thing you could try is in SpaceSkyRenderer.cs, changing lines 39 and 89 from 4096 to something small like 512 or 1024 (keep them the same).
     
    bb8_1 likes this.
  34. InfiBatnisGame

    InfiBatnisGame

    Joined:
    Jun 26, 2019
    Posts:
    17
    My GPU are using GTX 950, i7.3, and my driver is up to date.
    Thank DreamingImLatios, Change to 512 or 1024 can solve the problem.
     
    bb8_1 likes this.
  35. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    77
    Btw, I yoinked the box collider code from lsss, and it works great. Thanks.
     
    DreamingImLatios likes this.
  36. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Latios Framework 0.2.2 is officially released!
    This is a patch release that supports Entities 0.17.0.

    • Core
      • Burst Patcher has been deprecated and now needs the scripting define symbol
        BURST_PATCHER
        to be enabled. I doubt anyone was using it for custom jobs, but if you were, please reach out to me as there are better solutions available.
      • Bootstrapping bugfixes
    • Physics
      • To support 2020.2 users, the new FindPairs dispatcher has been backported. This includes a new
        ScheduleParallelUnsafe
        option as well as new safety diagnostics that make it a lot harder to mess up. Normally I don't like to add new features to patch releases, but this is a common codepath in my projects and I have some confidence in it.
      • Several bugfixes, including ones I forgot to backport to [0.2.1]
    • The README pages with the roadmaps have been updated.
    Link Here

    As for the fabled version [0.3.0], it is coming. I'm spending much more time than I originally planned to ensure that the new Audio package is built on a solid foundation.

    Anyways, if you are hyped for [0.3.0] and want to help make it arrive faster, please PM me! Zero programming skills are required to cut my time until ship by half! :D

    Enjoy Entities 0.17.0 and stay safe! :cool:
     
  37. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Latios Framework 0.3.0 is officially here! - Link
    This is a feature release targeting Entities 0.17.0. Feature releases contain breaking changes, so please read the Upgrade Guide if you are already using [0.2.2].

    Overall Highlights
    There were three goals I had hoped to achieve in this release:
    1. Improve compatibility with other DOTS projects
    2. Rename packages and tools for better clarity and consistency
    3. Reduce latencies caused primarily by sync points
    Compatibility
    Even though the Latios Framework has its own physics module (still a work in progress), many people would prefer to use Unity.Physics or Havok.Physics instead. This is supported and has been for a while. What is new is that many features that have side-effects can now be disabled. See this compatibility guide for more info.

    In addition, the built-in systems are now much more injection-friendly!

    Package Names and Tooling
    What did Latios.Physics mean to you? Was it an alternative to Unity.Physics? Was it an extension? It was annoying to have to type "Latios.Physics" to differentiate it. So I renamed it to something much more unique that helps set it apart as a different solution with different ways of working. It is called Psyshock now. And Audio is called Myri. The names will make it easier to have conversations and also easier to search on Google and these forums.

    As for tooling, all authoring components have been categorized under Latios and organized by module. That should make finding them a lot easier.

    Sync Point Management
    Just for comparison, here is what a stress-test frame looked like in LSSS [0.2.0]:

    Todo: I need sleep. Will edit this post with images tomorrow.

    And this is what that same stress-test looks like in LSSS [0.3.0]:

    Todo: I need sleep. Will edit this post with images tomorrow.

    It is quite the improvement!

    Core Highlights
    This release introduces custom command buffers:
    • EnableCommandBuffer - including LinkedEntityGroup
    • DisableCommandBuffer - including LinkedEntityGroup
    • InstantiateCommandBuffer - can add and initialize components to the new entity faster than ECB
    • DestroyCommandBuffer - is sometimes faster than ECB
    In addition, these can be acquired using latiosWorld.syncPoint and are played back at the beginning of the frame.

    Psyshock Physics Highlights
    Box Colliders are here! Now you can have flat things! They use a custom algorithm loosely based on SAT.

    Myri Audio Highlights
    This is an entirely new package that drives DSPGraph audio using pure ECS. It has the following major features:
    • Oneshots
    • Looped
    • 3D Spatialization
    • Automatic Voice Combining
    • Fully job and Burst-compatible asynchronous API
    • Worker-thread execution during a Sync Point
    • Multiple Listeners
    • Zero-Code Playback

    LSSS
    LSSS also received an update. Check it out and hear Myri in action!

    Feedback Wanted!
    Outside of patch releases and bug fixes, I will be taking a break from heavy development to catch up on life things. In the meantime, I would love feedback! Specifically I would love to know the following:
    • Bugs
    • Roadmap feature prioritization requests (The roadmaps are in each module's README page at the bottom)
    • New feature requests
    • Optimization requests
    • XML documentation requests
    • Markdown documentation requests
    • More samples requests (mention the feature you wish to see samples for)
    • Videos?
    • Some other way I can make this framework better?

    Currently my plan for [0.4.0] is to focus on the existing modules and fill out their APIs and optimize them. I will likely be doing this development in LSSS still. ETA September.

    Enjoy the new release!
     
  38. jasons-novaleaf

    jasons-novaleaf

    Joined:
    Sep 13, 2012
    Posts:
    181
    Congrats on the release! I am excited to give your framework a try once I"m able to spend time on gamedev again.
     
    DreamingImLatios likes this.
  39. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    I think I found another bug(forgot this thread was created so probably a better place to discuss this), audio doesn't appear to work in a build created with the new build pipeline package(com.unity.platform.windows), but its fine using the old one from the file menu.

    Not really sure what else to add, its just a simple scene with a looping audiosource playing. Nothing in the player log to suggest anything isnt working.
     
  40. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    That's really weird. LSSS uses the new build pipeline. I guess I haven't tried making a build in 2020.3 yet (been super busy with some projects that don't really require building). I'd be curious if you experience the same thing using 2020.1.9f1. Regardless, I will let you know if I manage to reproduce it!
     
  41. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    Interesting, I just did a test using 2020.1.9f1 and it appears to work properly using the new build pipeline. Updating that same test project to 2020.3.9f1 results in no audio in a built player with the new pipeline so the editor change could be the culprit.
     
    DreamingImLatios likes this.
  42. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Hi everyone!

    I finally finished this video that I have been working on for the last couple months. It is a little dense, but hopefully it answers a lot of questions people have regarding this framework.


    This also means that I will finally start development on new 0.4 features. I haven't decided what all I want to squeeze into that release, so feel free to share your thoughts!

    0.3 will still continue to receive bugfix and compatibility releases until 0.4 is released.
     
    NotaNaN, temps, exiguous and 6 others like this.
  43. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    cool, Definitely interesting. My only concern is the audio quality on the myri audio on the video. For me it had lots of noise. Is it because of the audio is not good or why? One other thing is naming. I'm still confused about the black board entities and the problem they solve.

    For me the interest would be on the audio and physics, but I would require a lot bigger fps than 60 on the kind of scene there was(find pairs). Or is it just capped by vsync?

    Thanks for the video.
     
  44. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    Its nice to see more stuff coming to ecs.

    I think some ecs based audio manager like the myri audio would be good for the assetstore.
    Currently I use the Darktonic's Audio manager.

    Also some stuff with the ecs based unity physics is way too hard to make, but I tink Unity is working on making it better.
     
  45. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    There's two main causes for that noise. The first is that when the audio source clip has a different sample rate than the sound card output (typically 44.1 kHz vs 48 kH), then Myri has to do interpolation of the input audio source while sampling. Myri doesn't store a play head for a clip, and instead records the time the clip started playing in samples, so if the sample rates don't match, it has to recalculate the playhead taking into account that mismatch. And, well, I screwed up that calculation for looping sources. :oops: I hope to have a fix in place for that this weekend. The other issue is that Myri doesn't have any limiter or compressor or anything to prevent the audio from peaking. So if the audio peaks, that makes some hideous crackles. I'm not an audio engineer. I only made Myri out of impatience for a better solution. So this is an area that will require research and/or assistance.

    A "blackboard" in a programming context is a data structure where anything with access to it can write arbitrary data to it as a means of information exchange. Blackboard entities solve a similar problem to singletons, but handle memory footprint, lifecycle management, authoring, and side-effects more elegantly.

    That video was in play mode in the editor with safety checks enabled. I even left the safety checks enabled in the profiler since it made it easier to see the difference multi-threading had. I don't remember if v-sync was enabled, but at least half the frame time was consumed by the editor once multi-threading was enabled. FindPairs runs about half as fast as Unity Physics BVH when using default settings. But when the settings are properly tuned for the game, I've seen it outperform Unity's BVH by 5x. I'm hoping with the next round of optimizations it will outperform Unity's solution using just the default settings on lower-end systems (the default settings are capped at 9 worker threads).

    They have been getting better. But progress is slow and there's still some fundamental design choices which are incredibly problematic for certain use cases. I have ranted about that in other places, including the docs, so I won't rant about it here. But I am curious what you find "way too hard"?
     
    mikaelK likes this.
  46. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    Like basic trigger and collision physics or just doing some really basic stuff is super easy with monobehaviors. I have not been digging too much on that part though. Only some basic explosions. Just remember time when I was looking if I could do something really quickly and it just opened a new world to physics programming. :D
     
  47. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    There are three reasons why that is so easy.
    1) UnityEngine Physics is stateful.
    2) The UnityEngine Physics API is single-threaded.
    3) UnityEngine internally manages transforms.

    I don't think Psyshock will ever reach that high-level API usability (by design, such an API should be possible to build on top of it, but at that point most people will opt to build a custom layer tailored to their game, which is one of the main goals of Psyshock). However, my hope is that with strong API design and documentation, that the lower-level code isn't so scary. So if something isn't intuitive, please let me know!
     
    NotaNaN and mikaelK like this.
  48. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Latios Framework 0.4.0 is officially here! - Link
    This is a feature release targeting Entities 0.17.0. Feature releases contain breaking changes, so please read the Upgrade Guide if you are already using [0.3.3]. The changes are relatively minor this time around.

    Overall Highlights
    There were three goals I had hoped to achieve in this release:
    1. Make a multithreaded RNG solution with fewer compromises
    2. Break ground in physics simulations and character controllers
    3. Fix Myri's major quality issues
    Core Highlights
    This release introduces Rng and RngToolkit. Whether you realize it or not, most of you are probably making some compromise with how you are handling random numbers.
    • Random per entity - Bandwidth costs and seed bookkeeping to keep entities unique
    • Random per system / singleton - No multi-threading
    • Random in global array - Often implemented with [NativeThreadIndex] which is non-deterministic
    The solution I'm bringing in this release makes none of those compromises, and has a simple API and workflow to make random numbers in DOTS easy.

    Psyshock Physics Highlights
    Point Queries and Collider Casts are two big additions. You can even ColliderCast a CompoundCollider. It is slow, but it is there.

    There's also some new stuff for character controllers and simulation logic. It is still pretty light and experimental, but expect more development over time.

    Myri Audio Highlights
    Myri now has something called a brickwall limiter. What it does is automatically balance the final output volume to avoid distortion artifacts. There's a new LSSS build that has this new feature. You'll notice on the more intense missions that the audio doesn't completely glitch out and hurt your ears anymore. The limiter is automatically enabled at all times, so you don't have to make any changes to your code to use it.


    Feedback Wanted!
    I appreciate all the feedback and support you all have provided so far! Seriously, I would not be making these public releases if it weren't for the kind words and praise from this community.

    With that said, regardless of whether or not you use Latios Framework, I ask that you please take this survey.

    I tried to set it up to only ask you questions that are relevant to you. It should hopefully take about 20 minutes or so, but feel free to take as long as you like or skip questions you don't want to answer.

    This will really help me out in future development!

    Enjoy the new release!
     
    mikaelK, MehO, awesomedata and 11 others like this.
  49. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Congrats @DreamingImLatios , excited to check it out!
     
  50. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,219
    Hey everyone!

    There's a new bugfix release: [0.4.1]

    The fixes are for Psyshock queries. I had to come up with some new algorithms for a couple of them, which I have detailed in a new Optimization Adventure article. Normally I don't announce bugfix releases, but it is about time for an update and I have a lot to talk about. But first, I think a lot of you missed in the last post that

    There is a survey!

    If you use DOTS, even just experimentally, please take it. I'm trying to learn how to best spend my time so that this can become something more than my own.

    Based on the few response so far, I am currently assuming these three things:
    1. People want features above all else
    2. Users are torn about whether or not I should raise the minimum supported Editor and Burst versions
    3. We might still be waiting a while for a new Entities release
    So with those in mind, here are my thoughts about the remainder of 0.5 development:
    • LSSS - Low priority. I am working on two private collaborative projects which I am using to develop and test new features. That means if you want the latest experimental snapshot, you may have to ask me directly.
    • Core - Low priority. With the long gap between Entities releases, there's too much risk to devote time here.
    • Psyshock - High priority. Unfortunately, Collision Layer queries are gated on a newer version of Burst, so development is focused on new collider types, query operations, and simulation utilities.
    • Myri - Medium priority. Myri is in a really good spot. It seems the biggest complaint is actually the editor experience. I want to outsource this.
    • Kinemation - Wow. Just wow. This wasn't the original plan, but I am going to start working on this now! Just please be patient with me, because it may take a couple releases before it becomes usable.
    • MachAxle - I am looking to outsource the editor experience for this too. If I find someone, this will become fairly high priority and will hopefully be quick development since I already have much of the conversion and runtime designed. But right now it is low priority.
    • Videos - I have a new video idea, and pretty much all the code is written for it. But I am looking for a level design, VFX, and sound artist to help show it off the right way.
    Also, for anyone who is interesting in contributing, please PM me when you are ready, and we can find something that aligns with your goals and interests.

    Did you know that originally Psyshock was going to be an add-on for Unity Physics? Yeah. That didn't work out. That's not because I'm a bad programmer nor because Unity Physics sucks (it doesn't). It is simply because my use cases don't work well with what Unity Physics aims to be. I'm not the only one facing this. Some people absolutely praise Unity Physics, and others dislike it. That has nothing to do with the skill of the developers. It is purely dependent on the project and goals. Sometimes what makes or breaks it depends on specific details of the project that may not be commonly discussed. Anyways, my goal for Psyshock is not to compete with Unity Physics. If Unity Physics works well for you, please continue using it and feel free to provide feedback for how I can make it work well with the rest of the framework. But for the rest of you, Psyshock exists to solve the use cases Unity Physics struggle with. Many of these struggles are architectural in nature and not easily fixed by Unity without some sort of compromise. I often compare Psyshock to Unity mostly to help identify the differences so that those struggling with Unity Physics can better gauge whether or not Psyshock may help them overcome their struggles.

    The reason I am pointing this out is because you will likely see a lot more code from Unity Physics borrowed in Psyshock. Most of these are backend algorithms which don't affect the architectural differences. I've always done this even back in the 0.1.0 release, but now I am borrowing larger and more complicated algorithms as I look to support more complex colliders and simulation. Hopefully that clears some things up.

    The hype for Kinemation is real. I don't know how it happened or why, but I appreciate it. It is time I talk about what it is going to be in a bit more detail.

    First, Kinemation will primarily be focused on character animation. While I may eventually support some utilities for general-purpose animation, it likely won't be automatic the way animation in Unity has worked in the past (and may work in their animation package).

    Kinemation will be composed of five layers:

    Layer 1 - Rendering:
    The first layer is the actual skinning and rendering process. The API for this will be similar to Myri in that it will be very automatic and hopefully "just work". Unlike Unity's current DOTS animation, Kinemation will be much more coupled to the hierarchy. Character customization and weapon parenting should be possible.

    As for skinning and shaders, I plan to support multiple modes. All modes with the exception of vertex shader skinning variants will be compatible with shaders using Shader Graph's Compute Deform Node or equivalent. I will also try to provide utilities for people who prefer to write shaders from scratch. The rendering will make use of Hybrid Renderer V2's rendering path, only replacing the skinning process.

    And as for skinning modes, I plan to offer vertex, compute, and CPU skinning using various techniques like linear blending, dual quaternion, and some variant of direct delta mush. I may also implement texture skinning if none of the other techniques are performant enough to handle large crowds.

    Blend shapes will be supported.

    Layer 2 - Animation Sampling and Mixing:
    The second layer is responsible for sampling and playing animations, as well as any blending, IK, and other things. The API will be much like Psyshock, immediate, and giving you complete control. That means no graphs, no rules, and no automagic.

    You'll be able to work either with raw animation buffers for fast blends, or with the hierarchy data for things like IK. Switching back and forth will be possible, though will come at a cost.

    As for animation compression, I won't be using traditional animation curves (except for authoring). Instead, I plan to use a bit compression algorithm which should work a lot better.

    Layer 3 - Procedural Animation:
    The third layer is where the uniqueness of Kinemation starts to come into play. This will be a special set of API similar to Layer 2 that allow for much more advanced procedural animation. For example, a system may control the arms and hips of a character to correct for center of balance while the character is walking on a tightrope or catching a ball.

    Layer 2 will allow baking custom animation parameters to control weights of the procedural animation.

    Layer 4 - Authoring:
    The fourth layer is an in-Editor playmode (and maybe standalone?) authoring experience. It will offer physics guides and the actual game environment to allow you to animate in-context, leveraging any game logic, blending logic, physics, and whatever else. As this will be play-mode centric, I am also thinking of making a VR editing experience.

    Layer 5 - Proprioception:
    The fifth and final layer is a special utility for providing "conscious smarts" to animation. Metadata and AI can be used to choose animation clips, retime them, or adjust procedural parameters and IK targets. This kind of logic can be used for NPCs to squeeze around players, characters to wipe hair from in front of their face, or even allow high-energy personalities to skip the last three stairs when running down them.

    It will probably be a few years until I get to this layer. But it is the eventual goal, and I am not aware of any technologies that do this well today.


    Anyways, that's everything going on with Latios Framework that I can share. Feel free to reach out to me if you have any comments, questions, or feedback!