Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating and Navigating Virtual Worlds David Mould.

Similar presentations


Presentation on theme: "Creating and Navigating Virtual Worlds David Mould."— Presentation transcript:

1 Creating and Navigating Virtual Worlds David Mould

2 Overview Creating scenery in virtual worlds Navigating through virtual worlds Helping game players to understand virtual worlds

3 [World of Warcraft, 2004-2008]

4 [Oblivion, 2006]

5

6 Ontogenetic Modeling Ontogenetic modeling: approach appearance of model without regard for underlying process Seek lightweight means of mimicking appearance of dendritic objects Path planning: irregular curves paths from root never cross

7 Path Planning Problem Given a weighted graph, a start node S, and a destination D, find the path from S to D that has the lowest cost. a path is a sequence of edges. the cost of a path is the sum of all the edge weights along the path.

8 Path planned dendrites

9 Basic Idea Shortest paths in a weighted graph Automated process Offers user control: weights in graph influence path shape endpoint choice affects dendrite’s appearance generator shape, likewise

10 Implementation Dijkstra’s algorithm used to get costs from root to all other nodes in graph O(N) to cover graph O(n) for path from arbitrary endpoint to root endpoints placed by hand or procedurally

11

12

13 Fractal Dendrites Real objects often exhibit fractal (multiscale) detail Explicitly introduce hierarchical detail: Create low-frequency detail Add structure at higher frequency Repeat previous step

14

15

16

17

18

19

20

21 real DLAimitated DLA

22 [Xu and Mould 2007 – GRAPP 2007 Best Paper]

23

24 “Rocks” Multi-source path planning partitions space – can be used to produce irregular 3D objects

25

26

27 Constructive Path Planning Path planning for procedural structure Simple implementation Rich control handles Wide variety of phenomena Trees, rocks, coral, lightning

28 [Mould 2005]

29 Navigating Virtual Worlds Virtual worlds are full of obstacles and hazards, and getting from point A to point B is not trivial Both computer-controlled and player- controlled agents need automatic navigation Formal framework: least-cost path through a weighted graph

30 [Total Annihilation, 1997] [Heroes of Might and Magic V, 2007]

31 Weighted Graphs 3 7 3 2 5 1 1 2 2 3 4 2 1 8 4

32 3 1 - Weights represent difficulty - distance - time - hazard

33 Heuristic Search: A* If the heuristic is perfect, we always search exactly in the right direction, and only look at nodes on the path If the heuristic is admissible, the final path is guaranteed to be optimal

34

35 Bad heuristics If the heuristic is poor (doesn’t give much information about where to search) then A* does no better than breadth-first search It's very difficult to devise general heuristics In computer games, level designers try to invent maps which defeat simple heuristics

36 Giving up But, is there much need for optimal paths? People don’t usually use the optimal path, and they seem to get around fine A path can be “good enough” without being optimal [Aside: non-admissible heuristics can work OK, but can result in extremely high costs fixing the errors in tricky maps]

37 Hierarchical search

38 Hierarchical Search

39 Create a second graph which is an abstraction of the first (maybe repeat) Use the hierarchy to give the paths waypoints Use the hierarchy to give estimates Use the hierarchy to constrain the search HTAP’s pyramid

40 HTAP HTAP: Hierarchical Terrain Representation for Approximately Shortest Paths [Mould and Horsch 2004; Mould and Horsch 2005] Offline construction of hierarchy Online linear-time pathfinding Search space constrained by hierarchy

41 Creating the Hierarchy Choose “representatives” – nodes estimated to be on many paths Associate nodes with representatives Insight: according to path cost in original graph Place edges between representatives again, based on original-graph path cost New graph obtained; repeat if still too big

42 Using the Hierarchy Find representatives of endpoints in coarsest graph, and search for path there Next level down: find representatives of endpoints in current level (just a lookup) find path, searching only in regions whose representatives one level up were on the path Repeat until bottom level reached

43

44

45

46

47

48 Search space comparison

49 Results path cost computational cost (number of vertices opened) A* - quadratic HTAP - linear

50 Results computational cost (number of vertices opened) path cost

51 Path Quality path cost Ratio of cost of optimal path to HTAP path

52 Path quality -- random graph Ratio of cost of optimal path to HTAP path path cost

53 Hierarchical Path Planning

54 Navigating Virtual Worlds Summary: by preprocessing the original map, HTAP can perform online path planning in linear time Path quality is usually (>90%) very good (within 1.2 times optimal) Reduces the burden of AI in games, freeing processor to do more planning, physics, rendering, …

55 Information Management Virtual worlds tend to be immense, and game state tends to be extremely complex Information overload is a serious problem for game players and designers players: keeping track of what's going on designers: deciding what to present to the players, and how

56 Rich Embodiments Attach information to the agents inhabiting the gameworld e.g., health bars in MMORPGs or RTSs Adds to visual clutter Not particularly good aesthetics But, players can easily track large numbers of variables

57

58 Coherent Rich Embodiments Games also contain vast quantities of non- information-bearing detail appearance of units, scenery Idea: use existing information vectors (textures, shape) to convey game- meaningful information

59

60 Coherent Rich Embodiments Goal: convey information about agent state using thematically coherent elements size, shape of agent color, textures, transparency Ideally, mappings would be semantically meaningful (e.g. bullet holes = damage) Even abstract mappings can be learned!

61

62

63

64 Coherent Rich Embodiments Coherent: information presented naturally; no obvious extraneous elements Rich: many parameters presented (10-30) Novice players: appreciate the aesthetics Sophisticated players: interpret underlying information Natural continuum of player progress

65 Rich Worlds Holy grail: no extraneous detail, everything conveys game state/history destructible terrain, usable terrain features (Assassin's Creed) Black and White: world appearance changes depending on player good/evil choices Procedural, game-relevant music (integrated music and sound effects?)

66 Summary Populating virtual worlds with natural scenery Automatically moving around in virtual worlds Integrating appearance of gameworld objects with game-meaningful information

67 Acknowledgements Thanks to my students and collaborators who contributed to this work: Shane Dielschneider, Carl Gutwin, Michael C. Horsch, Hua Li, Jeremy Long, Tomas Pawliuk, Ling Xu This work was funded by NSERC and by the University of Saskatchewan

68 Thank you! Questions?


Download ppt "Creating and Navigating Virtual Worlds David Mould."

Similar presentations


Ads by Google