Game Development Community

Navmesh generator + pathfinding under MIT License

by Luis Anton Rebollo · in Torque Game Engine · 06/16/2009 (2:46 pm) · 7 replies

Recast
code.google.com/p/recastnavigation/
coded by memononen

img193.imageshack.us/img193/7474/recast.jpg
Recast is state of the art navigation mesh construction toolset for games.

  • It is automatic, which means that you can throw any level geometry at it and you will get robust mesh out
  • It is fast which means swift turnaround times for level designers
  • It is open source so it comes with full source and you can customize it to your hearts content.

The Recast process starts with constructing a voxel mold from a level geometry and then casting a navigation mesh over it. The process consists of three steps, building the voxel mold, partitioning the mold into simple regions, peeling off the regions as simple polygons.

  • The voxel mold is build from the input triangle mesh by rasterizing the triangles into a multi-layer heightfield. Some simple filters are then applied to the mold to prune out locations where the character would not be able to move.
  • The walkable areas described by the mold are divided into simple overlayed 2D regions. The resulting regions have only one non-overlapping contour, which simplifies the final step of the process tremendously.
  • The navigation polygons are peeled off from the regions by first tracing the boundaries and then simplifying them. The resulting polygons are finally converted to convex polygons which makes them perfect for pathfinding and spatial reasoning about the level.

#1
06/16/2009 (3:54 pm)
Interesting! Thanks for Sharing.

Edit: Last version uploaded 12 hours ago... coincidence or you are part of the project?
#2
06/16/2009 (4:11 pm)
This is actually really interesting:

68.233.5.139/~transfer/Pics/pathfinding.jpg
#3
06/16/2009 (5:09 pm)
Would this work under 1.4.2?
#4
06/16/2009 (5:41 pm)
Interesting. Nice find Luis!
#5
06/18/2009 (7:02 am)
I'm not part of the project

Any plan to ingrate this in Torque?
#6
07/26/2009 (2:24 pm)
well i am acctually planning on using this with another planned project of mine but for the life of me i cannot get the RecastDemo to work it keeps saying

this application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I bet i am missing something pretty obvious.
#7
03/24/2010 (7:32 am)
Hi all,

I have added a new resource for the integration of Torque3D and Recast, if you want to check it out:

www.torquepowered.com/community/resources/view/19521

Cheers.
Diego.