Navmesh Creation Workflow

From GECK
Jump to: navigation, search
This article is incomplete. You can help by filling in any blank descriptions.
Further information might be found in a section of the discussion page. Please remove this message when no longer necessary.

This guide will help you understand the process for creating a navmesh, and guide you through how to set up a navmesh. If you're not clear on exactly how to create a navmesh, go Here first and learn the basic controls. It is also assumed that you are familiar with how to get around in the editor.

Navmesh Creation

Making and Manipulating Navmesh by Hand

  • explain how to make navmesh by hand, benefits, drawbacks, useful scenario.
  • explain how modifying navmesh after generation is necessary, and how to do it.
  • Explain differences between modifying indoors and outdoors.
    • b key and n key benefits
    • can't NM between exterior cells
    • match verts between exterior cells

Editing Vanilla Game Navmeshes

When making edits game navmeshes (Navmeshes in vanilla game ESMs such as FalloutNV.ESM, Fallout3.ESM and the DLCs for both games) for your own mod DO NOT merge a vanilla game navmesh to ANY other navmesh records by merging vertices, as doing so will cause the GECK to delete the vanilla game navmesh and swap it out with a new record which is improper modding practice and could lead to instability issues. Instead ALWAYS build off the existing vanilla navmesh.

To properly build off a navmesh, ctrl click 2 existing vertices on the same record and while the ctrl key is still held right click in an empty space to create a new vert which will automatically create a new triangle. Or select 3 vertices on the same navmesh record and hit the A key to create a new triangle that way. NEVER create an isolated triangle and then merge it into vanilla game navmeshes.

Navmesh records can be viewed in the Cell View Window in the right pane list.

Generating Navmesh

This development tool was designed for rapid generation of basic navmesh for area. The nature of archived art files removes the data this tool used to approximate navmesh. This documentation is left as an educational tool, and may prove useful to some modders, particularly those using entirely new art assets.

Interiors

Some people prefer to work from a simple navmesh and add detail, while others prefer to create a complicated navmesh and clean it up until it works.

  • Alternative 1: Generate Complex Navmesh and Cleanup - The most straightforward way to generate complicated navmesh and then clean it up is to create a nearly finished cell, complete with rubble piles, chairs and tables, big rocks and anything else that may have an impact on navigation.
    • Doing this will take a long time to generate the navmesh
    • It can often come out looking like quite a mess.
    • It's often helpful to marquee select a bunch of verts together and press the Q button to merge them all together.
  • Alternative 2: Generate Simple Navmesh and Add Complexity by Hand - The alternative is to do a basic layout with kit pieces and generate navmesh just for that.
    • Navmesh generates pretty cleanly on bare kits, with the exception of the metro kit.(Just navmesh the metro kit by hand and save yourself the trouble of trying to generate navmesh for it.)
    • As you add smaller objects to the scene that can block movement you can cut them out of the simple navmesh.
    • There is a cut object feature which it accessible through the toolbar and through Advanced Navmesh Generation. Hold Ctrl+Alt, and then click on the object you want to cut from the navmesh, then press the "Cut Selected Objects" button. Sometimes this works beautifully and sometimes it makes a horrible mess. You may find it easier to cut out navmesh by hand. Simply delete the surrounding navmesh and draw the detail parts in by hand.

Exteriors

Exteriors work a little differently than interiors. An interior is a single cell, while an exterior is a grouping of cells. Because of this navmesh has to be handled a little differently.

  • You cannot navmesh outside of the cell you are working in. Navmesh verts will try to stay within the current cell.
  • Turn on cell borders by pressing the "B" key. The borders will be represented by dashed yellow and black lines on the terrain.
  • Pressing the "N" key turns off/on all surrounding cell's navmeshes. Sometimes this is helpful because it increases performance of the editor. You will probably want it on when working with or near cell borders. If you want to work in another cell, moving the camera above another cell and saving (ctrl+s or the save menu button) will make the navmesh display in the cell the camera is above.
  • Sometimes cells in the wasteland take a very long time to load when moving the camera around. Pressing F5 will reload the scene, and will often cause the cell to load faster.
  • You can increase performance when working in big exteriors by setting uGridsToLoad=3 in the GECKCustom.ini file. Now only 3x3 cells will load instead of 5x5.
  • Prepare the outside edges of cells for finalizing by trying to match up the verts and edges of one cell with the verts and edges of the adjacent cell. More info on this topic in the section about finalizing.

Heightmap Only Generation

Heightmap only mode is usually the best option when generating outside, especially if there are few buildings or large overhanging structures. Heightmap generation works by dropping a grid of points from the sky onto the ground, and then drawing triangles between those points. Some triangles are not drawn if the angle between points is too steep. Many small triangles are also condensed into larger triangles. This option is not available when navmeshing interiors.

  • Heightmap Resolution defines how fine of a grid is used when generating. I personally use 64 or 32, as the heightmap generation process seems to give better results with these values. The smaller the number, the longer the generation time. Try to maintain units that are multiples of 2, and you probably don't want to go under 16 units. Use 128 or even 256 for large, rolling hills with little surface detail.
  • No navmesh is drawn under overhangs. This includes overpasses, bridges, near buildings, rock outcroppings, etc.
  • Thin, tall edges are often ignored by this process. Standing walls from destroyed houses are often completely missed by this type of generation. Also keep an eye out for trees, fences, signposts, traffic posts and other tall, thin objects that may have to be tweaked by hand.
  • Reducing the number of triangles in the navmesh by hand can help reduce complexity and processing time, but try to maintain the contour of the landscape as much as possible.
  • Cell borders often match vertices properly allowing for an easy finalize pass, but corrections are sometimes needed to be done by hand.
  • This process works nearly flawlessly on rolling, grassy hills with few detailed sections. The more complex the layout is, the more hand-tweaking needs to be done afterwards.
  • Be sure to delete any sections of navmesh that get generated in inaccessible areas, such as on top of or inside of buildings.

Non-Heightmap Generation

Non-Heightmap generation should rarely be used outside. It often creates overly complex navmeshes, especially when roads and sidewalks are present. This type of generation often takes a long time, and much hand tweaking must be done after generation. If your outdoor area is too complex to use heightmap generation, you may want to investigate simply doing the navmesh by hand.

Navmesh Detail

Cover

Cover is extra information in the navmesh that is used by the AI to help them with combat. It's not hard to set up, and you should definitely learn how to do this.

Helpful Editor Stuff

  • Find Cover Edges - This is a great command that should be used before you do any cover by hand. If you are lazy or pressed for time, you could probably get away with running this command and just being done with cover. If you are working on an area with heavy combat, it would be a good idea to go beyond just running "Find Cover Edges" which is found in the Navmesh menu and on the toolbar. Ledge cover must be done by hand and is not created with this function.
  • Draw Cover - This is a great visual debugging tool that lets you see where cover is being drawn. It's a small hit on performance, but provides a lot of information on cover edges and cover height.

Cover Types

Selecting an open edge and pressing "e" will open the cover menu. Here you can set details on edge cover and the cover type. Edge cover is represented by a black bar on the side of the cover rectangle when in Draw Cover mode. Often, every single possible cover location does not need to be marked as cover, as long as enough cover in the area is marked so that AI can utilize it effectively. More doesn't generally hurt, however.

  • Max Cover - Drawn in white. AI will never try to shoot over the top of Max Cover, but will hide behind it and shoot around marked cover edges.
  • Various cover heights - Drawn in dark blue. AI will check the actual height to see if they can shoot or throw throwables over it, and they will also check to see if they need to crouch behind the cover to hide. They will either stand to shoot or throw, or come around a cover edge to shoot. Try to set these heights as accurately as possible. The heights can be easily matched to the cover object in Draw Cover mode.
  • Open Edge, No Cover - Drawn as a yellow line. This is the default cover type, and is used when there is a blocking obstacle that will not provide cover.
  • Wall Cover - Drawn as a black line. AI understands there is a wall here, and could use that to its advantage. This type of cover is not as important as many other types, and the generation pass marks sufficient cover of this type.
  • Ledge Cover - Drawn in baby blue, and in "Draw Cover" mode will point downwards rather than upwards like other cover. AI using ledge cover information will know to back away from a ledge in order to take cover from an opponent below.

How Cover Affects AI

  • A fleeing NPC/Creature can use cover as a place to hide. They will often crouch behind a cover area.
  • A fighting NPC/Creature can use cover to hide behind in-between firing ranged attacks, especially when reloading.
  • A fighting NPC/Creature using ranged attacks will prefer to stand behind waist-high cover when firing.
  • An ambushing NPC/Creature may look for cover when hiding before the ambush.

Path Marking

Besides cover, there are other ways to add information to the navmesh. This will cause AI to behave differently.

Preferred Pathing

Select Navmesh triangles and press "P". Represented by golden triangles.

  • Making a path of preferred triangles through the navmesh means that Creatures/NPCs will try to use those particular triangles more than other triangles.
  • Marking a preferred triangle with a cover edge will make NPCs want to use that particular cover location more than others. This is a great technique when setting up firefights.
  • Preferred Pathing is bugged in that it will cause actors to follow the preferred pathing even in combat which severely hampers the combat capability of melee only actors as they will often take a long path around as a result of following the path to get to their chosen target.

Water

Select Navmesh triangles and press "O". Represented by blue triangles.

  • NPCs and Creatures with the "Swims" flag can enter and use navmesh triangles marked as water, Creatures that do not have the flag will avoid using water triangles. Mark any deep water areas with water navmesh triangles. If you can swim in an area, mark the navmesh there blue.

Drop Downs

You can mark certain edges as safe places for NPCs/Creatures to jump down from a ledge to a lower area. Be warned that they are very trusting, and may jump down anywhere that has a drop down marker, even if it could hurt or kill them.

  • Select the top and bottom edge (order not necessary) and the press "P"
  • Drop Downs are marked by a pinkish purple marking on the top and bottom connected edge.
  • Only use drop down markers in places that NPCs/Creatures can safely jump down.
  • It's a good idea to have the lower edge be in front of the top edge, otherwise the NPC/Creature can get stuck trying to drop down.
  • Finalizing may sometimes wipe this information, and may have to be done after you finalize. Be sure to check your dropdowns after finalizing.
  • Good for allowing NPCs/Creatures to follow player instead of running around, taking the long way.
  • Good for allowing followers to keep up with you.

No Large Creatures

Select Navmesh triangles and press "L". Represented by gray triangles. Marks triangles as not safe for large creatures. A actor is considered large with fPathingLargeActorRadius.

Navmesh Cleanup

A few processes need to be done at the end of Navmesh creation.

Finding Errors

When you save, you may get an error message regarding the navmesh.

  • If you go to the cell that the navmesh is in, hit ctrl+F and search the navmesh for errors.
  • If outside, you will search whatever cell your camera is in.
  • If you are navmeshing a big outside area, it may be useful to search for errors as you work.


For a more detailed walkthrough on how to fix errors in a navmesh click here

Finalizing

This is generally the last thing done on a cell. If you edit a navmesh, you should be sure to finalize it afterwards.

  • When finalizing interiors and exteriors, check to make sure that each door has a green triangle appropriately nearby. When an NPC/Creature stands on that triangle, they can use the nearby door. If no green triangle exists near a door, AI does not know how to use the door.
  • When in an exterior, navmeshes must remain in their own cell. There must be a way to connect the two adjacent navmeshes together.
    • Make sure all of the edges of one exterior cell's navmesh lines up properly with the navmesh of the nearby cells.
    • Pressing "W" until in "navmesh only" view mode is helpful
    • Pressing "N" if in single-cell navmesh view mode will return to multi-cell view mode.
    • Make sure that the verts of the two navmeshes line up in every way possible, including height.
    • After finalizing, adjacent navmeshes will have thick green lines around their borders if properly linked together.
    • If thick green lines do not appear between different cell's navmeshes, adjust verts and edges until they line up properly.
    • If you don't have thick green lines between adjacent navmeshes, NPCs/Creatures cannot path from one cell to the other. This is very bad, and will cause AI to do very strange things.

To Do

Look into pitfalls of multiple .esp modifying wasteland navmesh
Make sure that every action has an explanation for performaing that action in the editor.
Make sure everything is explained as a progression.
remove non-heightmap generation, as the public version shouldn't have it

See Also