Dynamic Navmesh: AI in the Dynamic Environment of Splinter Cell : Conviction

53
Dynamic Navmesh: AI in the Dynamic Environment of Splinter Cell: Conviction Splinter Cell: Conviction Ubisoft Montréal Martin Walsh

description

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 - PowerPoint PPT Presentation

Transcript of Dynamic Navmesh: AI in the Dynamic Environment of Splinter Cell : Conviction

Page 1: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Dynamic Navmesh: AI in the Dynamic Environment of Splinter Cell: Conviction

Splinter Cell: ConvictionUbisoft Montréal

Martin Walsh

Page 2: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Dynamic Environment

Lots of objectsExplosionsLots of NPCsDynamic Traps

Page 3: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

AI

React

Interact

Navigate

Page 4: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Overview

CompareDevelopmentProblemsCool Features

Page 5: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Current Solutions

Grid-based

Two-tiered

Page 6: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Two-Tiered Solutions

Detailed Inconsistent

Page 7: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Why a Dynamic Navmesh?

One-tier solution

NPCs instantly aware

Page 8: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Dynamic Cover 1

Page 9: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Dynamic Cover 2

Page 10: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Blocked Paths

Page 11: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Overview

CompareDevelopmentProblemsCool Features

Page 12: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

What is a Dynamic Navmesh?

Page 13: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Navmesh

2D representation of a 3D world• Triangles• Vertices• Edges• Walkable area• Extra information

Page 14: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

What Makes it Dynamic

Modified in real timeFast Robust

Page 15: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Basic Operations

Adding

Removing

Page 16: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Adding an Object : Take 1

Cutting a hole

Page 17: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Adding an Object -- In Action

Page 18: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Adding an Object -- Paradigm

Rip out a chunkCut the holeReplug the new chunks

Page 19: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Adding an Object -- Pipeline

Get Object Contour

Get Affected Navmesh Contours

Combine Contours and Retessellate

Plug Triangles into Navmesh

Page 20: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Bounding volume

Page 21: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Points of Volume

Page 22: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Points projected onto X-Y plane

Page 23: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Convex hull

Page 24: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Expanded convex hull

Page 25: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Retessellated Navmesh

Page 26: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Get Affected Navmesh Contours

Find affected TrianglesMake Homogeneous contours

Page 27: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Combine Contours and Retessellate

CSG OperationTessellator

Page 28: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Plug Triangles into Navmesh

Will match up vertex for vertexNo floating point comparisonsVertex poolsLocal border recalculation

Page 29: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Removing an Object

How can you plug up a hole?

Page 30: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Removing an Object: Take 1

Use “Undo” to remove object

Page 31: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Removing an Object: Take 2

Undoing is free but redoing is expensive

What about subdividing?

Page 32: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Removing an Object: Take 3

But first…

Page 33: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Adding an Object: Take 2

How do you add an object so that you can remove it later?

Page 34: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Hole vs. Patch

Loss of information (Hole) Information retained (Patch)

Page 35: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Removing an Object: Take 3

Un-tag affected “Patch” triangles

Vertex clean-up

Page 36: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Overview

CompareDevelopmentProblemsCool Features

Page 37: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Plugging Problem

Vertex too close to edge of contour

Floating point imprecision

Page 38: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Degenerate Triangles

Produced by tessellator (or bad input)Bad for Robustness

Page 39: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Output Modification

Angle-optimal triangulation

Worked at first…

Page 40: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Degenerate Triangles Return

Stressing the system exposed problems

Degenerate faces

Page 41: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Input modification

Control your intersection vertices

Use vertex welding

Page 42: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Robustness Recap

Input/output modificationAvoid floating point comparisonControl your vertices

Page 43: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Performance Recap

LocalizePoolPartitionThread

Page 44: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Overview

CompareDevelopmentProblemsCool Features

Page 45: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

The “Patch” system

Allows for new solutions to AI problems

Page 46: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Getting Stuck

Page 47: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Getting Unstuck

Page 48: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Interaction Based on State

Patrol• Avoid small obstacles

• Open doors

Combat• Plow through small obstacles• Bash doors

Page 49: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Guard and Civilians

Page 50: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Don’t Be Omniscient

Blocked door

Page 51: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

The Future

Full 3D navigation

Page 52: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

Bridges

Page 53: Dynamic Navmesh:  AI in the  Dynamic Environment  of  Splinter Cell : Conviction

[email protected]

www.creatorsofemotions.com

Questions and AnswersDynamic Navmesh: AI in the Dynamic Environment of Splinter Cell: Conviction