BF42 Pathmapping - Part 1-C

Now time to learn to edit the pathmap in Editor 42.

* Fire this editor up and open the level in Editor 42

And first up you will see this, and remember Black is Pathed Area, and white is Non-Pathed Area.

Now this explains thing much more clearly, note that around the Trees & Rocks and up the sides of Hills the Areas are white. These are the Non-pathed Areas that are used to keep the Bots from running into objects or going up slopes that are too steep, and the flat area that is directly ahead is mostly black, allowing Bots to roam free in this area.

Lets have a look at some other parts of the map.

Here we are at the Axis base we we're trying to look at earlier on the Pathmap, again seeing the Pathmap around objects gives you a clearer indication of how the pathmapping works

Note that there is a fair amount of area that is non-pathed or “Pathed Out.” around Objects. Cars are the fastest moving ground vehicles in Battlefield and this liberal non-pathed coverage around objects is to ensure the Bots have plenty of space between themselves and Objects while on the move. Tanks are slower and do not require as much space. Infantry is the slowest ground unit, and they also have the ability to follow the pathmaps with the highest accuracy of all the units and require no extra space to keep them away from objects.Here we are looking straight down on the Sawmill Control Point. From here you can clearly see the Pathmap image, how blocky it is in relation to the buildings.

As always, its always best to see this difference firsthand. We will Repeat the process with Kursk's Infantry1Level0Map.raw.

* First, Import the Infantry1Level0Map.raw and then open the 8bit .raw in your Image Editor/Viewer.

The first difference you should notice with the Infantry Pathmap is how much more area is Black. Infantry units are able to get up much steeper slopes then Cars, they can also move through much tighter spaces and closer to objects then Cars. You will also notice that around Buildings and other objects the details are much finer, whereas the Car's Pathmap had objects pretty much blotted out.

Next, Use the Pathmap preview tool on the Infantry pathmap, and when you are done Open our hacked up level again in Ed42.

* Remember, you will need to change the tmpFileAI setting in the \_convertTolevelTexture.bat file to match the Infantry pathmap.

We're back at the same place we started with the Car Pathmap, and again you will notice how much more area is Black

Looking at the Axis Base again, the White pathing follows the objects very closely. I bet your wondering why there are so many gaps in the pathing of the fence, well ... nobody has ever said Dice's pathing was perfect ; )

Look closely at the Barn, you can just see a white edge on the left edge of the building. This is how the Pathmaps for infantry should be, just the right amount of Pathing. Too much Non-pathed area around the outside of an object is an opportunity for a Bot to get “stuck” and once a Bot is stuck in a non-pathed area, it will not be able to move until it dies and respawns elsewhere, or is pushed into a Pathed Area. This can happen when a Bot is thrown into a non-pathed area by an explosion or could be pushed in by a passing vehicle. On the other side of the coin, if an object is not completely pathed out, then it becomes an opportunity for the Bots to try and walk through walls and/or other objects.

What other possibilities or problems do buildings pose to Infantry ? Lets take a closer look at that Barn.

O dear ... a veritable minefield of obstacles. So how is it pathed ?

We can move the building in this copy of the map without doing any damage to the original level, so lets move the Barn to get a better view of the pathing.

* Use Ed42's object mode [Press F4] select the Barn, and use the mouse wheel [or Page Up/Down] to move the Barn down into the ground until the floor sinks below the terrain.

Hmmm ... its a bit rough in here, but you should get the idea. Notice that the ladder is Pathed Out. As pathmaps are only Two Dimensional, it is not possible to path the ground section AND the upper floor. To prevent the Bots from running into the ladder & accidentally climbing it, only to get lost on the upper floor, it is Pathed Out so the Bots avoid it entirely.

Ok, last stop in our rounds is the Sawmill again.

PM1\_ed42\_sawmill

Just to hammer it in ... More Black, less White and the Pathing closely follows the objects. Again take note of how blocky the Pathmap is compared to the objects.

If you are making a Custom Level from scratch and you intend to add Bot support, you should pay careful attention to building placement, especially if you wish Bots to able to walk inside buildings. A well placed building is very easy to Path as the dimensions of Dice's Objects match the “blockyness” of the Pathmaps, whereas a poorly placed building could be very difficult to path, and maybe even impossible as the doorways may not be able to match up with the Pathmap's available pixels.

It is worth considering making a Pathmap or part of one, as a guide when placing Buildings & other static objects in the early stages of your level construction. This could form part of your planning, and would ensure accurate placement of objects to the Pathmap, which will be very important for buildings or tight locations that you expect the Bots to traverse.

Where you feel a building or is totally unimportant for Bot access, you can be less stringent, and even Path out the building completely to save time.

Continue to the next part to starting Making the pathmap:

BF42 Pathmapping - Part 1-D