Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

Yea possibly the old vmap code does not freeze on such values, due to totally different data structure/algorithms, but those values are clearly waaaay beyond any valid map coords...

just look at 'bool IsValidMapCoord(float c)' in GridDefines.h, i don't really see the point in checking values *again* because someone else might have forgotten his validity checks...

I think i'll add an assert() actually, this will give clear indication that someone screwed up earlier...

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

I run a very quick test of the latest revision and it looked like it had some new problems with certain areas. Zul'Gurub (309), and at least parts of Stranglethorn (try Booty Bay) and Elwynn Forest returned numerous "Path Build failed: invalid start or end polygon". I'll try to rebuild 000 when I come back, but rebuilding 309 didn't help.

Link to comment
Share on other sites

"invalid start or end polygon" can happen under normal circumstances

If a player is airborne, such as from a knockback effect or jumping off of a cliff, he may go too far from the navmesh. This makes the end polygon invalid, and thus no path can be generated.

I have some ideas on how to deal with this.

In the mean time, try to reproduce it to verify that the failure is a problem with the navmesh, and not with my core implementation (which I'll improve later)

Only way to do this is to go to the creature with the GUID that produced the error and try to make it happen again (make sure you stay on the ground).

edit: There is indeed a problem with Zul'Gurub. It's now on my list of things to fix.

Question about pet behavior - if you jump off of a cliff, should they follow using pathfinding or should they go over the cliff with you?

Link to comment
Share on other sites

Lastest change, feels good to have it out of the way.

Example is the cave leading to the exit of instance 269 - CoT Dark Portal

Before: http://img9.imageshack.us/i/outsidec.png/

After: http://img824.imageshack.us/i/outside2.png/

If you want to take advantage of this change, you must recompile both contrib/extractor and contrib/mmap, and run them both.

Link to comment
Share on other sites

For the 'airborne" player, could you check if the player is "on the map" and if not, generating path with the z coordinate under the player, and after a X amount of time the mob should evade, like said i don't remember where.

What's the behaviour of a mob which as no path to the player(in a normal case i mean, like player on a wall which can be reach only by special jump location) ?

Link to comment
Share on other sites

i have errors compiling the vmap_assembler in maptree.obj:

MapTree.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall ACE_Stack_Trace::c_str(void)const " (__imp_?c_str@ACE_Stack_Trace@@QBEPBDXZ) referenced in function "public: bool __thiscall VMAP::StaticMapTree::isInLineOfSight(class G3D::Vector3 const &,class G3D::Vector3 const &)const " (?isInLineOfSight@StaticMapTree@VMAP@@QBE_NABVVector3@G3D@@0@Z)

3>MapTree.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_Stack_Trace::ACE_Stack_Trace(int,unsigned int)" (__imp_??0ACE_Stack_Trace@@QAE@HI@Z) referenced in function "public: bool __thiscall VMAP::StaticMapTree::isInLineOfSight(class G3D::Vector3 const &,class G3D::Vector3 const &)const " (?isInLineOfSight@StaticMapTree@VMAP@@QBE_NABVVector3@G3D@@0@Z)

also errors in bulding movemapgenerator:

1>MapTree.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall ACE_Stack_Trace::c_str(void)const " (__imp_?c_str@ACE_Stack_Trace@@QBEPBDXZ)

1>MapTree.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_Stack_Trace::ACE_Stack_Trace(int,unsigned int)" (__imp_??0ACE_Stack_Trace@@QAE@HI@Z)

Link to comment
Share on other sites

Building map 000:

We have 687 tiles.

[34,46]: Building polymesh...

Unhandled exception at 0x01073c83 in MoveMapGen.exe: 0xC0000005: Access violation reading location 0x0d7beef4.

>    MoveMapGen.exe!removeVertex(rcPolyMesh & mesh={...}, const unsigned short rem=8797, const int maxTris=9233)  Line 740 + 0x15 bytes    C++
    MoveMapGen.exe!rcBuildPolyMesh(rcContourSet & cset={...}, int nvp=6, rcPolyMesh & mesh={...})  Line 1066 + 0xd bytes    C++
    MoveMapGen.exe!MMAP::MapBuilder::buildMoveMapTile(unsigned int mapID=0, unsigned int tileX=34, unsigned int tileY=46, float * verts=0x05490024, int vertCount=178597, int * tris=0x05c10024, int triCount=114518, float * bmin=0x0021f7f8, float * bmax=0x00000000, dtNavMesh * navMesh=0x006f88d8)  Line 726 + 0x1b bytes    C++
    MoveMapGen.exe!MMAP::MapBuilder::build(unsigned int mapID=0)  Line 241 + 0xab bytes    C++

+        mesh    {verts=0x042ea658 "X X<![9#^:%]3#X1%W0X'X1']=%Y?‹‹’Ž•–’“““‘š‰‘¼Žsº‰qº†i¼Šh½ƒ`·x]´x^´iX¼fVÉiWÌiVÍcNÙoOÚpMÕ`IÕZEÔ\\DÌm>Ìh9Îa7Áf3Àk5ºj5¹a1´Z/¶V-¾\\/¾c2ÕV>çWFïiMìpPßyPÞRà€Sá‚TãƒUáŠWàŒXá‘[ä’\\ãœ`ÖžaÛ°fÞ§aä¤gå‰XçƒW polys=0x067e6c98 "⍈⍉⍊⍇⍄⍅⍆ r    rcPolyMesh &
       rem    8797    const unsigned short
       maxTris    9233    const int
       numRemovedVerts    106117948    int
+        thole    {ptr=0x005f1130 }    rcScopedDelete<int>
+        harea    {ptr=0x00c22cf8 }    rcScopedDelete<int>
+        tris    {ptr=0x00615bb8 }    rcScopedDelete<int>
+        tverts    {ptr=0x006f90e8 }    rcScopedDelete<int>
+        pareas    {ptr=0x005f11c0 ">" }    rcScopedDelete<unsigned char>
+        tmpPoly    0x00615b24 ""    unsigned short *
       nharea    7311592    int
       nhreg    6230464    int
+        hreg    {ptr=0x00c22cc0 }    rcScopedDelete<int>
+        hole    {ptr=0x00c22c88 }    rcScopedDelete<int>
       nvp    6    const int
+        pregs    {ptr=0x005f1150 "<" }    rcScopedDelete<unsigned short>
+        polys    {ptr=0x00615b18 "≕⍃" }    rcScopedDelete<unsigned short>
       npolys    4    int
+        edges    {ptr=0x06533b38 }    rcScopedDelete<int>
       nedges    6380472    int
       hasRem    false    bool
       i    1    int
       match    false    bool
       i    6230320    int
       r    251    const int
       ea    1    const int
       a    255    const int
       bestMergeVal    1    int
       bestEb    0    int
       bestEa    0    int
       j    3    int
       ea    2    int
       eb    0    int

Link to comment
Share on other sites

i have errors compiling the vmap_assembler in maptree.obj:

...

also errors in bulding movemapgenerator:

Search for ASSERT in MapTree.cpp and comment the lines out.

Building map 000:

We have 687 tiles.

[34,46]: Building polymesh...

Unhandled exception at 0x01073c83 in MoveMapGen.exe: 0xC0000005: Access violation reading location 0x0d7beef4.

I noticed that on some maps while I was testing hiResHeightmaps true, but I wasn't able to figure out what was causing it. I'll invest more time in it soon.

Link to comment
Share on other sites

core crash:

#0  0x0000000000e84afb in dtNavMesh::findPath (this=0x7f3fc8958cc0, startRef=4554, endRef=4371, startPos=0x7f3fd9dff7b0, endPos=0x7f3fd9dff7a0, filter=0x7f3fd9dff7c0, path=0x7f3fd9dff6d0,
   maxPathSize=50) at /***/src/shared/pathfinding/Detour/DetourNavMesh.cpp:1426
#1  0x0000000000ba7434 in PathInfo::Build (this=0x7f3fc8d1a0e0, startPoly=4554, endPoly=4371) at /***/src/game/PathFinder.cpp:159
#2  0x0000000000ba7979 in PathInfo::Update (this=0x7f3fc8d1a0e0, destX=-1691.33264, destY=5659.24512, destZ=129.504044) at /***/src/game/PathFinder.cpp:302

(gdb) frame 0
#0  0x0000000000e84afb in dtNavMesh::findPath (this=0x7f3fc8958cc0, startRef=4554, endRef=4371, startPos=0x7f3fd9dff7b0, endPos=0x7f3fd9dff7a0, filter=0x7f3fd9dff7c0, path=0x7f3fd9dff6d0,
   maxPathSize=50) at /***/src/shared/pathfinding/Detour/DetourNavMesh.cpp:1426
1426                            if (!passFilter(filter, neighbourPoly->flags))

(gdb) list
1421                            it = decodePolyIdTile(neighbourRef);
1422                            ip = decodePolyIdPoly(neighbourRef);
1423                            const dtMeshTile* neighbourTile = &m_tiles[it];
1424                            const dtPoly* neighbourPoly = &neighbourTile->polys[ip];
1425
1426                            if (!passFilter(filter, neighbourPoly->flags))
1427                                    continue;
1428
1429                            dtNode newNode;
1430                            newNode.pidx = m_nodePool->getNodeIdx(bestNode);

(gdb) info locals
neighbourRef = 36954
neighbourTile = 0x7f3fc948f3c0
neighbourPoly = 0xb40
actualNode = 0x7f3fc94ab590
newNode = {cost = 1164.89551, total = 1406.19629, id = 36836, pidx = 463, flags = 3}
edgeMidPoint = {5880.69141, 201.915756, -1627.60815}
h = 241.300842
i = 8352
bestNode = 0x7f3fc94ab590
previousEdgeMidPoint = {5880.69141, 201.915756, -1627.60815}
bestRef = 36836
bestTile = 0x7f3fc948f358
bestPoly = 0x7f3fd6b5bfe0
parentRef = 36835
parentTile = 0x7f3fc948f358
parentPoly = 0x7f3fd6b5bfc0
H_SCALE = 0.999000013
lastBestNode = 0x7f3fc94a98a0
node = 0x27a0279
startNode = 0x7f3fc94a98a0
lastBestNodeCost = 12.7146883
it = 8
ip = 90
prev = 0x116000000000000
n = 2

(gdb) frame 1
#1  0x0000000000ba7434 in PathInfo::Build (this=0x7f3fc8d1a0e0, startPoly=4554, endPoly=4371) at /***/src/game/PathFinder.cpp:159
159             MAX_PATH_LENGTH);   // max number of polygons in output path

(gdb) list
154             endPoly,            // end polygon
155             startPos,           // start position
156             endPos,             // end position
157             &filter,            // polygon search filter
158             pathPolys,          // [out] path
159             MAX_PATH_LENGTH);   // max number of polygons in output path
160
161         if(m_length == 0)
162         {
163             // only happens if we passed bad data to findPath(), or navmesh is messed up

(gdb) info locals
z = 129.504044
endPos = {5659.24512, 129.504044, -1691.33264}
endOffPoly = true
x = -1691.33264
distanceEnd = 162895.938
pathPolys = {1112399085, 3305285359, 1169022532, 1112399085, 3305316898, 32575, 3892458608, 32575, 1184009216, 1177697712, 1124626231, 1124168764, 3655333744, 32575, 11424151, 0, 876, 68355090,
 1048, 0, 30932992, 475, 0, 1057161217, 0, 0, 1065353216, 32575, 3655333788, 32575, 3355741664, 4566, 1210235885, 1210375377, 1210235885, 0, 3655333808, 32575, 15214174, 0, 1169218038, 1124172041,
 3302189733, 0, 3655333844, 32575, 3655333848, 32575, 3655333852, 32575}
y = 5659.24512
startPos = {5671.84717, 130.621948, -1692.72034}
startOffPoly = true
distanceStart = 165282.594
filter = {includeFlags = 65535, excludeFlags = 0}
i = 0

(gdb) frame 2
#2  0x0000000000ba7979 in PathInfo::Update (this=0x7f3fc8d1a0e0, destX=-1691.33264, destY=5659.24512, destZ=129.504044) at /***/src/game/PathFinder.cpp:302
302                 Build(startPoly, endPoly);

(gdb) list
297                 m_pathPolyRefs = temp;
298             }
299             else
300             {
301                 // waste of time to optimize, just find brand new path
302                 Build(startPoly, endPoly);
303                 return;
304             }
305         }
306

(gdb) info locals
adjacent = false
i = 6
y = 5659.24512
startOffPath = true
endPoly = 4371
x = -1691.33264
z = 129.504044
endOffPath = true
startPoly = 4554
(gdb)

Link to comment
Share on other sites

some missing vertices:

Building map 001:
[42,51]: No vertices to build tile!

Building map 530:
[12,34]: No vertices to build tile!
[13,33]: No vertices to build tile!
[18,39]: No vertices to build tile!
[22,23]: No vertices to build tile!
[23,22]: No vertices to build tile!
[24,28]: No vertices to build tile!
[29,27]: No vertices to build tile!
[30,25]: No vertices to build tile!
[33,40]: No vertices to build tile!

Building map 571:
[18,29]: No vertices to build tile!
[21,16]: No vertices to build tile!
[23,29]: No vertices to build tile!
[24,14]: No vertices to build tile!
[25,28]: No vertices to build tile!
[27,13]: No vertices to build tile!
[28,28]: No vertices to build tile!
[29,28]: No vertices to build tile!

Building map 036:
[30,33]: No vertices to build tile!
[32,35]: No vertices to build tile!

Building map 043:
[30,32]: No vertices to build tile!

Building map 070:
[32,31]: No vertices to build tile!

Building map 129:
[30,26]: No vertices to build tile!

Building map 230:
[31,29]: No vertices to build tile!
[33,30]: No vertices to build tile!
[33,31]: No vertices to build tile!

Building map 349:
[31,29]: No vertices to build tile!
[33,29]: No vertices to build tile!
[33,31]: No vertices to build tile!
[33,32]: No vertices to build tile!

Building map 409:
[32,31]: No vertices to build tile!
[34,29]: No vertices to build tile!
[34,31]: No vertices to build tile!

Building map 429:
[32,30]: No vertices to build tile!
[33,30]: No vertices to build tile!

Building map 531:
[30,48]: No vertices to build tile!
[30,49]: No vertices to build tile!

Building map 540:
[32,30]: No vertices to build tile!

Building map 542:
[31,30]: No vertices to build tile!

Building map 545:
[33,31]: No vertices to build tile!

Building map 546:
[33,32]: No vertices to build tile!

Building map 548:
[31,30]: No vertices to build tile!
[34,30]: No vertices to build tile!

Building map 552:
[31,30]: No vertices to build tile!

Building map 555:
[31,33]: No vertices to build tile!
[33,31]: No vertices to build tile!
[33,33]: No vertices to build tile!

Building map 564:
[32,32]: No vertices to build tile!

Building map 574:
[29,30]: No vertices to build tile!

Building map 576:
[33,31]: No vertices to build tile!

Link to comment
Share on other sites

Hm I can't make it (the MoveMapGen.exe build from commit 33f31e27894b7f459b65) work with Win Vista 32 bit. If I run the MoveMapGen.exe with "--skipContinents false" it almost instantly crashes, extracting map 0 (I have no clue how to debug with Windows, there's no gdb :-) ). Does one have to use a 64 bit version, or is there anything I can do?

Regards

Skirnir

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use