SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
ELIOS Lab




                                   Designing a PathFinding
                                       Algorithm to Enable
                                                  Dynamic
                                       RTS Serious Games

                M. Bardini, F. Bellotti, R. Berta, A. De Gloria
                                          ELIOS Lab
                                   DIBE – University of Genoa
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                1
RTS



             Popular game category
                   Take decisions and move objects on a territory
                          Continuous time-line


             In typical RTS, roads and tracks in the
             background map are not considered by the
             application’s logic
                   Just a different pattern, an ornament
                   No benefits by passing through them




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                  2
The past of RTS

                                                                          TM                   TM
          Popular game series Age Of Empire                                    and Total War
                 In the Age of Empire series any unit follows the shortest path,
                 even if it’s a simple worker or a soldier in patrol
                 In the Total War series roads are used only to enrich maps
                       In the world map, roads connect different cities
                           – In this case they are pre-calculated paths




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                                  3
And the future?


                                           TM
             Recently, Ubisoft proposed a new RTS for
                                                TM
             the WWII, R.U.S.E

             Official news and videos
                   benefits for using roads
                          units will gain a speed up for the transfers, so controlling
                          roads will become vital




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                       4
Serious Game for Geo-Training



             Work in Progress Serious Game
                   Training military workforces and civil protection
                   personnel on specific target geographic areas
             Challenges
                   Logic
                          Artificial opponent’s intelligence, levels, resources etc.
                   Processing of map images used as dynamic
                   inputs.
                          Semantic interpretation and annotate of images usable
                          as a background corresponding to the logic of the
                          application
                            – Identification of points for resource placement
                            – Characterization of the territory
                            – Definition of best paths to destination
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                     5
The idea


             A player moves objects on the map
                   The system computes the best path & relevant time cost.
                          Considering the actual nature of the segments
                              – E.g. roads, fields, wood
                              – standard image segmentation algorithms

             RealPath
                   Automatic procedure for identifying best routes
                   solely relying on the real-time processing of
                   grayscale input images
                          With parallel computing implementation
             Solution for designing levels of RTSs
                   Other geo-referenced applications with paths in
                   outdoor maps

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                           6
Pathfinding



             How to extract the nodes of a path-search
             tree from a picture?
             Grid layouts
                   Polygonal/Tiles Movement, Edge Movement,
                   Vertex Movement
                          Hybrid solutions
             Waypoints as meaningful points in an
             environment
                   Placed manually, like the connections
                   Very efficient tree building



     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                            7
The RealPath algorithm



             Input
                   Raster image, satellite or aerial
                          Possibly ortophotos
                              – Accurate representation of the earth's surface
                              – Adjusted for topographic relief, lens distortion, and
                                camera tilt




             Target
                   Automatic definition of waypoints
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                      8
Automatic definition of waypoints



          Pre-processing
                 Pixel value normalization
                       0-255 range
                 Square to enhance gradient




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                             9
Automatic definition of waypoints



          A* search to destination
                 Every pixel in the image as a possible node
                 Traveling cost proportional to the gradient
                 difference
                       Differentiate among large roads and small
                       winding roads
                       Cost weighted with the terrain nature
                           – Terrain recognition
                       A gradient threshold prevents off-road traveling
                       and reduce the number of arcs
                       The destination point may be off-road, the graph
                       may result unconnected
                          – a loop gradually reduces the gradient threshold if the
                              graph results to be unconnected
    1st International Workshop on
Serious Games Development & Applications
      Univ. of Derby, 8 Jul. 2010                                                    10
Automatic definition of waypoints



          A simple animation




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                             11
Optimizations



          A* algorithm scrolls all the nodes in the
          Open List to know whether a node was
          already created
                 Critical for a real-time response
                 Open List implemented as a Hash Table
                       Constant computational cost for each element,
                       independent of the search area
                       The Hash function relies on the position of the
                       pixel in the image



     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                       12
Optimizations



          Our work has not considered
          optimizations for realizing a natural
          movement for the NPC
                 Important for 3D games
                 Lots of solutions already implemented in
                 current videogames
                 The RealPath’s output can be post-
                 processed by a standard algorithm, to
                 smooth the path and move it away from
                 obstacles
                       Better results expected as computation points
                       are much more than in waypoint/grid algorithms
     1st International Workshop on
Serious Games Development & Applications
                                                                        13
       Univ. of Derby, 8 Jul. 2010
Pyramidal parallel implementation



          Parallel algorithms to speed-up
          performance in current architectures
          Pyramidal algorithms, an established
          family of parallel algorithms for image
          processing
                 Robust feature extraction
          Multilevel-resolution
                 A pyramid consists of a sequence of scaled
                 and Gaussian-filtered images

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                             14
Pyramidal parallel algorithms



          Not a parallel version of A*
          RealPath designed to exploit parallel
          executions of A* processing distinct sets
          of data obtainable through lower-
          resolution analysis
          Compute a very coarse first path
                 Define an initial set of points and
                 Recursively refine the subpaths until
                 converging to the final path in the original,
                 high-resolution map.
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                         15
Pyramidal parallel algorithms



          A data structure (pyramid shape) is
          needed for
                 A first, coarse-grain analysis on a small-size
                 image
                 subsequent path refinements in ever more
                 detailed maps
                 After experiments, for a medium-size image
                 (1-4 MB), 3- or 4-level Gaussian pyramids
                 are sufficient


     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                         16
Pyramidal parallel algorithms



          From the first path (top of the pyramid), a
          series of n points is chosen
                 Dividing a path into 30-40 segments usually gives
                 optimal results
                       Strong dependence on the parallelism level of the
                       underlying computing architecture
          Every subsequent couple of such n points
          constitutes the start and arrival points of n-1
          sub-paths
                 Every sub-path is independent of each other =>
                 separable working data sets => parallelizable
                 computation
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                         17
Pyramidal parallel algorithms




                By joining the sub-paths in the original image, a sub-optimal
                     path from the origin to the destination is obtained.

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                              18
Pyramidal parallel algorithms




                By joining the sub-paths in the original image, a sub-optimal
                     path from the origin to the destination is obtained.

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                              19
Pyramidal parallel algorithms




                                           A simple animation




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                           20
Experiment




                                     75 paths from 5 pictures (4 US, 1 Afg)

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                            21
Results




  Image                                                                 Rate
  1- Suburban area. Large and well defined roads                        73%
  2- Metropolis. Narrow and winding roads                               67%
  3- Residential area. Winding, tree avenues (with noise due to         73%
 shadows)
  4- Residential area. Narrower, but less winding roads                 93%
  5- Central area in Kabul. Only dirt roads, difficult to distinguish   60%
 also at naked eye

    Success criterion: path was the shortest and at least 95% on roads
        In all cases, start and arrival points were defined on roads




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                             22
Case studies




                                                          Naturalistic ortophotos




                  Rural paths



     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                  23
Case studies




                                           Large and compressed orthophoto




         Symbolic grey-scale image




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                           24
Time performance



          Standard PC platform
                 CPU: Intel Dual Core E6600 2.4 Ghz
                 Ram: 2 GB, 800 Mhz
                 8 MB cache
                 Operative System: Windows 7
                 Language: C++, single thread, single task program

                                 Mode                       Time
                                 With hashtable             1 ms          1.4x Memory
                                 Without hashtable          3,6 ms
                                                                        footprint increase


                                           Real-Time behaviour

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                           25
Subpath length & performance




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                        26
Target applications



          RealPath to be incorporated into game level editors of
          RTS games
                 With RealPath a designer (even an end-user) can load
                 geographic pictures to build game maps
          An RTS game player’s task of collecting resources
          may become repetitive and boring as soon as he has
          learnt the position of resources and the existing paths
          in the map
                 Also strategies in the same battles fields may become trivial
                 for skilled users
          RealPath can improve the game’s longevity by
          supporting a simple and automatic generation of new
          game maps
          The mods concept
     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                               27
Target applications



          Peace keeping mission scenarios
                 The player has to reach destinations for monitoring (they may
                 be placed automatically on the map) and move conveys
                 minimizing attack risks and damages
                 Decision strategy training combined with the possibility for a
                 player to contextualize his experience in the real target area.
          Civil protection scenario
                 First, the whole road network for an area is computed through
                 several iterations of the RealPath algorithm
                 Then, some roads are blocked with a symbol, simulating the
                 damages of the destructive event
                       e.g., an earthquake
                 Also in this case, personnel can realistically train on strategies
                 in a real-world environment.

     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                                    28
Conclusions



          A new solution for automatic definition of paths on
          aerial/satellite images
                 Costs reduced for creating new game maps, also supporting
                 UGC
                 High-performance parallel implementation
                       GPUs
                       Now porting on CUDA
                 The algorithm has been tested with several real-world images,
                 with good results




     1st International Workshop on
Serious Games Development & Applications
       Univ. of Derby, 8 Jul. 2010                                               29

Mais conteúdo relacionado

Semelhante a International Workshop on Serious Games Development and Applications

GIS - Lecture 4
GIS - Lecture 4GIS - Lecture 4
GIS - Lecture 4
sorbi
 
GIS- Lecture 6
GIS- Lecture 6GIS- Lecture 6
GIS- Lecture 6
sorbi
 
SNViz: Analysis-oriented Visualization for the Internet of Things
SNViz: Analysis-oriented Visualization for the Internet of ThingsSNViz: Analysis-oriented Visualization for the Internet of Things
SNViz: Analysis-oriented Visualization for the Internet of Things
benaam
 
OpenStreetMap Past, Present and Future
OpenStreetMap Past, Present and FutureOpenStreetMap Past, Present and Future
OpenStreetMap Past, Present and Future
Peter Batty
 
mobile + location based design
mobile + location based designmobile + location based design
mobile + location based design
George Hayes
 
06 history of cv computer vision - toweards a simple bruth-force utility
06  history of cv computer vision - toweards a simple bruth-force utility06  history of cv computer vision - toweards a simple bruth-force utility
06 history of cv computer vision - toweards a simple bruth-force utility
zukun
 

Semelhante a International Workshop on Serious Games Development and Applications (20)

GIS - Lecture 4
GIS - Lecture 4GIS - Lecture 4
GIS - Lecture 4
 
PCI Geomatics Synthetic Aperture Radar Processing Capabilities
PCI Geomatics Synthetic Aperture Radar Processing CapabilitiesPCI Geomatics Synthetic Aperture Radar Processing Capabilities
PCI Geomatics Synthetic Aperture Radar Processing Capabilities
 
Osm improvements
Osm improvementsOsm improvements
Osm improvements
 
GIS- Lecture 6
GIS- Lecture 6GIS- Lecture 6
GIS- Lecture 6
 
Geographic inf system
Geographic inf systemGeographic inf system
Geographic inf system
 
Two mark qn answer
Two mark qn answerTwo mark qn answer
Two mark qn answer
 
Horizon - The Location Challenge
Horizon - The Location ChallengeHorizon - The Location Challenge
Horizon - The Location Challenge
 
Big Data Analytics in RF - LTE - 4G Environments
Big Data Analytics in RF - LTE - 4G EnvironmentsBig Data Analytics in RF - LTE - 4G Environments
Big Data Analytics in RF - LTE - 4G Environments
 
TOTUS update Auckland Council - Dec 2011
TOTUS update Auckland Council - Dec 2011TOTUS update Auckland Council - Dec 2011
TOTUS update Auckland Council - Dec 2011
 
Scs interview2
Scs interview2Scs interview2
Scs interview2
 
SNViz: Analysis-oriented Visualization for the Internet of Things
SNViz: Analysis-oriented Visualization for the Internet of ThingsSNViz: Analysis-oriented Visualization for the Internet of Things
SNViz: Analysis-oriented Visualization for the Internet of Things
 
Urbanopoly @ PlanetData review
Urbanopoly @ PlanetData reviewUrbanopoly @ PlanetData review
Urbanopoly @ PlanetData review
 
OpenStreetMap Past, Present and Future
OpenStreetMap Past, Present and FutureOpenStreetMap Past, Present and Future
OpenStreetMap Past, Present and Future
 
GIS, Mash-Ups and Geographic Standards
GIS, Mash-Ups and Geographic StandardsGIS, Mash-Ups and Geographic Standards
GIS, Mash-Ups and Geographic Standards
 
mobile + location based design
mobile + location based designmobile + location based design
mobile + location based design
 
06 history of cv computer vision - toweards a simple bruth-force utility
06  history of cv computer vision - toweards a simple bruth-force utility06  history of cv computer vision - toweards a simple bruth-force utility
06 history of cv computer vision - toweards a simple bruth-force utility
 
International Workshop on Serious Games Development and Applications
International Workshop on Serious Games Development and ApplicationsInternational Workshop on Serious Games Development and Applications
International Workshop on Serious Games Development and Applications
 
Standard VENTURI presentation (10min)
Standard VENTURI presentation (10min)Standard VENTURI presentation (10min)
Standard VENTURI presentation (10min)
 
VRCAI 2011 Billinghurst Keynote
VRCAI 2011 Billinghurst KeynoteVRCAI 2011 Billinghurst Keynote
VRCAI 2011 Billinghurst Keynote
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 

Mais de Elios Lab (13)

International Conference on Advances in Computer Entertainment Technology (A...
 International Conference on Advances in Computer Entertainment Technology (A... International Conference on Advances in Computer Entertainment Technology (A...
International Conference on Advances in Computer Entertainment Technology (A...
 
Re-Thinking Technology in Museums
Re-Thinking Technology in MuseumsRe-Thinking Technology in Museums
Re-Thinking Technology in Museums
 
Sim&Sea 2010
Sim&Sea 2010Sim&Sea 2010
Sim&Sea 2010
 
Port Center - Virtual Port movie 2010
Port Center - Virtual Port movie 2010Port Center - Virtual Port movie 2010
Port Center - Virtual Port movie 2010
 
Fokus K3D 2010
Fokus K3D 2010Fokus K3D 2010
Fokus K3D 2010
 
SeGaCH Workshop, VSMM 2009
SeGaCH Workshop, VSMM 2009SeGaCH Workshop, VSMM 2009
SeGaCH Workshop, VSMM 2009
 
ICEC 2009
ICEC 2009ICEC 2009
ICEC 2009
 
ENTER 2009
ENTER 2009ENTER 2009
ENTER 2009
 
CIG 2009
CIG 2009CIG 2009
CIG 2009
 
ICEC 2009
ICEC 2009ICEC 2009
ICEC 2009
 
CIG 2009
CIG 2009CIG 2009
CIG 2009
 
SeGaCH Workshop, VAST 2008
SeGaCH Workshop, VAST 2008SeGaCH Workshop, VAST 2008
SeGaCH Workshop, VAST 2008
 
DIMEA Conference 2008
DIMEA Conference 2008DIMEA Conference 2008
DIMEA Conference 2008
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 

International Workshop on Serious Games Development and Applications

  • 1. ELIOS Lab Designing a PathFinding Algorithm to Enable Dynamic RTS Serious Games M. Bardini, F. Bellotti, R. Berta, A. De Gloria ELIOS Lab DIBE – University of Genoa 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 1
  • 2. RTS Popular game category Take decisions and move objects on a territory Continuous time-line In typical RTS, roads and tracks in the background map are not considered by the application’s logic Just a different pattern, an ornament No benefits by passing through them 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 2
  • 3. The past of RTS TM TM Popular game series Age Of Empire and Total War In the Age of Empire series any unit follows the shortest path, even if it’s a simple worker or a soldier in patrol In the Total War series roads are used only to enrich maps In the world map, roads connect different cities – In this case they are pre-calculated paths 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 3
  • 4. And the future? TM Recently, Ubisoft proposed a new RTS for TM the WWII, R.U.S.E Official news and videos benefits for using roads units will gain a speed up for the transfers, so controlling roads will become vital 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 4
  • 5. Serious Game for Geo-Training Work in Progress Serious Game Training military workforces and civil protection personnel on specific target geographic areas Challenges Logic Artificial opponent’s intelligence, levels, resources etc. Processing of map images used as dynamic inputs. Semantic interpretation and annotate of images usable as a background corresponding to the logic of the application – Identification of points for resource placement – Characterization of the territory – Definition of best paths to destination 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 5
  • 6. The idea A player moves objects on the map The system computes the best path & relevant time cost. Considering the actual nature of the segments – E.g. roads, fields, wood – standard image segmentation algorithms RealPath Automatic procedure for identifying best routes solely relying on the real-time processing of grayscale input images With parallel computing implementation Solution for designing levels of RTSs Other geo-referenced applications with paths in outdoor maps 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 6
  • 7. Pathfinding How to extract the nodes of a path-search tree from a picture? Grid layouts Polygonal/Tiles Movement, Edge Movement, Vertex Movement Hybrid solutions Waypoints as meaningful points in an environment Placed manually, like the connections Very efficient tree building 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 7
  • 8. The RealPath algorithm Input Raster image, satellite or aerial Possibly ortophotos – Accurate representation of the earth's surface – Adjusted for topographic relief, lens distortion, and camera tilt Target Automatic definition of waypoints 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 8
  • 9. Automatic definition of waypoints Pre-processing Pixel value normalization 0-255 range Square to enhance gradient 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 9
  • 10. Automatic definition of waypoints A* search to destination Every pixel in the image as a possible node Traveling cost proportional to the gradient difference Differentiate among large roads and small winding roads Cost weighted with the terrain nature – Terrain recognition A gradient threshold prevents off-road traveling and reduce the number of arcs The destination point may be off-road, the graph may result unconnected – a loop gradually reduces the gradient threshold if the graph results to be unconnected 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 10
  • 11. Automatic definition of waypoints A simple animation 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 11
  • 12. Optimizations A* algorithm scrolls all the nodes in the Open List to know whether a node was already created Critical for a real-time response Open List implemented as a Hash Table Constant computational cost for each element, independent of the search area The Hash function relies on the position of the pixel in the image 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 12
  • 13. Optimizations Our work has not considered optimizations for realizing a natural movement for the NPC Important for 3D games Lots of solutions already implemented in current videogames The RealPath’s output can be post- processed by a standard algorithm, to smooth the path and move it away from obstacles Better results expected as computation points are much more than in waypoint/grid algorithms 1st International Workshop on Serious Games Development & Applications 13 Univ. of Derby, 8 Jul. 2010
  • 14. Pyramidal parallel implementation Parallel algorithms to speed-up performance in current architectures Pyramidal algorithms, an established family of parallel algorithms for image processing Robust feature extraction Multilevel-resolution A pyramid consists of a sequence of scaled and Gaussian-filtered images 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 14
  • 15. Pyramidal parallel algorithms Not a parallel version of A* RealPath designed to exploit parallel executions of A* processing distinct sets of data obtainable through lower- resolution analysis Compute a very coarse first path Define an initial set of points and Recursively refine the subpaths until converging to the final path in the original, high-resolution map. 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 15
  • 16. Pyramidal parallel algorithms A data structure (pyramid shape) is needed for A first, coarse-grain analysis on a small-size image subsequent path refinements in ever more detailed maps After experiments, for a medium-size image (1-4 MB), 3- or 4-level Gaussian pyramids are sufficient 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 16
  • 17. Pyramidal parallel algorithms From the first path (top of the pyramid), a series of n points is chosen Dividing a path into 30-40 segments usually gives optimal results Strong dependence on the parallelism level of the underlying computing architecture Every subsequent couple of such n points constitutes the start and arrival points of n-1 sub-paths Every sub-path is independent of each other => separable working data sets => parallelizable computation 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 17
  • 18. Pyramidal parallel algorithms By joining the sub-paths in the original image, a sub-optimal path from the origin to the destination is obtained. 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 18
  • 19. Pyramidal parallel algorithms By joining the sub-paths in the original image, a sub-optimal path from the origin to the destination is obtained. 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 19
  • 20. Pyramidal parallel algorithms A simple animation 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 20
  • 21. Experiment 75 paths from 5 pictures (4 US, 1 Afg) 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 21
  • 22. Results Image Rate 1- Suburban area. Large and well defined roads 73% 2- Metropolis. Narrow and winding roads 67% 3- Residential area. Winding, tree avenues (with noise due to 73% shadows) 4- Residential area. Narrower, but less winding roads 93% 5- Central area in Kabul. Only dirt roads, difficult to distinguish 60% also at naked eye Success criterion: path was the shortest and at least 95% on roads In all cases, start and arrival points were defined on roads 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 22
  • 23. Case studies Naturalistic ortophotos Rural paths 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 23
  • 24. Case studies Large and compressed orthophoto Symbolic grey-scale image 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 24
  • 25. Time performance Standard PC platform CPU: Intel Dual Core E6600 2.4 Ghz Ram: 2 GB, 800 Mhz 8 MB cache Operative System: Windows 7 Language: C++, single thread, single task program Mode Time With hashtable 1 ms 1.4x Memory Without hashtable 3,6 ms footprint increase Real-Time behaviour 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 25
  • 26. Subpath length & performance 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 26
  • 27. Target applications RealPath to be incorporated into game level editors of RTS games With RealPath a designer (even an end-user) can load geographic pictures to build game maps An RTS game player’s task of collecting resources may become repetitive and boring as soon as he has learnt the position of resources and the existing paths in the map Also strategies in the same battles fields may become trivial for skilled users RealPath can improve the game’s longevity by supporting a simple and automatic generation of new game maps The mods concept 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 27
  • 28. Target applications Peace keeping mission scenarios The player has to reach destinations for monitoring (they may be placed automatically on the map) and move conveys minimizing attack risks and damages Decision strategy training combined with the possibility for a player to contextualize his experience in the real target area. Civil protection scenario First, the whole road network for an area is computed through several iterations of the RealPath algorithm Then, some roads are blocked with a symbol, simulating the damages of the destructive event e.g., an earthquake Also in this case, personnel can realistically train on strategies in a real-world environment. 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 28
  • 29. Conclusions A new solution for automatic definition of paths on aerial/satellite images Costs reduced for creating new game maps, also supporting UGC High-performance parallel implementation GPUs Now porting on CUDA The algorithm has been tested with several real-world images, with good results 1st International Workshop on Serious Games Development & Applications Univ. of Derby, 8 Jul. 2010 29