Recast Nav Mesh Generation Questions

742 views
Skip to first unread message

Ganaboy

unread,
May 5, 2013, 12:40:24 AM5/5/13
to recastna...@googlegroups.com
Hello,

Firstly i would like to thank for making recast available.
I am using recast for soon to be released IOS/Android game.

Alright here is my issue and details:

World bounds - (-5000.0,-71,-5000.0) to (5000.0,71,5000.0)
What you see in the screen shots is 2049 x 2049 height map (scaled to 5 times)

1 unit - approx 1m

Right now with those parameters in screen shot i have 1600 tiles for world(tile size 256)

Total recast data amounts to around - 3mb

Questions
1> I have reserved atleast 5 mb of space for recast(so memory is not a constraint) , is it a really a signification  performance problem  if  all tiles are loaded in nav mesh memory as compared  to only load local tiles (around a radius of player) ?
2> I am getting some wierd large triangles when generating nav mesh(it seems to be related to the parameters i have used). i do not seem to have issues with it atm since the triangles are where the mesh reaches unwalkable areas. will this cause some serious path finding issues?




Thanks and regards,
Ganaboy




RecastTest.png
RecastTest2.png

Mikko Mononen

unread,
May 5, 2013, 1:30:52 AM5/5/13
to recastna...@googlegroups.com
If you have less data usually the cache behavior is better. Other than if you have small navmesh, the worst case beavior (no path found, needs to visit all connected polygons), is likely to be faster.

For the second question I'll need to see at which point in the algorithm the problem occurs.


--mikko






--
 
---
You received this message because you are subscribed to the Google Groups "recastnavigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recastnavigati...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ganaboy

unread,
May 5, 2013, 6:19:15 AM5/5/13
to recastna...@googlegroups.com

Hello Mikko,

I have additional debug screen shots attached with this mail.
It has navmesh,voxels,voxels walkable,poly mesh ,detail mesh.

Some observations
1>The artifact is only present in detail mesh/nav mesh - so maybe a problem with debug draw.
2> Serialize the data , and then load it back again later, by rebuilding that specific tile makes the artifact goes away.
3> The edge length really matters a lot (reducing max edge length reduces the number of artifacts) - but reducing edge length increases data size which is understandable.

Please let me know if you need more screens.

Thanks,
Gana
BothContous.png
DetailMesh.png
NavMesh.png
PolyMesh.png
Voxels.png
VoxelsWalkable.png

Ben Hymers

unread,
May 8, 2013, 5:24:16 AM5/8/13
to recastna...@googlegroups.com
That looks like a problem in either the contour simplification stage or the triangulation stage (during detail mesh generation).

Contour simplification can go wrong with very thin or oddly shaped regions. The easiest fix is to tweak your min/merge region sizes to make sure these regions don't get generated in the first place. I don't *think* that's what's happening here as your simplified contours look fairly normal.

Triangulation can go wrong seemingly at random because the delaunay triangulation code is a bit crazy (see here: https://code.google.com/p/recastnavigation/issues/detail?id=173). Make sure you're keeping the log from Recast and have a look for any warnings related to triangulation. In that case you'll need to fix up some code (see the linked issue). I've made those fixes locally which has fixed some similar cases to what you're seeing, but I made those changes at work and I'm not sure if I'm allowed to contribute them back yet.

Hope that helps a little bit!

Ben
Message has been deleted

Ganaboy

unread,
Jul 5, 2013, 2:29:51 PM7/5/13
to recastna...@googlegroups.com
Hello Ben.

Thanks for the insight on the matter. The link u posted is same issue as i have . When sample distance is set to 0.0 the large weird triangles are gone.

Thanks and Regards,
Ganaboy
Reply all
Reply to author
Forward
0 new messages