This member has provided no bio about themself...

RSS My Blogs

Explore Recast for BF2

Yao·Bang Blog

I try to use Recast for generating BF2 map's navmesh. I find it can work for very small map( like CQB map), see following picture:

Recast

we can see it work good with Incorrect col3 model (in fact, col2) of Warlord villa in Xpack mod.

For bigger whole map( i test Wake_2007), and i found it cannot work. I think maybe the whole map is too big for Recast as a solomesh to generate.

So I try to generate tile by tile, it work but between tile and other tile, the number and position of vertices on the edge often do not match. see following picture:

  3ds Max 2020 2024 1

  3ds Max 2020 2024 1 1

At the intersection edge of these two tiles, we can clearly see that the number and position of vertices on both sides do not match. That's the trouble. It's probably more annoying to repair than to over-simplify of terrain.

Navmesh.exe re

Yao·Bang Blog

I'm just finishing my Academic promotion examination ( but I guess I have failed). Sad.

Three weeks ago, i tried to modify DICE's navmesh.exe code for better navmesh generating (i adjusted its optimize terrain code to make sure it don't over optimizate or lost some terrain details, which makes BOTs die on the way), and it successed a half (Output map model has more correct terrain details but exe cann't proceed to the next step, it cannot work Stitch step).

I main modify navmesh.exe code is here: fixup_degenerates (groundMesh, NULL, 5., 5., 0.01, tree) in Line 249 of navmesh.cpp and adjust this old c++ project to work. ( original code Parameter is groundMesh, NULL, 20., 20., 0.01, tree) . The following pic is a comparative example of Wake_Island_2007.

better navmesh Tool

The above is the terrain model generated by original Navmesh.exe (with color) and the real terrain of the map (optimized with Max, otherwise the lines are too dense to see clearly). We can find terrain model, where I pointed out, is generated by original Navmesh.exe and lost this part of the terrain details because of over-optimization. So if we use original Navmesh.exe to generate Navmesh, it usuall lost much terrain details, especially for mountain maps. This lead to big problems for Bots actions or mappers to fix them! However, the following is the terrain model generated by my adjusted exe(I don't show the real terrain because we couldn't see them clearly). And we can see where i point out, it has good details. About time to generate this terrain model, i don't pay attention on it, it spent about 3.5 min to generate ( i think it is normal speed like original exe). Although new exe can't work the next step, its output file can be used by old exe to work the next step. About model filesize, the new exe generate file's size about half as many files as the old exe. The file size generated by the new exe is more than half that of the original one, because the new one has more details, it is reasonable.

So, i'm try to wirte a new exe tool for BF2 Navmesh work and use a New Algorithm (Recast) as an alternative operation. Please wish me succeed.