It’s going to be quite a lot of work doing everything that Detour had done for the crowd simulation (from nearly 2 decades ago) and dynamic obstacle navmesh-regeneration aspect (which typically uses tile caches and therefore requires recast tiles to be used instead for generation) . I do have a working playcanvas script that even does fast realtime navmesh cutting with moving dynamic convex obstacles hovering/moving over a navmesh, albeit because the mesh isn’t re-gegenerated/recalculated within tiles but temporarily cutting existing geometry, it might end up with less optimal graphs due to that. This does allow paths to be calculated around dynamic obstacles easily on the fly in real time, though.
When it comes to crowds like what Detour does,. local avoidance constrained within navmesh is one aspect from a general perspective, another aspect is (note: just an idea i thought off but have not proven) actually combining it with something like flowfields like in this paper when it comes to flocking a bunch of units across the funnel of navmesh polygons towards a given destination… http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.68.875&rep=rep1&type=pdf and then maybe using something like https://howtorts.github.io/ (but uses navmesh to define flowfields rather than grid…). (. Again, this is something that is veering more towards app-specific territory since not all apps would need crowd flocking within navmesh either.). To also implement something like that on a detour-crowd like scale, would also requiring managing of agents, their paths, and their destinations themselves, and thus a system must be set up like:
Managing groups of moving units within a stipulated navmesh path funnel also means that a crowd agent might end up being pushed out of the given funnel route towards his destination node (due to other forces like seperation/alignment) and finds himself “dislodged” into another new node outside of the funnel, he will have to retrieve from cache/recalculate+store in cache, a new flowfield starting branch path to the same destination from the new node he finds himself in. Thus, a structure of reusable flowfield branches (of diverging and converging flowfields) must be created. Purpose of flowfield caches is to ensure no duplicate navmesh polygon flowfields are duplicated unless they differ within each agent’s starting to ending location path context. Thus, a flowfield within a current node polygon is defined by it’s unique ID of: (From Node) to (Current Node) to (Next Node)" and the stipulated movement direction vectors at each vertex of the Current Node polygon in relation to From Node and Next Node. The flowfield force of the agent is defined by the barycentric weight of the agent’s location in relation to those directional vectors at each of the navmesh’s Current Node polygon vertices. I think combining local navmesh polygon flowfield forces (for the navmesh constraints) + local avoidance (to prevent agents from bunching up) might allow agents to flock fairly properly within a navmesh.