Recast/Detour - Mesh not generated inside of a tower - why? menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Recast/Detour - Mesh not generated inside of a tower - why?

    All-

    Has anyone ran into an issue where the area INSIDE of a tower isn't generated? Or does anyone know why it wouldn't be in the final nav mesh? or even within the recast view?

    From this screenshot it looks like I'm not even getting the indicies/vertices properly from wowmapper. Has anyone else ran into this problem?



    Edit: Here are my parameters (Note: I do 16 tiles per ADT):

    Code:
    #define GRID_SIZE       (533.0f + (1.0f / 3.0f))
    #define TileSize        (533.0f + (1.0f / 3.0f))
    #define TileVoxelSize   1800
    #define MinRegionSize   20
    #define MergeRegionSize 40
    
    #define CellSize        TileSize / (float)TileVoxelSize
    
    #define CellHeight              0.4f
    #define WalkableSlopeAngle      50.0f
    #define MaxSimplificationError  1.3f
    #define DetailSampleDist        3.0f
    #define DetailSampleMaxError    1.25f
    
    #define WorldUnitWalkableHeight     1.652778f
    #define WorldUnitWalkableClimb      1.0f
    #define WorldUnitWalkableRadius     0.2951389f
    
    #define WalkableHeight      (int)ceilf(WorldUnitWalkableHeight / CellHeight)
    #define WalkableClimb       (int)floorf(WorldUnitWalkableClimb  / CellHeight)
    #define WalkableRadius      (int)ceilf(WorldUnitWalkableRadius / CellSize)
    
    #define MaxEdgeLen          (int)(WalkableRadius * 8.0f)
    #define BorderSize          (int)(WalkableRadius + 4.0f)
    #define TileWidth           (TileVoxelSize / GridDiv) + (BorderSize * 2)
    
    #define GridDiv 4
    #define MaxPoly  1048576 / ( GridDiv*GridDiv)
    
    #define m_vertsPerPoly          6.0f
    
    #define m_keepInterResults      false
    #define m_monotonePartitioning  false
    
        rcConfig m_cfg;	
    	// Init build configuration from GUI
    	memset(&m_cfg, 0, sizeof(m_cfg));
    	m_cfg.cs = CellSize;
    	m_cfg.ch = CellHeight;
    	m_cfg.walkableSlopeAngle = WalkableSlopeAngle;
    	m_cfg.walkableHeight = WalkableHeight;//(int)ceilf(WorldUnitWalkableHeight / m_cfg.ch);
    	m_cfg.walkableClimb = WalkableClimb;//(int)floorf(WorldUnitWalkableClimb / m_cfg.ch);
    	m_cfg.walkableRadius = WalkableRadius;//(int)ceilf(WorldUnitWalkableRadius / m_cfg.cs);
    	m_cfg.maxEdgeLen = (int)MaxEdgeLen;//8;(int)MaxEdgeLen;
    	m_cfg.maxSimplificationError = MaxSimplificationError;
    	m_cfg.minRegionArea = (int)rcSqr(MinRegionSize);		// Note: area = size*size
    	m_cfg.mergeRegionArea = (int)rcSqr(MergeRegionSize);	// Note: area = size*size
    	m_cfg.maxVertsPerPoly = (int)m_vertsPerPoly;
    	m_cfg.tileSize = (int)(GRID_SIZE / GridDiv);
    	m_cfg.borderSize = BorderSize;
    	m_cfg.detailSampleDist = DetailSampleDist;
    	m_cfg.detailSampleMaxError = DetailSampleMaxError;
        m_cfg.width = TileWidth;
        m_cfg.height = TileWidth;
        
        // save the tile's max/min not the 3x3!
        rcVcopy(m_cfg.bmin, bmin);
    	rcVcopy(m_cfg.bmax, bmax);
        
        m_cfg.bmin[0] -= m_cfg.borderSize*m_cfg.cs;
        m_cfg.bmin[2] -= m_cfg.borderSize*m_cfg.cs;
        m_cfg.bmax[0] += m_cfg.borderSize*m_cfg.cs;
        m_cfg.bmax[2] += m_cfg.borderSize*m_cfg.cs;
    Edit 2: Looks like the door is closed, but there isn't a door there in game - anyone have any ideas why this happens? Below is the view from inside.



    Thanks in advance!
    ~ Tanaris
    Last edited by Tanaris4; 12-28-2011 at 01:53 PM.
    https://tanaris4.com

    Recast/Detour - Mesh not generated inside of a tower - why?
  2. #2
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you see the door in recast demo?

    Are you sure it's not a problem with your agent radius and weigh?

  3. #3
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    This looks to me like a parser error. Not all triangles are collideable or visible in-game. Some are there for other purposes (like detecting when you've crossed into a building, for example).

  4. #4
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any reco on how I could go about debugging? Stuff to look for in wowmapper?

    Or should I e looking elsewhere. I'm sure the issue is in wowmapper and how I'm pulling the info, just curious what I should ignore (certain door doodads? Or something else?)

    Edit: So I found your post namreeb on what flags I should check, has this changed? I added this and I'm still seeing the same as my earlier post:

    Code:
            // flags != 0x04 implies collision.  materialId = 0xFF (-1) implies a non-rendered collideable triangle.
            if ((*iter)->getMopyChunk().infos[i].flags & 0x04 && (*iter)->getMopyChunk().infos[i].id != 0xFF) {
            //if ( !((*iter)->getMopyChunk().infos[i].flags & filter) ) {
    in void WmoModel::getIndices( Indices32_t *indices, uint32_t filter, uint32_t off ) const {
    Last edited by Tanaris4; 12-28-2011 at 05:16 PM.
    https://tanaris4.com

  5. #5
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by namreeb View Post
    This looks to me like a parser error. Not all triangles are collideable or visible in-game. Some are there for other purposes (like detecting when you've crossed into a building, for example).
    this. iirc there are at least 2 different flags for insivible and uncollideable triangles, like some stair polygons and stuff...

  6. #6
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know what they are? What I added to my post doesn't seem to r working for this particular case
    https://tanaris4.com

  7. #7
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    Any reco on how I could go about debugging? Stuff to look for in wowmapper?

    Or should I e looking elsewhere. I'm sure the issue is in wowmapper and how I'm pulling the info, just curious what I should ignore (certain door doodads? Or something else?)

    Edit: So I found your post namreeb on what flags I should check, has this changed? I added this and I'm still seeing the same as my earlier post:

    Code:
            // flags != 0x04 implies collision.  materialId = 0xFF (-1) implies a non-rendered collideable triangle.
            if ((*iter)->getMopyChunk().infos[i].flags & 0x04 && (*iter)->getMopyChunk().infos[i].id != 0xFF) {
            //if ( !((*iter)->getMopyChunk().infos[i].flags & filter) ) {
    in void WmoModel::getIndices( Indices32_t *indices, uint32_t filter, uint32_t off ) const {
    Doesn't look right. I personally don't have the 0xFF check at all. Try just skipping the triangle if (flags & 4) != 0.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  8. #8
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a list of what the flags are? Wish madx.dk was still up - isn't that where most of that info was?

    Edit: Re-built just doing the 0x4 check and the door is still there :/ so confused any other ideas?

    Last edited by Tanaris4; 12-28-2011 at 10:30 PM.
    https://tanaris4.com

  9. #9
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick google for adt wow turned up WoWDev .
    Only include triangles with material id 0xFF. That will be the collision mesh. WMO/v17 - WoWDev

  10. #10
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Same issue unfortunately. Anyone have any ideas as to why this door just doesn't want to go away! Or what I should be looking for? Any flags you know of that aren't listed on that page?

    Code:
        // filter vertices by triangle material info
        size_t num_triangles = grp_indices.size() / 3;
        for ( int i = 0; i < num_triangles; i++ ) {
            
            //printf("[%d] 0x%X 0x%X\n", i, (*iter)->getMopyChunk().infos[i].flags, (*iter)->getMopyChunk().infos[i].id);
            
            // flags != 0x04 implies collision.  materialId = 0xFF (-1) implies a non-rendered collideable triangle.
            if ((*iter)->getMopyChunk().infos[i].flags & 0x04 && ((*iter)->getMopyChunk().infos[i].id & 0xFF) != 0xFF ) {
            //if ( !((*iter)->getMopyChunk().infos[i].flags & filter) ) {
                //printf(" saved...\n");
            increment[i*3+0] = -1;
            increment[i*3+1] = -1;
            increment[i*3+2] = -1;
          }
        }
    https://tanaris4.com

  11. #11
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Door

    I had this same problem when I started out with navmesh... I might look back at my notes after work to give you some ideas.
    ------------------------------
    If not me than who?

  12. #12
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd appreciate that, thanks. It's so strange b/c obviously the change I made is required (given that the ogrimmar gate is now gone). There must be some other type of door we don't know about yet? Or know to recognize? I just happened to find the one tower it affects? hah



    Edit: Found out if I just ignore the doodad named "WORLD\GENERIC\HUMAN\ACTIVEDOODADS\DOORS\SHADOWFANGDOOR01.MDX" then the door goes away... I know this isn't really a solution. Still investigating...

    Edit 2: I decided to print out the unique flags and ids for this model that are NOT filtered by this check:
    Code:
    if ((*iter)->getMopyChunk().infos[i].flags & 0x04 && ((*iter)->getMopyChunk().infos[i].id & 0xFF) != 0xFF ) {
    I'm a bit confused as to how I ensure it would be ignored... Obviously SOME of the triangles are being ignored, but the door itself still stays. Is there a flag elsewhere that I should be checking as well?

    Code:
    Flag id
    0x60 0x9
     0x60 0xA
     0x20 0xA
     0x60 0xC
     0x20 0xC
     0x20 0xF
     0x48 0xFF
     0x8 0xFF
     0x20 0x1
     0x60 0x1
     0x60 0x3
     0x60 0x4
     0x20 0x5
     0x60 0x6
     0x60 0x7
     0x20 0x7
     0x60 0x13
     0x60 0x0
     0x20 0xB
     0x60 0xB
     0x60 0xD
     0x20 0xD
     0x60 0xE
     0x60 0xF
     0x60 0x10
     0x20 0x11
     0x60 0x12
     0x20 0x12
     0x60 0x14
     0x61 0x9
     0x21 0xF
     0x61 0x12
    Last edited by Tanaris4; 12-29-2011 at 09:33 AM.
    https://tanaris4.com

  13. #13
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    iirc, those portals are m2 s with a portal flag or sth set. too bad recast demo isn't colored :P

    Edit: It also says that you only accept triangles with a materialId of 0xff, not that you should discard them.
    So this should be
    Code:
    if ((*iter)->getMopyChunk().infos[i].flags & 0x04 && (*iter)->getMopyChunk().infos[i].id == 0xFF)
    Last edited by Bananenbrot; 12-29-2011 at 09:49 AM.

  14. #14
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh nice catch, do you know how I determine if a model has a portal flag or sth set?
    https://tanaris4.com

  15. #15
    ament's Avatar Member
    Reputation
    7
    Join Date
    Mar 2009
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The door have a few animations so maybe it's closed by default?

Page 1 of 2 12 LastLast

Similar Threads

  1. Path Generator – Recast/Detour and WowMapper – Step
    By RivaLfr in forum WoW Memory Editing
    Replies: 32
    Last Post: 05-13-2022, 05:38 AM
  2. Replies: 9
    Last Post: 12-30-2011, 02:32 AM
  3. Replies: 1
    Last Post: 12-12-2011, 02:31 AM
  4. [Link] C++ Recast/Detour Wrapper
    By Millow in forum WoW Memory Editing
    Replies: 11
    Last Post: 08-02-2011, 04:26 AM
  5. Get honor/marks from WG even if not getting inside with queue.
    By PieroPerucci in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 10-07-2009, 09:20 PM
All times are GMT -5. The time now is 10:45 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search