Title: Creating an AImesh for a Multi-Story Building
Tools Needed: 3ds Max 9 is used because that it has a compatible plug in to be able to export a Battlefield 2 collision mesh. Battlefield 2142 uses the same model format. Other 3d modeling software can be used to create the AImesh and then imported/exported through the obj format, but 3ds Max 9 is needed to create the collision mesh.
This is a collection of tips that are useful in the complicated process of creating an AImesh for a Multi-Story building. This is not a step by step tutorial. This is an advanced tutorial and it is assumed that the reader can already use 3ds Max or another 3d model software to create AImeshes.
Creating AImeshes for complicated objects such as multi-story buildings is a lot different that for simple objects. Trying to check all internal structures can be nearly impossible working through the outside of the building. Therefore, a different approach is required. First of all, I start by reducing the building to the first level. This is the most difficult and important part, and it helps to work on one part of the project at a time. For this example, I am using a 3 - story building that someone asked my a few years ago to create an AImesh. At the time, I was just learning to use 3ds Max and had only created simple AImeshes. This was beyond by abilities to create an AImesh for anything but the first floor. I started the way I recommend that anyone start -- with simple projects and then as your abilities increase, start trying for more complicated ones. Now that I have the ability to handle a complicated project like this one, I decided to use this as a teaching case. So, I am writing this tutorial as I work on the AImesh for the building:
First step is to make a clone and remove all but the first floor as in this image:
Tip: Extend stair ramps
After changing the entryway stairs to a ramp, I extend so that it should end up under the ground. This is helpful to make sure that the ramp will make full contact with the ground. This is a good trick for the main entry ways into buildings to insure the ramp will intersect with the ground so that the building will navmesh, avoiding the errors that the mesh did not intersect with the ground. It takes just a few minutes and anything small thing you can do to avoid a navmesh error is well worthwhile, since it can take hours to generate.
TIP: Block off area under Stairs.
Another technique that I use for stairs is to make them more than just a ramp by block off the area underneath. This prevents bots from getting stuck trying to travel underneath as well as making it easier to create.
TIP: Remove unneeded walls and reduce remaining walls to half height.
This step is to remove all but the interior walls and to make those half height. This makes it a lot easier to see into the interior and make sure that all the walls are enclosed. This image shows the back of the bottom floor:
Since the bottom floor is raised above ground, the outside walls are not needed and can be removed. Without those walls and working on only one floor at a time it makes it a lot easier to work on the inside of the building.
Once the bottom level is cleaned up, it will be good to test it out. The stairs and ramps may be too steep and the angle might have to be adjusted.
After that, the last two levels are probably easy enough to work on together as a separate object and joined to the base once it is completed.
All that being said, stairs work better than ramps. . More on that here:
And here is the bottom with stairs replacing the ramps. Now is a good time to do a Navmesh test.