`

GDC 2002: Polygon Soup for the Programmer's Soul: 3D Pathfinding

阅读更多

One of the fundamental goals of an AI system is to avoid making the unit appear "dumb." At the root of this challenge lies one of the hardest problems to overcome efficiently and believably: pathfinding. Today, 3D graphics and sound technologies begin to reach a level of realism that is easily destroyed by seeing an AI unit walk face-first into a solid wall, slide along the perimeter and ultimately get stuck on an errant polygon. Traditional technologies that worked well for games a few years ago fall apart when faced with the complexity of today's 3D environments.

This paper addresses the pitfalls of attempting to pathfind the arbitrary world we call "polygon soup." It covers automatic data generation and compression, a run-time distributed algorithm, organic post-process modifiers, and solutions for tricky situations such as doors, ladders, and elevators.


<!-- /* AD rectangle 300x250 */--><!-- /* OpenX Javascript Tag v2.8.1 */--><!-- /* * The backup image section of this tag has been generated for use on a * non-SSL page. If this tag is to be placed on an SSL page, change the * 'http://69.59.137.121/openx/www/delivery/...' * to * 'https://69.59.137.121/openx/www/delivery/...' * * This noscript section of this tag only shows image banners. There * is no width or height in these banners, so if you want these tags to * allocate space for the ad before it shows, you will need to add this * information to the <img> tag. * * If you do not want to deal with the intricities of the noscript * section, delete the tag (from <noscript>... to </noscript>). On * average, the noscript tag is called from less than 1% of internet * users. */-->
<noscript>&lt;a href='http://69.59.137.121/openx/www/delivery/ck.php?n=a5dc8883&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'&gt;&lt;img src='http://69.59.137.121/openx/www/delivery/avw.php?zoneid=28&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;amp;n=a5dc8883' border='0' alt='' /&gt;&lt;/a&gt;</noscript>

A complete vehicle pathfinding solution is outside the scope of this paper, however we will present a brief overview that may work for some games.

Firstly, modify the flood fill algorithm to use the bounding volume of the largest vehicle regardless of its orientation. During the run-time path solve, take the turn radius of the vehicle into consideration when evaluating portals. In other words, we know which portal the vehicle is coming from, so discard any destination portals that would cause the vehicle to turn sharper then it is able.



Take turn radius into consideration when evaluating portals.

Once the path is generated, it may be problematic for a vehicle to follow. This is because orientation is important when dealing with vehicles; however our sector/portal system doesn't implicitly handle this very well. Consider the following diagram.


Orientation is important when traversing the path. Once in Sector B, the vehicle will never make the turn to Sector C.

In the sector/portal system, the vehicle will beeline from the Sector A's entrance to Sector B. This orients the vehicle in such a way that it will be impossible for the vehicle to make the following turn into the portal for Sector C. However, if the vehicle would "arc" out into Sector A, it would be possible to make both Sector B and Sector C. Unfortunately there is no way of knowing this is required unless we search ahead on the path.

A simple solution to this problem, which works well with the system we've described so far, is to spline the path. However, none of the classical "true" splines will work for this situation; which is fine -- we'll create our own custom curve.

Our goal: create a continuous curved line that will cause the vehicle to arc around corners while still obeying the vehicle's turn radius restrictions. Such a path can be created using only a straight line and the vehicle's turning circle. Unlike "true" splines, this path is not continuous in the mathematical sense, but composed of three distinct continuous parts, which, when placed end-to-end, form a continuous path. The three parts are: the exit curve from the previous point, a straight line from the exit curve to the enter curve of the next point, and the enter curve of the next point. Note: The starting and ending points only contain two parts (there is no previous part for the starting point, nor is there a next point for the ending point). Consider the following diagram:


The vehicle curve is composed of three distinct parts: the exit curve, a straight line, and the enter curve.

To build this curve, overlay the vehicle's turning circle onto each node of the path. We will assume the optimal center of this turn arc will lie at the point halfway between the angles formed by the (prev_node - curr_node) and (next_node - curr_node) vectors. This causes the actual node point to lie on the perimeter of the turning arc.

For each turning circle on the path, find the "in" and "out" tangent points. The "in" tangent point is the closest point of tangency from the previous point to the turn arc. The "out" tangent point is the closet point of tangency from the next point to the turn arc. Now, simply connect the dots. The path is as follows: straight-line from starting point to the "in" tangent point on the turn arc of the next path node; follow the turn arc to "out" tangent point; straight line from this point to the "in" tangent point of the turn arc of the next path node, etc, etc.

Once finished, this algorithm yields a continuous curve that follows the turning restrictions of the vehicle following the path.


The vehicle curve ensures the vehicle will not attempt any impossible turns.

Keep in mind that this curve may cause the vehicle to drive outside the "safe" areas of the path, thus potentially colliding with objects along the way.

Conclusion

By taking advantage of a simple flood fill algorithm, we can overcome the Herculean task of automatically generating connectivity data through complex polygon soup. With a few tricks and extensions we can easily incorporate doors, ladders, and elevators; spline the result of the path solve to yield a more organic looking path; dynamically alter the pathfind data to allow the AI to replicate a player's actions; incorporate innate waypaths to force a specific behavior from the AI; and distribute the run-time path solve over multiple frames to balance the CPU load.

Special thanks to Eric Cosky for the original concept of the flood fill algorithm, a brilliant idea that proves the worth of brainstorming with a friend before jumping into a complex problem. Also, thanks to Colin Mclaughlan for suggesting the concept of dynamic temporary "jump" portals.

分享到:
评论

相关推荐

    游戏-微软GDC透视:AI正在真实革新游戏制作、运营

    首先,AI技术加速了2D/3D游戏资产的创建。Roblox的MaterialGenerator能根据文本提示自动生成游戏物品,降低了设计成本和时间。而完美世界则运用StableDiffusion生成场景、武器、饰品和物品,这种技术使得游戏内的...

    GDC09-3DVision-The_In_and_Out

    标题与描述均提到了"GDC09-3DVision-The_In_and_Out",这显然是一个关于立体视觉(Stereoscopic 3D)技术在游戏开发中的应用与实践的主题演讲或研讨会,由NVIDIA的Samuel Gateau主持。下面将根据提供的部分文件内容...

    GDC: D Compiler for GCC-开源

    GDC是D编程语言的GCC前端。

    GDC *:可靠的标签推荐算法

    在本文中,我们通过在MovieLens和Last.fm的真实数据集上进行实验,证明了GDC能显著提高结果的多样性,而GDC*能够扩展原始推荐结果,同时保持与原始结果的小Jaccard距离。 关键词包括:标签推荐、多样性覆盖、...

    鼎捷GDC客户端配置

    【鼎捷GDC客户端配置】是关于企业级应用软件系统的一种客户端接入方式,它提供了两种登录模式:客户端登录和网页方式登录。这两种登录方式都旨在为用户提供便捷且高效的访问体验。 1. **客户端登录**:传统的客户端...

    #GDC2018 Advances in the HDR Eco-System_GDC2018.pdf

    However, most of the focus has been on TVs, making it difficult for production pipelines and PC gamers. With desktop HDR such as G-SYNC HDR becoming mass market, now is a great time to take a fresh ...

    #GDC2017 Insomniac’s Web Tools: A Postmortem

    在GDC2017(游戏开发者大会2017)上,Insomniac Games的首席引擎程序员Andreas Fredriksson做了一次名为“Insomniac’s Web Tools: A Postmortem”的演讲。在这次演讲中,Andreas Fredriksson深入剖析了Insomniac ...

    gdc-client:GDC数据传输工具

    构建gdc客户端这个存储库的./bin目录中有一个名为package的bash脚本,它通过PyInstaller来构建gdc-client的单个可执行文件时,承担了大部分繁重的工作。 它将尝试根据uname猜测您的操作系统,并进行相应的构建。 在...

    lenze伦茨工具软件GDC GDC-V41401

    【伦茨Lenze工具软件GDC GDC-V41401详解】 伦茨Lenze是一家全球知名的自动化技术供应商,其产品线涵盖了广泛的驱动和自动化解决方案。GDC(Generic Drive Configurator)是伦茨推出的一款专业配置软件,主要用于...

    #GDC2017 Photogrammetry for Games

    Photogrammetry, the creation of 3D assets from on-site photography and video, holds the promise of amazing, immersive worlds full of detail and organic believability. For studios, leveraging ...

    Lenze伦茨工具软件GDC操作入门.ppt

    ### Lenze伦茨工具软件GDC操作入门 #### 一、GDC软件综述 GDC(Global Drive Control)是一款由Lenze开发的专业驱动控制系统管理软件,主要用于支持Lenze驱动设备的配置、调试及监控等功能。它具备在线模式与离线...

    39948_The Blacksmith Environments v1.0.3695(Jan 26,2018)

    Unity 5 - The Blacksmith - GDC 2015 http://video.tudou.com/v/XMzQ4ODgxMjM5Mg==.html Unity 5 The Blacksmith follow-up environment project http://video.tudou.com/v/XMzQ4ODgxMzk4OA==.html 城通网盘: ...

    Geforce Driver Check (GDC):Nvidia Display Driver自动安装程序和版本检查器-开源

    开源软件“Geforce Driver Check (GDC)”为用户提供了一种自动化的方式来检查和安装Nvidia Geforce显示驱动,让这一过程变得更加便捷和可控。 GDC是一款专为Nvidia Geforce用户设计的实用工具,它的主要功能是检测...

    #GDC2018 Fixing_The_Hyperdrive_GDC_2018.pdf

    Session Description: With the release of Nsight 5.5, a subset of the key GPU hardware metrics we have been using at NVIDIA to come up with driver-side and application-side optimizations are finally ...

    #GDC2017 VR Best Practices: Putting the fun in VR Funhouse

    VR Funhouse is a high end experience using the latest in Gameworks technology. We will dive deep into the lessons learned through the production of VR Funhouse and how we tackled the many unique ...

    伦茨变频器调试软件GDC

    伦茨变频器调试软件GDC是一款专门设计用于与伦茨品牌的变频器进行通信、参数设置和程序下载的专业工具。这款软件版本为GDC V4.1.4,是伦茨公司为用户提供的强大而实用的控制和诊断解决方案。 在工业自动化领域,...

    #GDC2017 FrameGraph: Extensible Rendering Architecture in Frostbite

    “FrameGraph: Extensible Rendering Architecture in Frostbite” – Yuriy O’Donnell (Frostbite / Electronic Arts)

    伦茨GDC软件

    伦茨GDC软件是一款专为伦茨变频器设计的应用程序,它允许用户通过个人计算机(PC)与变频器进行交互,实现参数的上传、下载以及实时监控等功能。这款软件的重要性和实用性在于,它提供了方便快捷的方式来进行变频器...

    伦茨GDC V41401调试软件.rar

    标题中的“伦茨GDC V41401调试软件.rar”指的是伦茨(Lenze)公司的一款变频器调试工具,该软件主要用于对伦茨GDC V41401型号的变频器进行参数设置、故障诊断和性能优化。GDC(Generic Drive Control)是伦茨开发的...

    lenze gdc 软件.rar

    lenze gdc 软件rar,lenze gdc 软件

Global site tag (gtag.js) - Google Analytics