I thought of a good way to set my Ai path nodes. I'm using a texture. Check out the attached image.
All you do is create a 512x512 texture that parallels your landscape. Wherever you want a node you draw a single white pixel. It's good for placing nodes exactly where you want them to in your landscape. Here is the code - easily translatable to any language.
Public Sub MakeAiPathNodesTexture(AiTexture As Long)
Dim minLandscapeVec As TV_3DVECTOR
Dim maxLandscapeVec As TV_3DVECTOR
Dim textureSize As Single
Dim VectorArrayX(1000) As Single
Dim VectorArrayZ(1000) As Single
Dim HitCount As Long
textureSize = 512
Landscape.GetBoundingBox minLandscapeVec, maxLandscapeVec
Set AiPath = New TVAI
AiPath.InitNodeSystem
AiPath.SetNodeSystemParameters 1000, 500
Dim X1 As Long
Dim Y1 As Long
Dim TexVal1 As Long
Dim Red1 As Integer
Dim Green1 As Integer
Dim Blue1 As Integer
Dim LandToTextureRatio As Single
LandToTextureRatio = TVMath.GetDistance2D(minLandscapeVec.X, 0, maxLandscapeVec.X, 0) / textureSize
For X1 = 0 To textureSize - 1
For Y1 = 0 To textureSize - 1
TexVal1 = TVTextures.GetPixel(AiTexture, X1, Y1)
Long2RGB TexVal1, Red1, Green1, Blue1
If Red1 > 225 Then
VectorArrayX(HitCount) = minLandscapeVec.X + (X1 * LandToTextureRatio)
VectorArrayZ(HitCount) = minLandscapeVec.z + (Y1 * LandToTextureRatio)
HitCount = HitCount + 1
End If
Next Y1
Next X1
For i = 0 To HitCount
AiPath.AddNode VectorArrayX(i), 0, VectorArrayZ(i)
AiPath.EnableNode i, True
Next i
AiPath.CreateNodeGraph True
PathFinderEnable = True
End Sub