The state of Alternate Navmesh tools

By Dnamro

This is what I have found looking into using other tools to Generate Navmeshes. The DICE tools are complicated and outdated. I have looked into other possible navmesh solutions and provide my findings in this document. The bottom line is that I have not found a tool that can replace the DICE navmesh tool, but there may be some tools that can help speed up and improve the current process.

**Blender 2.6:**

Blender 2.6 uses the Open source Recast navmesh toolkit. I played around with blender 2.6 and was able to generate a navmesh based off the Preopt of Highway Tampa. Version 2.8 of Blender does not have the navmesh tools. Since 2.8 was a revamp of the UI, that Navmesh tool was not a high priority to add back to 2.8, but may eventually make it back in

The generated navmesh can be exported as obj. The results were very messy:

https://classic-battlefield-modding.fandom.com/wiki/Using\_Blender\_to\_Create\_Navmeshes?venotify=created

Found documentation for using the navmesh tool in Blender:

https://archive.blender.org/wiki/index.php/User:Nicks/Gsoc2010/Docs/

Recast Plugin for Blender: https://github.com/Arlen22/Blender/tree/master/extern/recastnavigation

Generating a navmesh with blender takes a minute or less. The navmesh options do allow creating navmeshes for different needs, like for infantry or vehicles. It generates a navmesh very quickly. I am talking minutes instead of hours or days. I have managed to create what looks like a playable navmesh based on the Preopt for 2142 Wake in Blender. Now the preopt is generated with the BF2editor and the first part of the navmesh tool for BF2, which normally only takes an hour or two for a large map. I have concerns about building interiors, especially multilevel. The AImeshes that are open, seems to work well with Blender Navmeshing, but DICE AImeshes are all closed up. These AImeshes are used to generate the Preopt that is used navmesh. Nothing has to be imported into Blender other than the Preopt which is obj format.

I have not figured out how to handle water yet, but Wake 2142 does not have any boats, and uses aircraft to get from attack base to the island, so don't need to navmesh the water for 2142 maps. In bleender, I just select the ground mesh and ignore the water for Wake 2142. Blender navmesh does not have any way that I can see to be able to handle navmeshing deep or shallow water any differently than ground. When the preopt is imported into Blender the deepwater, ground and shallow water areas can all be selected separately. It may be possible to navmesh those areas those areas and merge the generated navmeshes together.

**Unreal Engine 4:**

UE4 is free to use and only charges a percentage of profit after a certain amount, so - basically free to use for non profit projects. UE4 will import the preopt and manifold and there is a hack available to export the navmesh as an obj, but in testing I was not able to generate a navmesh from the preopt. I am not sure if the engine supports static navmeshes for large maps. The guide recommends to create dynamic meshes for large maps during gameplay. Another issue would be that UE4 and BF2 handle collision meshes for building interiors completely differently, so those would all have to be redone to make them work with UE4. It does not not look like it would be helpful for BF2 Navmeshes.

Link to the topic of trying to export navmesh in UE4 to obj:

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/120435-problem-with-exporting-nav-mesh-data

**Recast and Detour:**

This is open source navmeshing and pathfinding software and the best potential for being useful for creating BF2 navmeshes. Recast is the navmeshing tool and Detour is for pathfinding. This is a code library that needs to be compiled.

https://github.com/recastnavigation/recastnavigation

https://www.youtube.com/watch?v=XyfLSocd9ec&t=286s

https://www.youtube.com/watch?v=9QYEtC80niM

**Goleam Navmesh Creater**

- Works with maya, and creates a GSE file format output. I don't see this as being useful without Maya. This appears to be free, but Maya is not. I don't have Maya and I have not looked into this.

http://golaem.com/content/doc/golaem-crowd-documentation/navmesh-creator

**Irrlicht**

http://irrlicht.sourceforge.net/

This is an opensource game engine, that someone said can create (MapBear?) navmeshes. I have not found any info on the web about how to create or if it can be exported into a useable format. This Youtube video series is all I found:

https://www.youtube.com/watch?v=9QYEtC80niM

https://www.youtube.com/watch?v=Zj\_aXyfqTZE

https://www.youtube.com/watch?v=gw2hZuFXw5I

**Instant-meshes**

This is open source software for optimizing meshes, also called retopology. It allows the user to make a hi-res mesh low res with a lot of control on how it's done. It works with obj files and supports quads or Triangles. Navmeshes use obj format with Triangles.

https://github.com/wjakob/instant-meshes

There are blender plugins that used the command line version, but it seems to me you have more control with the tool directly.

Youtube tutorial: https://www.youtube.com/watch?v=hu4NavAy5f4

This might be useful for optimizing a current Navmesh or using the Preopt.

**Possible way to use other tools with the DICE navmesh tools**

Proposed workflow: Since the optimizing is what takes the longest amount of time when navmeshing, what I am thinking is that we use the the editor and the Navmesh process to create the manifold and Preopt. Those are relatively quick and easy to to work with other tools because they are obj based. The Preopt provides the ground integrated with the objects and may be able to be used to create a navmesh. Then that navmesh would need to be exported to obj and optimized before using fixnavmesh and then loading back into the editor to create the pathfinding files used in game.

Also since large navmeshes over 100k poly can be problematic for BF2, using a tool like Instant-Meshes could help by reducing the size of large navmeshes.

**Would it be possible to bypass the BF2 editor for navmesh creation?**

Short Answer is NO. The editor is required to create the infantry and vehicle .clb and .qtr file.s

Now, when  generate pathfinding, there is a lot of configuration data that could be replicated form the map files.   The only issue is the the object AImeshes are converted into .gts files (GNU 3d format) by the editor, because the navmesh tool uses the Free GTS  library.  http://gts.sourceforge.net/   Outside of the editor, we don't have a tool that can batch convert the AImeshes into .GTS format.   We could keep a library of a GTS version of all the objects that have already been converted.     It might be possible to make one.  Remdul made the code for his BFmeshview available.   Still that is a lot of work to bypass a tool that already works.    Now the other thing that the editor does is convert infantry.obj and vehicle.obj files generated by the navmesh tool into the AIpathfinding files (infantry and vehicle .clb and .qtr files.)   We don't know exactly what these are and don't have access to the code in the editor used to create them.  I think one represents the navmesh path that the bots can follow and the other is wayfinding data which is nodes along the different paths that helps the bots decide which way to go based on the situation.