Page 1 of 2 1 2 LastLast
Results 1 to 15 of 25
  1. #1
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0

    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.
    http://tanaris4.com

  2. #2
    Site Donator guizmows's Avatar
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    413
    CoreCoins
    44

    Trade Feedbacks

    Positive
    0
    Negative
    0
    do you see the door in recast demo?

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

  3. #3
    Contributor
    Reputation
    144
    Join Date
    Sep 2008
    Location
    Hawaii
    Posts
    579
    CoreCoins
    77

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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.
    http://tanaris4.com

  5. #5
    Contributor
    Reputation
    132
    Join Date
    Nov 2009
    Location
    Germany
    Posts
    338
    CoreCoins
    117

    Trade Feedbacks

    Positive
    0
    Negative
    0
    Quote 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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    Do you know what they are? What I added to my post doesn't seem to r working for this particular case
    http://tanaris4.com

  7. #7
    Contributor
    Reputation
    261
    Join Date
    Sep 2006
    Location
    Jaedenar O.o
    Posts
    990
    CoreCoins
    141

    Trade Feedbacks

    Positive
    0
    Negative
    0
    Quote 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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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.
    http://tanaris4.com

  9. #9
    Contributor
    Reputation
    132
    Join Date
    Nov 2009
    Location
    Germany
    Posts
    338
    CoreCoins
    117

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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;
          }
        }
    http://tanaris4.com

  11. #11
    Master Sergeant
    Reputation
    21
    Join Date
    Oct 2008
    Location
    chair
    Posts
    116
    CoreCoins
    0

    Trade Feedbacks

    Positive
    0
    Negative
    0

    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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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.
    http://tanaris4.com

  13. #13
    Contributor
    Reputation
    132
    Join Date
    Nov 2009
    Location
    Germany
    Posts
    338
    CoreCoins
    117

    Trade Feedbacks

    Positive
    0
    Negative
    0
    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
    Contributor
    Reputation
    136
    Join Date
    Oct 2008
    Posts
    636
    CoreCoins
    98

    Trade Feedbacks

    Positive
    0
    Negative
    0
    Ahh nice catch, do you know how I determine if a model has a portal flag or sth set?
    http://tanaris4.com

  15. #15
    Member
    Reputation
    2
    Join Date
    Mar 2009
    Posts
    16
    CoreCoins
    96

    Trade Feedbacks

    Positive
    0
    Negative
    0
    The door have a few animations so maybe it's closed by default?

 

 
Page 1 of 2 1 2 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 03:09 PM. Powered by vBulletin® Version 4.2.0
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO
vBulletin Optimisation by vB Optimise. Digital Point modules: Sphinx-based search

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192