• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
DrEvil

Navmesh without agent radius offsets

6 posts in this topic

Wondering if anyone has used a navigation mesh with AI without doing the typical agent radius offsetting that is normally done. I know that it simplifies a lot to bake in the agent radius to the navmesh, but I'm experimenting with a navmesh representing the entire floor space without the offsetting. As you can probably imagine, this complicates certain aspects of it, so I'm looking for ideas if anyone has tried or done similar before.

 

Here's some screens to get an idea where I'm at with my tinkering. This is from one of many games my bot supports but it's a great testing ground for various A.I. stuff

 

http://omni-bot.com/tmp/navmesh/shot0001.jpg

http://omni-bot.com/tmp/navmesh/shot0002.jpg

http://omni-bot.com/tmp/navmesh/shot0003.jpg

http://omni-bot.com/tmp/navmesh/shot0004.jpg

http://omni-bot.com/tmp/navmesh/shot0006.jpg

http://omni-bot.com/tmp/navmesh/shot0007.jpg

http://omni-bot.com/tmp/navmesh/shot0008.jpg

http://omni-bot.com/tmp/navmesh/shot0013.jpg

http://omni-bot.com/tmp/navmesh/shot0014.jpg

http://omni-bot.com/tmp/navmesh/shot0015.jpg

http://omni-bot.com/tmp/navmesh/shot0016.jpg

http://omni-bot.com/tmp/navmesh/shot0017.jpg

http://omni-bot.com/tmp/navmesh/navmesh.jpg

 

http://www.youtube.com/watch?v=UhSNwaTV3II&feature=youtu.be

 

The last picture shows the main obvious issue with not offsetting the navmesh by the agent radius. Basically I will need to modify the paths found through the navmesh to account for the agent radius some as part of building the result path. I'm wondering if anyone has some ideas about how you might address this. I'm not yet funnel pulling the path, though I plan to, and I'm tinkering now with modifying the path along the edge portal normal by the agent radius to try and compensate, but there are situations where that distance even can overshoot the size of an adjacent sector, so I'm looking for some ideas on perhaps how/when to optionally perform fixup in a more selective and robust manner.

 

Thanks in advance.

Edited by DrEvil
0

Share this post


Link to post
Share on other sites
I don't work on the pathfinding at my job currently, but I'm vaguely familiar with the approach. Initially it was hoped that a single navmesh could be generated for all agents based on a minimum agent radius. This ended up leading to a great deal of grief when trying to path larger agents (imagine SUVs going through door frames). Eventually it was decided to generate navmeshes not necessarily per agent, but per similarly sized agent.

Our project requires user interaction with the site (level), and thus navmeshes have to be regenerated depending on changes to the site. Without that stipulation I think the decision to generate navmeshes per agent (or similarly sized agent) would have been a no brainer. I admit we tend to throw hardware at a problem, but I'm curious what motivated your approach?
0

Share this post


Link to post
Share on other sites

Partially as an experimental exercise to see if I can get it working reasonably well, even though the games that my bot works in don't technically need it. The way I construct nav meshes is a manual process that involves pointing and using surfaces of the game world as clip planes, since I don't have access to the raw collision geometry to auto build and offset. The up side to that process is that its pretty fast to generate the navigation(for a manual process at least), and it represent the walkable floor space exactly, the down side obviously is the need to handle some of the issues at the path finding level.

 

Also, although it also doesn't really come into play with my bot, we had lots of problems with nav meshes when I worked on Doom 4, specifically with melee creatures. The larger the creature, the more fragile it is to calculate a movement position suitable to melee from, especially when the player or smaller humanoid style targets are backed into a corner, because the distance from that entity to the larger creatures navmesh can be significantly above the radius due to the offsetting.

 

At the moment I'm largely getting obstacles of varying weights working with modifying the navmesh sectors temporarily and reverted when they are removed so I can represent both solid obstructions as well as weighted soft obstructions, like defensive weightings, such as

 

http://omni-bot.com/tmp/navmesh/sentryobstacle.jpg

0

Share this post


Link to post
Share on other sites

Hi DrEvil,

Sorry that it’s taken me a little while to get back to your post/PM. I’m really under the pump with work at the moment.

To account for agents with varying sizes, we need to solve two problems:

1. We need to account for agent size when running our A* algorithm on the navigation mesh to find the list of nodes (be they triangles or convex polygons) which will contain the final path. That is to say, we can't send agents through gaps that are too small for them.
2. We need to account for agent size when “funnelling” through the list of nodes returned by our A* search to obtain the actual shortest path.

For problem #1, please see my full description and solution in this post from 2008.

You will see that for each node, it is necessary to store a separate size restriction value for every edge-pair combination that an agent could enter and leave from. If our nodes are triangles, this means each one must store three separate widths.

If we allow other kinds of convex polygons, then the number of widths each node must store will be equal to the sum of all integers from 1 to (number_of_neighbours – 1), if my brain is working correctly at the moment. We would need to come up with an equation to reference the right value from a node’s array of stored widths given an entry edge and an exit edge – this should be fairly trivial.

For problem #2, please see my solution in this post from 2009, as well as my other contributions in the same thread. The linked post explains (my version of) the funnel algorithm and then explains the modifications that you need to make to account for agent size, providing pseudo code at both stages.

Just let me know if you have any questions.

On a side note, I obviously don’t think that the traditional solution of expanding and bevelling the base navigation mesh to account for agent size is very elegant. Apart from necessitating a new mesh for each possible agent size, it also increases the complexity of the navigation mesh at every concave feature. For fast pathfinding, we want to reduce the number of nodes that need to be searched, not increase it.

Edited by jack_1313
0

Share this post


Link to post
Share on other sites
Thanks. I'm on the road at the moment so it will take me some time to sit down and digest. I'm primarily looking to correct the corners where my guys currently cut across and get stuck due to the non offset geometry. I don't currently need to actually pathfinder for multiple agent sizes. I can understand there there is probably some overlap though.
0

Share this post


Link to post
Share on other sites

Do you also intend to have some sort of collision det/response system in place and represent the agents using some sort of physics "character controller"? If you do, you could force them along the generated path without your AI/Pathfinding system caring about their agent radius and the collision system would push them off the walls and other geometry so they wouldn't interpenetrate. This wouldn't be very computationally optimal I suppose, but just an idea?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0