Navmesh a Long Wooden Bridge

Navmesh a Long Wooden Bridge

by [TLB]stickman

Image File: LB\_image18.png

Now you have to ask yourself one question. Are you going to navmesh this bridge? Well, are you, Punk.
I have learned through experience that this “nice-looking” bridge won’t navmesh worth a dam. We have to move some bridge sections vertically (just a little bit) to have a “step” effect. Let me show you what I mean.

Image File: LB\_image19.png

We want to start with wooden\_bridge\_head1. First things first though. Make sure that it is Snapped to Ground. Zoom your camera underneath the bridge head and make certain that the terrain underneath the bridge “ramp” does not touch the bridge object. If it does, use the Level tool in the Terrain Editor to lower the terrain.

Image File: LB\_image20.png

Hints:
If you double-click the first bridge segment and write down the Y/Pitch value, then subtract the Y/Pitch value of the bridge head, you will see a difference of 2.11378. You can use this number if you want to build your bridges in place one piece at a time instead of building the complete bridge first as we did in the first part of this tutorial. Just snap your bridge\_head1 to ground, and then double-click the bridge head. Then add 2.11378 to the Y/Pitch value shown and use that value for all of your bridge segments. This will be your starting position.
The Stamp-Align buttons in the General tab of your editor do not work properly for the wooden bridge. It aligns the wrong end of the bridge heads to the bridge segments! It won’t align two segments either; it just stacks them on top of each other at the same elevation.

If that much looks good, then we’ll continue. Double-click the bridge segment closet to bridge head 1. In the Absolute Transformation box that pops up, decrease the value in the Position – Y/Pitch window by 0.01. For example, if the original value displayed was 30.85400, you will change it to 30.84400 for this segment. Now go to the next bridge segment and reduce it by 0.02 less than the previous segment. So using the previous example, this segment will be changed to 30.82400 now. Do this for the remaining segments, reducing the Y/Pitch value by 0.02 from the previous segment as before. Now select bridge\_head2 and nudge it down a little (using the keyboard) so that it is just a small step lower than the last segment. If the terrain under this bridge head touches the object, you will need to lower the terrain as we did with the first bridge head.

Image File: LB\_image21.png

I would recommend that you test your bridge’s navmesh prior to navmeshing your entire map, particularly if you have a large map. You can easily do this by creating a small Combat Area around your bridge, making sure to select the “Used by Path Finding” box after closing the Combat Area. Then run the navmesh program. It will only take a short while (a couple hours perhaps) and can save you many hours later on when you are ready to run the final navmesh. Make sure the Combat Area is on the Single Player layer of your level!

Image File: LB\_image22.png

After you run the Navmesh program, open your level to verify that the bridge did navmesh properly. Be sure to select “Toggle Draw AI” from the Render Menu, and also “Toggle Draw Vehicle Navmesh”. If the Vehicle mesh is good, the Infantry mesh should also be good.

Image File: LB\_image23.png

Although I did not actually run navmesh on this sample bridge for this tutorial, I want to show you an example of a completed bridge navmesh.

Image File: LB\_image9.png

From the looks of this, the navmesh did not make it to the right-hand side of the bridge, but looks can be deceiving! If you turn off the “toggle draw static meshes” from the Render Menu,

Image File: LB\_image12.png

You’ll see that the navmesh did indeed go all the way across. So be sure to turn off the static meshes when verifying that your navmesh is good or bad. You wouldn’t want to run navmesh again would you? Well, would you?

Image File: LB\_image14.png

After your navmesh is finished, be sure to raise your bridge segments back up to the original height before you run your lightmaps.
Well, that’s about it. I hope this is of some help to the mapping community. I am new at it myself, and have found a wealth of info and tutorials in the BFEditor forums. It has been a great help to me and I wanted to share what I have learned with the rest of you.