Creating a Custom AImesh

By Dnamro

This is about those situations where you may need to create a custom AImesh to support a specific map. If only small adjustments are needed, it may be easier to use the existing Aimeshes and fix the navmesh with your favorite 3d modeling software. Aimeshes must follow a strict set of rules and complicated AImeshes can be very time consuming to work out the issues. A good example of that case is with the BF P4F map, Basra (Downtown), which I was able to use the AImesh that the Project Reality mod team had created for the Booster Pack version of the parking garage object. The only problem with navmeshing the garage was that it was only pathing at ground level. It was easier to connect the missing paths in 3ds Max rather than creating a custom AImesh that would have included the upper level path connections. This is because ramps were used to create these paths. Now objects can navmesh together, but they Aimeshes for each object must overlap. Most mappers place objects next to each other, but not overlapping, so they end up no navmeshing.

Now, in the case of the BF2142 map, Yellow Knife, the only way to reach the Titan docking bay is by ladders. There is a flag on the map that can only be reached through the Titan docking bay. There is a long ladder that goes all the way to the ground, and there is an added stairway to the roof of large warehouse building below, but that rooftop is only accessible by ladders. The image below, shows the stairway from the large warehouse to the Titan bay.

As you can see in the image below, there is a stairway on the side of building. however ....

The stairway on the side of building wraps around to platform on the front that with only ladders access. There is no path for bots to take.

Now, on the back of the building, there are stairs that lead up to a platform that goes nowhere, so I added some ramps.

Well, the ramps did not work, so I am trying adding some stairs. The problem was that due to the landing, the ramps were too steep. The ramps really need to go from the stairway landing up to the roof, but the landing was in the way. Next, I added stairs, but the only way to add them was to have them stick out from the building, instead of alongside, which, I don't really like. .It just looked like a kludgy add on.

So, I added a hidden ramp that goes through the wall shown below (This picture is a small day map I was using to test with ) up to the rooftop. I had to change the col2 object, which would have to be included in the map as a custom object or in the mod. This shows the back of of the warehouse with the stairway that goes nowhere:

This shows where the stairway ends in the wall, which is now a hidden ramp:

The picture below shows the view from the rooftop. This is the back of warehouse object. That is what makes this perfect for adding a hidden ramp -- players would have no reason to climb up this stairway, so they are not likely to see the bots use it. The only drawback that I can see is that the warehouse object does have to be included in the map or the mod that wants to take advantage of it.

The image below shows a bot using the ramp. He will appear to sink into the walkway and then come out the side where the stairway is located.

However, eventually I decided to add a stairway along the backside of the building. It was an interesting experiment, but, after thinking about it, I really did not like having bots move through walls. I used a gangplank to create the walkway from the end to the stairway to the rooftop. Now, this looks like it was designed this way originally and unless you played this map alot, you may never notice that the my singleplayer version has a stairway that goes form the ground to the roof of this building.

 I will also create a custom AImesh for the stairs that connect the rooftop with Titan docking bay that will include the ramp used on the Titan docking bay platform. These stairs use two stair objects, so those will be merged into one AImesh. I will extend this AImesh so that it will overlap from between the Titan docking bay platform and the Warehouse roof.

Note: I will update this once I have created the custom AImeshes