From .obj to .navmesh menu

Shout-Out

User Tag List

Page 5 of 6 FirstFirst 123456 LastLast
Results 61 to 75 of 77
  1. #61
    Millow's Avatar Member
    Reputation
    5
    Join Date
    Mar 2007
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All right thanx,
    I was wondering if it was integrated directly in the demo. I'll code it then, thx
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

    From .obj to .navmesh
  2. #62
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow now it gets verry mysteryus. If i use your mesh settings (origion...) its the same as my Problem. But if i use the Original code, than i can navigat in the same Tile but not from tile to tile :S

  3. #63
    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)
    If you cannot navigate from one tile to the other, your settings are likely incorrect.

  4. #64
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    KK that error i resolved^^ Seems like recast can't handle 533.333.... So now the Tiled Navigation reworks now i will tray your methode^^

    But still the same error: Can dump mesh if X: 0 Y: 0 it works well if i change the Tile Position Navigation is not working

    Here the Build Funktion:

    Code:
    void Sample_TileMesh::buildAllTiles()
    {
    	if (!m_geom) return;
    	if (!m_navMesh) return;
    	
    	const float* bmin = m_geom->getMeshBoundsMin();
    	const float* bmax = m_geom->getMeshBoundsMax();
    	int gw = 0, gh = 0;
    	rcCalcGridSize(bmin, bmax, m_cellSize, &gw, &gh);
    	const int ts = (int)m_tileSize;
    	const int tw = (gw + ts-1) / ts;
    	const int th = (gh + ts-1) / ts;
    	const float tcs = m_tileSize*m_cellSize;
    
    	int AdtX = 40;
    	int AdtY = 33;
    	
    	// Start the build process.
    	m_ctx->startTimer(RC_TIMER_TEMP);
    
    	for (int y = 0; y < th; ++y)
    	{
    		for (int x =0; x < tw; ++x)
    		{
    			m_tileBmin[0] = bmin[0] + x*tcs;
    			m_tileBmin[1] = bmin[1];
    			m_tileBmin[2] = bmin[2] + y*tcs;
    			
    			m_tileBmax[0] = bmin[0] + (x+1)*tcs;
    			m_tileBmax[1] = bmax[1];
    			m_tileBmax[2] = bmin[2] + (y+1)*tcs;
    			
    			int dataSize = 0;
    			unsigned char* data = buildTileMesh((AdtX * tw)+x, (AdtY * th) + y, m_tileBmin, m_tileBmax, dataSize);
    
    			if (data)
    			{
    				// Remove any previous data (navmesh owns and deletes the data).
    				m_navMesh->removeTile(m_navMesh->getTileRefAt(x,y,0),0,0);
    				// Let the navmesh own the data.
    				dtStatus status = m_navMesh->addTile(data,dataSize,DT_TILE_FREE_DATA,0,0);
    				if (dtStatusFailed(status))
    					dtFree(data);
    			}
    		}
    	}
    	
    	// Start the build process.	
    	m_ctx->stopTimer(RC_TIMER_TEMP);
    
    	m_totalBuildTimeMs = m_ctx->getAccumulatedTime(RC_TIMER_TEMP)/1000.0f;
    	
    }
    Last edited by hamburger12; 08-24-2011 at 05:14 PM.

  5. #65
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check returned code at each step... ie
    1. navMesh->calcTileLoc(startPoint, &start_tile_x, &start_tile_y)
    check if tile_x and tile_y are loaded
    2. step 1 for endPoint

    3. rc = m_navQuery->findNearestPoly( startPoint, m_extent, filter, &startRef, 0) ;
    check dtStatusSucceed(rc) and navMesh->isValidPolyRef(startRef) both true
    4. step 3 for endPoint, endRef

    5. make sure tiles required for navigation are loaded

    6. rc = m_navQuery->findPath(....)
    check rc - you will get precise info why (if any) findPath failed.

    something like that.

  6. #66
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems like calcTileLoc fails :S

  7. #67
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well then, either coordinates are wrong (x,y) or/and origin is wrong or tileHeight/tileWidth
    calcTileLoc is pretty straightforward


    *tx = (int)floorf((pos[0]-m_orig[0]) / m_tileWidth);
    *ty = (int)floorf((pos[2]-m_orig[2]) / m_tileHeight);

  8. #68
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think m_orig is the Problem.

  9. #69
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok got it until the part of loading meshes. All went right, if i just want to navigate in the same ADT. But if i want to navigate from atd to adt it just navigate till the endline.
    Last edited by hamburger12; 08-28-2011 at 04:04 PM.

  10. #70
    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)
    it's again a problem of tile number.

  11. #71
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure? I use 1 tile per adt. I also can navigate in both tiles when they loaded at Same time. But not from tile to tile. For calculate tile x and y i use calctilelocation and the x and y are the Same as the adt x y.

  12. #72
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    most likey tiles are not getting connected. When detour loads tiles it builds portals between tiles for intertile navigation and if tiles have gap between edges - detour consider them as not connected therefore navigation fails. the best way to check it - make standalone program (or alter demo project) to load your generated mesh and visually check if there is gap between tiles.
    when you generate tiles with recast - make sure you triangles soup has some more data around calculated area (that is for each adt add some triangles from neighbor adts)

  13. #73
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mh seems like its not connected o.O

    Attached Thumbnails Attached Thumbnails From .obj to .navmesh-recast-jpg  
    Last edited by hamburger12; 08-29-2011 at 12:41 PM.

  14. #74
    ostapus's Avatar Active Member
    Reputation
    60
    Join Date
    Nov 2008
    Posts
    180
    Thanks G/R
    3/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup. to fix it as i said - feed more data from neighboring adts

  15. #75
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mh think the prob is that the Navgeneartion is not 100% :S


Page 5 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Making Cash from Lv. 10
    By Cush in forum World of Warcraft Guides
    Replies: 10
    Last Post: 09-02-2006, 10:52 PM
  2. Free Marks from Battle Grounds
    By Matt in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 06-19-2006, 11:21 AM
  3. Add-ons from curse-gaming.
    By volcom in forum World of Warcraft General
    Replies: 5
    Last Post: 05-16-2006, 11:50 AM
  4. Raid Griefing Exploit (kick anyone from any group)
    By Matt in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 04-28-2006, 09:26 AM
All times are GMT -5. The time now is 09: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