» Mon May 31, 2010 11:18 am
Some pointers on Navmesh I picked up over time:
1. Use the "W" key to quickly switch between NavMesh viewing modes, this is very important as you will see.
2. Use the "B" key outside to show the cell boundaries, which is critical for Navmeshing the cell boundaries correctly in exterior cells.
3. Try to make as large of triangles as you can, but in general (as Echonite points out), don't try to get elaborate as the GECK is going to re-write it when your done. Your key goal with NavMeshing should be to cover the areas where NPCs can go.
4. Do not make too-extreme of angles with the triangles, or the GECK will whine about it.
5. You cannot have more than 2,000 Navmeshes in any cell. More than this, and the GECK will error-out. Furthermore, Joystick Monkey says any more than 2,000 is bad for frame rate.
6. The cell boarders in exterior cells are Tricky. What you have to do is Navmesh each side of the boarder and line-up the edges as closely as possible. Each exterior cell has its Own mesh, and they don't physically connect to boardering cells. If you get the meshes at the boarders close-enough, a fat green line will appear at the boarder when you Finalize (see below step 9).
7. The "Tab" key is Huge. You will see this in the tutorial, it allows you to switch which two vertices from the last triangle that you have selected, so you can quickly "walk" your mesh across.
8. The "Test Cell Navmesh" is fabulous, you click it, then click a To and From spot on your mesh (click triangles), and the GECK will draw a fat line across the mesh where it Would send the NPC if it was trying to get from A to B. Its very effective in letting you know where the game would send your NPCs in specific game settings.
9. This takes time to do right, and I strongly recommend the tutorials from Bethesda. I started with them, and thanks to the short-cuts and methods they use I have since Meshed about 12,000-15,000 triangles. Their techniques and short-cuts REALLY make a big difference.
10. When your done with your mesh, do the following:
a. Save.
b. Click the, "Balance for Optimization" button. This will re-write the mesh in a more efficient form and you'll notice the number of triangles drops.
c. Check the mesh, as sometimes Balance can remove triangles if the space is too-narrow for NPCs or too angled. Fix any missing spots as necessary.
d. Click the, "Find Cover Edges" button, which finds the good corners that NPC's can use for cover while in combat.
e. Click the, "Finalize Cell Navmeshes" button, which will finish things up. If you have any errors, they will show up here.
f. Save Again.
Then to Test the Navmesh:
1. Open the Navmesh feature.
2. Select the Path Test button, which looks like a little path with 3 dots (in the middle).
3. Double Left-click two spots in your cell (give a second between the two spots), and you should see a big Green line showing you where the game will path the NPC. If it's not green, then the path was too-long to be efficient for the game engine.
4. Be very careful with this, as you can very easily crash the GECK if you hit Esc or try to do something else while Path Testing. When your done with a path-test, click the Path-testing button to turn off the feature safely.
I use this all the time with my cells to make sure my Navmesh is correct. This is also where you can really see the difference between Optimized and non-Optimized cells.
Luck,
Miax