550 likes | 780 Views
Dynamic Navmesh: AI in the Dynamic Environment of Splinter Cell : Conviction. Martin Walsh. Splinter Cell: Conviction Ubisoft Montréal. Dynamic Environment. Lots of objects Explosions Lots of NPCs Dynamic Traps. AI. React Interact Navigate. Overview. Compare Development
E N D
Dynamic Navmesh: AI in the DynamicEnvironment of SplinterCell: Conviction Martin Walsh Splinter Cell: Conviction Ubisoft Montréal
Dynamic Environment Lots of objects Explosions Lots of NPCs Dynamic Traps
AI React Interact Navigate
Overview Compare Development Problems Cool Features
Current Solutions Grid-based Two-tiered
Two-Tiered Solutions Detailed Inconsistent
Why a Dynamic Navmesh? One-tier solution NPCs instantly aware
Overview Compare Development Problems Cool Features
Navmesh 2D representation of a 3D world • Triangles • Vertices • Edges • Walkable area • Extra information
What Makes it Dynamic Modified in real time Fast Robust
Basic Operations Adding Removing
Adding an Object : Take 1 Cutting a hole
Adding an Object -- Paradigm Rip out a chunk Cut the hole Replug the new chunks
Get Affected Navmesh Contours Find affected Triangles Make Homogeneous contours
Combine Contours and Retessellate CSG Operation Tessellator
Plug Triangles into Navmesh Will match up vertex for vertex No floating point comparisons Vertex pools Local border recalculation
Removing an Object How can you plug up a hole?
Removing an Object: Take 1 Use “Undo” to remove object
Removing an Object: Take 2 Undoing is free but redoing is expensive What about subdividing?
Removing an Object: Take 3 But first…
Adding an Object: Take 2 How do you add an object so that you can remove it later?
Hole vs. Patch Loss of information (Hole) Information retained (Patch)
Removing an Object: Take 3 Un-tag affected “Patch” triangles Vertex clean-up
Overview Compare Development Problems Cool Features
Plugging Problem Vertex too close to edge of contour Floating point imprecision
Degenerate Triangles Produced by tessellator (or bad input) Bad for Robustness
Output Modification Angle-optimal triangulation Worked at first…
Degenerate Triangles Return Stressing the system exposed problems Degenerate faces
Input modification Control your intersection vertices Use vertex welding
Robustness Recap Input/output modification Avoid floating point comparison Control your vertices
Performance Recap Localize Pool Partition Thread
Overview Compare Development Problems Cool Features
The “Patch” system Allows for new solutions to AI problems
Interaction Based on State Patrol Combat Plow through small obstacles Bash doors • Avoid small obstacles • Open doors
Don’t Be Omniscient Blocked door