Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

DOTS Navigation

Discussion in 'AI & Navigation Previews' started by Onigiri, Oct 10, 2019.

  1. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    Hi! I would like to know i there any plans to make DOTS compatible pathfinding system and agent?
     
  2. NicoFXU

    NicoFXU

    Unity Technologies

    Joined:
    Jun 25, 2016
    Posts:
    4
    We will be moving navMesh to DOTS in 2020, together with some code re-org and new features. It 's a long undertake so we do not have a delivery date yet, but work will start in January of next year.
     
    M_MG_S, Radivarig, _Prism_ and 17 others like this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    what's the alternative if we want to do navigation in ECS?
     
  4. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    417
    There is a NavMeshQuery API, but it's limited ATM
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    thanks. any examples I can quickly evaluate?
     
  6. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    417
    Here's one https://github.com/zulfajuniadi/unity-ecs-navmesh.

    Basically, for NavMeshQuery, you instantiate an instance of it from a NavMeshWorld, which you can obtain through NavMeshWorld.GetDefaultWorld(). Put the NavMeshQuery instance in a job, and call its API. The API is very incremental - you have to call, in order, BeginFindPath, UpdateFindPath (this one multiple times if needed), EndFindPath, GetPathResult, each of which returns a PathQueryStatus, which you can use to check how well the pathfinder is faring. There's more in the official API documentation. Unfortunately, GetPathResult only returns an ordered list of PolygonIds. Fortunately though, you can use https://github.com/Unity-Technologi...ressTesting/Assets/Scripts/Utils/PathUtils.cs to turn the list of PolygonIds into a list of waypoints! PathUtils is even jobifiable and burst compatible with a bit of modification. Overall, while far from complete, there is just enough code and libraries out there to achieve DOTS navigation.
     
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Even once you get the straight path it's still in 2D not on the surface, you have to use yet more low level api's to do it correctly. All told it's a lot of work to get a system working to the equivalent of the standard navigation api. Unity's own demo's don't do it all right, none of the user submitted open source stuff does it all right.

    And it doesn't handle the crowd logic, so there is that.

    Just to be informed before diving into it.
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    very low level, very nice, thanks for the details
     
  9. reeseschultz

    reeseschultz

    Joined:
    Apr 1, 2018
    Posts:
    21
    Last edited: Jun 1, 2020
  10. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi. Any new update?
     
  11. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    No update to share.
     
    optimise likes this.
  12. dansyrotyn

    dansyrotyn

    Joined:
    Oct 16, 2012
    Posts:
    15

    This is very interesting dude, thank You!
     
  13. DirectCherry

    DirectCherry

    Joined:
    May 29, 2019
    Posts:
    4
    Does anyone have any knowledge as far as how to make the path travel along the NavMesh surface rather than directly between the points?
     
    Last edited: Mar 6, 2020
  14. Plummers

    Plummers

    Joined:
    Oct 29, 2015
    Posts:
    35
    Hi, just wondering if there will be a preview package soonish or am I better off going with reeseschultz' work around? Don't want to redo a lot of work if it's due shortly.

    Many thanks, keep up the great work
     
  15. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    69
    No, there won't be any Navigation package published any time soon.
     
    Tanner555 likes this.
  16. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    Sad. There are still plans for dots navmesh in the future or it's has been cancelled?
     
  17. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    either the rats are leaving the ECS ship (unlikely) or something radically new and awesome is about to happen like full voxel based GPU realtime navmesh (also unlikely)
    either case stick to today's tech, we know the bugs and monobehaviors have tons of life left in them
     
    phobos2077 likes this.
  18. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    69
    We continue working on aspects of DOTS NavMesh but we don't have news to share at this point.
     
  19. DrBoum

    DrBoum

    Joined:
    Apr 19, 2020
    Posts:
    26
    any info on DOTS navmesh ? can we expect anything for 2021 ?
     
  20. Gen_Scorpius

    Gen_Scorpius

    Joined:
    Nov 2, 2016
    Posts:
    65
    I'm pretty sure the internal plan for public preview release has been moved to 2021 but depending on what obstacles they have to overcome it could very well take even longer than that.
     
  21. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    345
    Does it generate navmeshes at runtime?
     
  22. reeseschultz

    reeseschultz

    Joined:
    Apr 1, 2018
    Posts:
    21
    My package relies on the existing tooling for NavMesh generation. As you may know, that can take place at authoring or runtime. I wouldn't recommend much runtime generation with the existing tooling, but if someone were to DOTS-ify generation with the new mesh API, then that would make a huge difference in terms of performance. I don't have the need for runtime generation in my other projects (and thus no incentive to implement it), but if someone were to create such a package I would be happy to integrate mine with it. I'm also open to PRs.

    In my demo scenes, such as the one in the quote, I'm showing that nav meshes can be transformed (without being regenerated). Really, all my code is doing is figuring out how the agents should move in conditions such as that. In "normal" conditions, you can just think of it as multi-threaded, 3D path-finding.
     
    Extrys and Egad_McDad like this.
  23. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    345
    I see, well i could take a look!
     
  24. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @adriant. Any new update? What's the ETA of releasing preview package?
     
    phobos2077 likes this.
  25. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    69
    Hi, I don't have any news. It's still too early to talk about a preview package.
     
  26. Deleted User

    Deleted User

    Guest

    Any News or Updates yet?
    My project is still waiting for the DOTS-NAV-MESH!
     
  27. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Any update on DOTS navmesh? Any rough estimates for the preview package? 2021? 2022? 2023?
     
    Mikael-H, Anthiese and phobos2077 like this.
  28. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Checking in again to see if DOTS is coming to unity navmesh. This is a must have IMO for any game that is larger then a few units and a small area.
     
    Tanner555, Orimay and phobos2077 like this.
  29. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    350
    I think at this point your are expected to write your own ECS navmesh from scratch...
     
  30. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    That's fine I suppose. It looks like it's been done a few times.
     
  31. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @adriant. Any new updates of DOTS Navigation first preview package version soon? Is that implemented in pure DOTS way?
     
  32. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    @adriant any chances we will get something with DOTS 0.5 or 1.0?:)
     
    MoonbladeStudios and phobos2077 like this.
  33. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Any updates on this?
     
  34. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    @reeseschultz Is it possible to do navmesh cutting at runtime with your package (like when the player places a building in an RTS)?
     
  35. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    RIP DOTS Navigation
     
    DwinTeimlon likes this.
  36. reeseschultz

    reeseschultz

    Joined:
    Apr 1, 2018
    Posts:
    21
    Hey @lclemens. In my GitHub repository, there are two packages at this time: navigation (heavy) and pathing (barebones). Both of them are interoperable with (and depend upon!) Unity's conventional NavMesh tooling, so stuff like obstacle carving is supported. Use these packages at your own peril, as they depend on experimental APIs. Be aware that I'm considering big changes for the future of my Unity packages, including how they're maintained.

    @Onigiri, navigation is a massively broad umbrella term for a plethora of divergent use cases (hence why I regret the name of one of my packages). I'm of the opinion that Unity should not build a monolith; they should focus on low-level, DOTS-compatible tooling, so folks can use it to make purpose-built middleware. This product board seems to indicate that low-level APIs actually are the focus. Note, for example, the "queryable navigation model," where the plan is to have:

    An enhanced set of API methods for querying the navigation data in greater detail than before, compatible with Unity’s Job System.

    I have concluded that it is enough for Unity to reconcile NavMesh and grid-based, low-level APIs, with Jobs and Burst. I am highly skeptical of incorporating ECS into any low-level or middleware solution, at this point, because there are two major ways to use it. There's the approach I prefer, which is basically using components in terms of state machines (I wish we had a GUI for that). To my knowledge, that approach is, however, less performant with Unity ECS' memory model than maintaining the same set of components on an entity for its entire lifetime. To understand this issue better, please see this blog post comparing two Rust-based ECS frameworks, Specs and Legion. I am aware of a technical solution that accounts for both approaches; I believe it has been (or is being) incorporated in Legion, which is used in the Amethyst game engine. Someone correct me if I'm wrong.

    Anyway, for Unity to build out a high-level navigation solution, users would likely expect components and systems, in terms of ECS, to go along with it, not just for it to simply be compatible with ECS. I built something with ECS, literally for free, and users were still dissatisfied because they disagreed with my assumptions/opinions. I am convinced there is no way Unity can do something similar without major backlash, so I would warn against it, at least without a few more years of R&D. Third-parties can build out middleware in the meantime that caters to different audiences via open source, sponsorware, the asset store, etc.
     
    laurentlavigne, DrBoum and lclemens like this.
  37. OrientedPain

    OrientedPain

    Joined:
    Mar 26, 2018
    Posts:
    50
    Any updates or news?
     
    Radivarig likes this.
  38. boyaregames

    boyaregames

    Joined:
    Jun 23, 2021
    Posts:
    76
    Really? Still nothing?
     
    OrientedPain likes this.
  39. OrientedPain

    OrientedPain

    Joined:
    Mar 26, 2018
    Posts:
    50
    I hope Unity 6 will have DOTS Navigation.
     
    MoonbladeStudios likes this.
  40. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    XD
     
    dannyalgorithmic likes this.
  41. Radivarig

    Radivarig

    Joined:
    May 15, 2013
    Posts:
    121
    This guy is making dots navigation since 2020
     
    OrientedPain likes this.
  42. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Well since this thread is being resurrected, I'll toss in a few updates that have happened since it faded out (let me know if I missed some).

    • There is now a paid asset called Agents Navigation by Project Dawn that works well and is trivial to setup in a pure ECS environment. It also supports local avoidance.

    • A* Pathfinding Project now has a "FollowerEntity" option that sorta works. It still uses managed code in places, but it's a bit easier to setup than before. It also supports local avoidance (RVO).

    • We also still have some opensource repos by reeseschultz, zulfajuniadi, enzi, bustedbunny, ForgingStation, and others.

    • Unity still has nothing new. The NavMeshQuery API is still supported and used by a lot of the github solutions.
     
    Last edited: Mar 14, 2024
    Radivarig and OrientedPain like this.
  43. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    100
    LOL
     
  44. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Ooooo guys - tertle might be releasing a badass DOTS nav package called Traverse soon. If it even matches half of what I've seen, it's going to blow everything else away in terms of performance and it'll have more features plus local avoidance. The time frame is soon™ so it's hard to tell how many months that might be, but from the videos it looks like the main core is finished.



    Screenshot_20240324-032629-622.png image-2.png image-1.png image-3.png
     
  45. boyaregames

    boyaregames

    Joined:
    Jun 23, 2021
    Posts:
    76
    It is cool ofc but navigation is the most basic thing in a video games and MUST be out of box for FREE for all.
    Its a shame that SOLO devs can do such things but multibillion company cant in a span of 6 years (XD, LOL)