Navmesh triangles

Post » Fri Dec 17, 2010 8:34 pm

I've embarked on my first effort at creating a navmesh following http://geck.gamesas.com/index.php/gamesas_Tutorial_Navmesh.

It mentions long narrow triangles being undesirable, also that use of the 'Balance' tool is useful. When I do this however, it creates a number of long thin triangles, 8:1 or so proportionately. Is there a rough rule of thumb side:base ratio which shouldn't be exceeded?
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Fri Dec 17, 2010 10:40 am

As a general rule, bigger triangles are best as they require less work overall for the engine to path the NPCs. However it is Not a hard requirement, the hard requirement is 2,000 triangles. Go above that and your going to have problems.

There is some debate over the use of "Balance for Optimization", some modders love it, some don't. I personally find it useful after I first navmesh a cell, as it tends to make a more efficient arrangement of navmesh triangles than I can alone. However the balance tool Will remove triangles if the pathway your trying to make is too narrow for big NPCs to pass over. For example if you have a very narrow passageway (one in which a sentry robot could not fit), the balance tool will remove the path as "invalid". This doesn't mean the path won't work for thin NPCs like people, it will, but in-game big NPCs can get stuck on a thin passage and be unable to get through. If the balance tool removes a very thin pathway, its a good idea to widen the path and try again - its an easy way to know if a particular pathway is too narrow or not. Balance will also remove extreme angles if you make a path at > than 45 degrees, or if the engine thinks that a particular triangle/set of triangles is too steep for NPCs to path-over, it will remove them too.

That said, you can make a Navmesh for a cell that you Never balance, and the game engine will work it just fine. NPCs may struggle on super-narrow paths or extreme angles if you have any, but the engine will still accept it. Generally I will navmesh an entire cell, balance it one time, and correct any mistakes the balance tool made (any triangles it removed), and go from there. Regardless of whether you use the Balance for Optimization tool, you should Always use the "Find Cover Edges" tool and then "Finalize Navmesh" - those are required and won't change your mesh in any way.

Luck!

Miax
User avatar
Cartoon
 
Posts: 3350
Joined: Mon Jun 25, 2007 4:31 pm

Post » Fri Dec 17, 2010 8:13 pm

Thanks Miax. I'll carry on then!
User avatar
Kelly Upshall
 
Posts: 3475
Joined: Sat Oct 28, 2006 6:26 pm

Post » Fri Dec 17, 2010 7:36 pm

More questions, one OT one not.

When testing the navmesh, I've noticed that on some gaps you get a green path if the path is straight and perpendicular to the gap but yellow if it has to curve through the same gap. I have been rearranging things until it's green no matter what but is this strictly necessary?

On an unrelated matter: One particular vanilla corner room mesh appears dark from a distance but normal as you get closer (in game). I thought initially I had doubled up or moved it slightly but everything is correct as far as I can tell. Any ideas?
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Fri Dec 17, 2010 8:45 pm

1) Green means its the 'teleport' navmesh marker. You probably have a 'door' marker above it. Don't worry about it. I think yellow means you set it as a 'preferred pathing' navmesh.

2) That is typical. It happens in the Vault 101 tutorial as well. Its because your light source might 'partially' light the tile and the game engine has trouble with it.
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Fri Dec 17, 2010 10:41 am

Thanks for the reply Williesea. Though I may not have explained my first question clearly enough.

I haven't set any prefered path and am nowhere near a teleport marker. I'm testing the navmesh (the button with three dots on a line). I right click on one part of the cell and then a second. A green line (mostly! connects the two points.

On very narrow gaps I get a yellow line and dot. On slightly narrow gaps, the colour varies according to the path I make: straight and perpendicular=green, curving from around a corner=yellow.

As for the second question, cheers - I'll try adjusting the light sources.
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Fri Dec 17, 2010 6:08 pm

Oh, I never use the 'test feature'. I have no reason to since where I path is where I want the NPC's to be able to go.
Thin navmesh would not allow something big, like a super mutant. So the testing may flag it as such. But if you have no supermutants in the cell, it does not matter.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Fri Dec 17, 2010 1:15 pm

Ah right, that'll save me some stuffing around. Thanks WillieSea :)
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm


Return to Fallout 3