problems building contours

43 views
Skip to first unread message

faramir118

unread,
Aug 5, 2010, 2:45:22 AM8/5/10
to recastna...@googlegroups.com
1)

This is a tricky problem that I haven't been able to figure out.  For some reason, navmesh polygons aren't being generated for this spiral stairway.  I can see that there are vertices for the mesh, but not triangles.

All of the intermediate steps look great until the polymesh.  However, if I reduce rcConfig.maxSimplificationError i get better results - but this setting is only used when building contours, and those look normal to me.


2)
I'm also running into a problem in rcRemoveVertex() when nhole = 2 and ntris = 1.  tris[2] ends up being uninitialized.  Should this not happen?

Mikko Mononen

unread,
Aug 5, 2010, 2:59:19 AM8/5/10
to recastna...@googlegroups.com
Hi,

It looks like the spiral staircase gets only one region which overlaps
itself. This in turn makes the triangulation fail, because it assumes
2D input.

Is it possible to get this level geometry and the exact generation
parameters which make this problem appear?

Issue 2 should not happen. Someone else is having similar issue:
http://code.google.com/p/recastnavigation/issues/detail?id=101


--mikko

faramir118

unread,
Aug 5, 2010, 4:42:02 AM8/5/10
to recastna...@googlegroups.com
Thanks Mikko!

I will send you the geometry mesh for that tile specifically.

Probably within a few days I'll try to contribute to Issue 101.  I'm about 20 revisions behind, and I have to resolve some problems that r185 will cause for me ;)

Mikko Mononen

unread,
Aug 9, 2010, 7:40:36 AM8/9/10
to recastna...@googlegroups.com
Hi,

I think was able to reproduce the spiral stair case on a simple test level.

Unfortunately, I don't have a quick fix for it. In the meanwhile you
can call rcBuildRegionsMonotone() instead of rcBuildRegions() to keep
going. It uses slightly different algorithm to create the areas and
does not suffer from the spiral staricase problem. When using the
monotone partitioning the resulting polygons on large open areas areas
are not as nice as with watershed partitioning, which can affect the
resulting path (more detours). If you are using small tile size, the
difference is really small.

I added bug http://code.google.com/p/recastnavigation/issues/detail?id=102
so you can follow the progress. I cannot promise any quick fix as
quite a bit of the code assumes that that case should never happen.
Luckily, the case is simple to catch and should not happen often, so I
might be able to craft some special case code for that.


--mikko

faramir118

unread,
Aug 9, 2010, 1:07:21 PM8/9/10
to recastna...@googlegroups.com
I'm still working on a few other issues but I'll see how well the Monotone regions works.

Thanks for taking a look at it!
Reply all
Reply to author
Forward
0 new messages