Mieszko Zielinski, Lead AI Programmer, Epic Games —
UE4 Large World AI Navigation
Mieszko Zielinski, Lead AI Programmer, Epic Games
UE4: навигация AI в большом мире
2. RecastbyMikkoMononen
Best thingthathappenedto gameAI navigationsince sliced
bread!
• Lightweight,fastand open-source!
• De facto industry standard
• Resurrected and availableon github
https://github.com/memononen/recastnavigation
3.
4. UE4 Navigation parts
• Navigation bounds volumes
• Navigation relevant actors
– geometry & other data (links,areas)
• NavigationOctree
– stores navigation-relevant data
– speeds up gathering relevant data for specific navmesh tile’s
generation
7. GDC Demo Map, 256 km2
Naive approach
Navigation Octree ~10.3GB
NavMesh ~500MB
Plus~30 minutenavmesh generation(8 core machine)
And requires loading alllevels for navmesh generationpurposes
This, of course, is useless.
8. Whyit was so much?
• Empty NavMesh tile- 176 bytes
• 10000 tiles,~50kBeach, 16000uu x 16000uu
• Every piece of navigation-relevantdata kept in Navigation
Octree
12. No worries!
Low-hanging fruit solution
• We don’t need allof navmesh allthe time
• We need only the nav octree information required by tiles we need
13.
14. Applied to UE4 Navigation System
• Navigation bound stay the same
• Navigation octree to store only the data relevant “now”
• Introduce a way to communicateto Navigation System where
navmesh isrequired
15. Navigation Octree
• Lazy geometry gathering
– outside of game thread
• Landscape slicing
– never stored in octree
– constant cost, outside of game thread
18. GDC Demo Map, 256 km2
Naive approach At GDC
Navigation Octree ~10.3GB 572MB
NavMesh ~500MB 31MB
The endresult still not ideal
But we’re not done yet! :D
19. Futurework
• Don’t store anythingin nav octree unless it’s necessarry
– Currently only geometry is treated the smart way
• Moveable navigationbounds
• Give lazily gathered octree data a lifetime limit
• Multithreadedlazy geometry gathering
Lightweight, fast and open-source!
Lots of companies included it in their own source code and featured it up.
De facto industry standard
No excuse to have anything worse when Recast is FREE!
Resurrected and available on github
https://github.com/memononen/recastnavigation
Navmesh size:
And that’s after bumping Tile Size from 1600uu to 16000uu
Before the change empty navmesh was consuming ~168MB (1 million tiles)
Landscape the biggest nav octree offender
What could we do about this? Obvioulsy, look for.. Low handing fruits
Navigation bounds stay the same – not much we can do here, we want to be able to navigate everywhere
Far from it! – we’d actually save memory with just sticking to static navmesh