34
32
----------------------------------------------------------------------
38
Recast & Detour Version 1.4
39
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/memononen/recastnavigation/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
41
![screenshot of a navmesh baked with the sample program](/RecastDemo/screenshot.png?raw=true)
43
45
Recast is state of the art navigation mesh construction toolset for games.
45
* It is automatic, which means that you can throw any level geometry
46
at it and you will get robust mesh out
47
* It is fast which means swift turnaround times for level designers
48
* It is open source so it comes with full source and you can
49
customize it to your hearts content.
47
* It is automatic, which means that you can throw any level geometry at it and you will get robust mesh out
48
* It is fast which means swift turnaround times for level designers
49
* It is open source so it comes with full source and you can customize it to your heart's content.
51
51
The Recast process starts with constructing a voxel mold from a level geometry
52
52
and then casting a navigation mesh over it. The process consists of three steps,
53
53
building the voxel mold, partitioning the mold into simple regions, peeling off
54
54
the regions as simple polygons.
56
1. The voxel mold is build from the input triangle mesh by rasterizing
57
the triangles into a multi-layer heightfield. Some simple filters are
58
then applied to the mold to prune out locations where the character
59
would not be able to move.
60
2. The walkable areas described by the mold are divided into simple
61
overlayed 2D regions. The resulting regions have only one non-overlapping
62
contour, which simplifies the final step of the process tremendously.
63
3. The navigation polygons are peeled off from the regions by first tracing
64
the boundaries and then simplifying them. The resulting polygons are
65
finally converted to convex polygons which makes them perfect for
66
pathfinding and spatial reasoning about the level.
68
The toolset code is located in the Recast folder and demo application using the Recast
69
toolset is located in the RecastDemo folder.
71
The project files with this distribution can be compiled with Microsoft Visual C++ 2008
72
(you can download it for free) and XCode 3.1.
56
1. 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.
57
2. 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.
58
3. 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.
77
63
Recast is accompanied with Detour, path-finding and spatial reasoning toolkit. You can use any navigation mesh with Detour, but of course the data generated with Recast fits perfectly.
79
Detour offers simple static navigation mesh which is suitable for many simple cases, as well as tiled navigation mesh which allows you to plug in and out pieces of the mesh. The tiled mesh allows to create systems where you stream new navigation data in and out as the player progresses the level, or you may regenerate tiles as the world changes.
82
Latest code available at http://code.google.com/p/recastnavigation/
91
Released August 24th, 2009
93
- Added detail height mesh generation (RecastDetailMesh.cpp) for single,
94
tiled statmeshes as well as tilemesh.
95
- Added feature to contour tracing which detects extra vertices along
96
tile edges which should be removed later.
97
- Changed the tiled stat mesh preprocess, so that it first generated
98
polymeshes per tile and finally combines them.
99
- Fixed bug in the GUI code where invisible buttons could be pressed.
103
Released July 24th, 2009
105
- Better cost and heuristic functions.
106
- Fixed tile navmesh raycast on tile borders.
110
Released July 14th, 2009
112
- Added dtTileNavMesh which allows to dynamically add and remove navmesh pieces at runtime.
113
- Renamed stat navmesh types to dtStat* (i.e. dtPoly is now dtStatPoly).
114
- Moved common code used by tile and stat navmesh to DetourNode.h/cpp and DetourCommon.h/cpp.
115
- Refactores the demo code.
119
Released June 17th, 2009
121
- Added tiled mesh generation. The tiled generation allows to generate navigation for
122
much larger worlds, it removes some of the artifacts that comes from distance fields
123
in open areas, and allows later streaming and dynamic runtime generation
124
- Improved and added some debug draw modes
125
- API change: The helper function rcBuildNavMesh does not exists anymore,
126
had to change few internal things to cope with the tiled processing,
127
similar API functionality will be added later once the tiled process matures
128
- The demo is getting way too complicated, need to split demos
129
- Fixed several filtering functions so that the mesh is tighter to the geometry,
130
sometimes there could be up error up to tow voxel units close to walls,
131
now it should be just one.
135
Released April 11th, 2009
137
This is the first release of Detour.
141
Released March 29th, 2009
143
This is the first release of Recast.
145
The process is not always as robust as I would wish. The watershed phase sometimes swallows tiny islands
146
which are close to edges. These droppings are handled in rcBuildContours, but the code is not
147
particularly robust either.
149
Another non-robust case is when portal contours (contours shared between two regions) are always
150
assumed to be straight. That can lead to overlapping contours specially when the level has
65
Detour offers simple static navigation mesh which is suitable for many simple cases, as well as tiled navigation mesh which allows you to plug in and out pieces of the mesh. The tiled mesh allows you to create systems where you stream new navigation data in and out as the player progresses the level, or you may regenerate tiles as the world changes.
70
You can find a comprehensive demo project in RecastDemo folder. It is a kitchen sink demo containing all the functionality of the library. If you are new to Recast & Detour, check out [Sample_SoloMesh.cpp](/RecastDemo/Source/Sample_SoloMesh.cpp) to get started with building navmeshes and [NavMeshTesterTool.cpp](/RecastDemo/Source/NavMeshTesterTool.cpp) to see how Detour can be used to find paths.
72
### Building RecastDemo
74
RecastDemo uses [premake4](http://industriousone.com/premake) to build platform specific projects, now is good time to install it if you don't have it already. To build *RecasDemo*, in your favorite terminal navigate into the `RecastDemo` folder, then:
76
- *OS X*: `premake4 xcode4`
77
- *Windows*: `premake4 vs2010`
78
- *Linux*: `premake4 gmake`
80
See premake4 documentation for full list of supported build file types. The projects will be created in `RecastDemo/Build` folder. And after you have compiled the project, the *RecastDemo* executable will be located in `RecastDemo/Bin` folder.
82
*Note:* On Windows, please use x86 version of the SDL.dll to run the demo Application.
85
## Integrating with your own project
87
It is recommended to add the source directories `DebugUtils`, `Detour`, `DetourCrowd`, `DetourTileCache`, and `Recast` into your own project depending on which parts of the project you need. For example your level building tool could include DebugUtils, Recast, and Detour, and your game runtime could just include Detour.
92
- Discuss Recast & Detour: http://groups.google.com/group/recastnavigation
93
- Development blog: http://digestingduck.blogspot.com/
98
Recast & Detour is licensed under ZLib license, see License.txt for more information.
b'\\ No newline at end of file'