From .obj to .navmesh menu

User Tag List

Page 2 of 6 FirstFirst 123456 LastLast
Results 16 to 30 of 77
  1. #16
    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)
    Encorporate your tile loading into Detours A* algorithm (FindPath). Works perfectly and you will still get the most optimal path.
    very good idea thx, I'll check how to do it.

    ATM I do it like this :



    Green one are adt directly on line between my start and stop points.
    Yellow one are adt I need to load in order to have all needed informations in order to create my path.

    In violet you can see generated path.

    From .obj to .navmesh
  2. #17
    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)
    Originally Posted by Bananenbrot View Post
    Cause wowmapper had the same bug.

    iirc, it was like (scale / 1024) which results in an int rather than a float, thus it's truncated.

    Edit: Yes, it's unchanged... see line 225 in Sample_D3dByAreaId.cpp - wowmapper - World of Warcraft MAP ParsER - Google Project Hosting . Added a patch for it.
    Edit: Nevermind, found your patch. Thx, I'll give it a shot. For the moment I'm still working on generating the .navmesh file based on the Namreeb's suggestions. If anyone has any other tips/suggestions, I'm all ears.
    Last edited by Millow; 08-15-2011 at 12:24 PM.
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

  3. #18
    cvccbum's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    26
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by guizmows View Post
    very good idea thx, I'll check how to do it.

    ATM I do it like this :



    Green one are adt directly on line between my start and stop points.
    Yellow one are adt I need to load in order to have all needed informations in order to create my path.

    In violet you can see generated path.
    How are you determining what ADTs to load though?

  4. #19
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by cvccbum View Post
    How are you determining what ADTs to load though?
    Sweep a point or box across a line from the start -> end marking any ADTs it is inside, then you can also load the bounding ADTs.


  5. #20
    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)
    Yellow ones are those loaded while applying the A* algorithm (open list or sth).
    Green marks the most optimal path (closed list after applying the algorithm).

    For actually doing this, you simply have to hook into the detour API. Main went more into detail about this a while ago.
    Last edited by Bananenbrot; 08-16-2011 at 05:30 AM.

  6. #21
    cvccbum's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    26
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you guys loading each ADT into its own dtNavMesh and making an array for dtNavMeshQuery to find the path? I can't seem to get my multiple adt's to load correctly. Sometimes it's fine, and sometimes it won't work. If I dump the whole zone, the same location works so I know there is a path that should work.

  7. #22
    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)
    Once I've created the navmesh with this code : dtCreateNavMeshData(&params, &navData, &navDataSize) (there is a lot more code before that...)
    I was wondering how to save the navData ?
    I can't seem to figure it out, I think everything else works fine.
    I've tried to create a new dtNavMesh and copy the navData in it to simply call the saveAll function, but I don't know how to properly initizalize the new navMesh and then copy the navData in it.
    I hope I make sense. Any help is appreciated. If I get this working, I'll post my code to convert an .obj to a .navmesh
    Cheers

    Edit: Using this code I managed to get it saved, but now its only 500k for 32_48.obj and it does not work in detour...
    Code:
    dtNavMesh* m_navMesh = 0;
    m_navMesh = dtAllocNavMesh();
    dtStatus status;  
    status = m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA);
    saveAll("C:\\Users\\Millow\\Desktop\\Azeroth\\32_48.navmesh",m_navMesh);
     
    
    I could post my whole cpp file, but from that, anyone spots any problems ?
    Last edited by Millow; 08-17-2011 at 12:08 PM.
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

  8. #23
    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)
    There is no provided function to save the nav mesh. It is up to the user (you) to determine how you want to save it. However, the obvious method is to simply write each tile struct to its own file, bit-for-bit.

  9. #24
    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)
    It would be soo nice if you could post a small example how to safe just navdata my navdata is only 20kb after saving! :O

  10. #25
    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)
    You've got to be kidding me. Okay, here is a psuedo-code example:

    Code:
    bool BuildAndSaveTile(dtNavMeshCreateParams *params, string fileName)
    {
      unsigned char *meshData;
      unsigned int meshDataSize;
    
      if (!dtCreateNavMeshData(params, &meshData, &meshDataSize))
        return false;
      
      ofstream outFile(fileName.c_str(), ios_flags::binary);
    
      outFile << meshData;
    
      outFile.close();
      return true;
    }
    
    bool LoadTile(string fileName, const int flags)
    {
      ifstream inFile(fileName.c_str(), ios_flags::binary);
    
      if (!inFile)
        return false;
    
      unsigned char *inData = new unsigned char[FileSize(fileName)];
    
      inFile >> inData;
    
      dtNavMesh::addTile(inData, FileSize(fileName), flags);
    
      return true;
    }

  11. #26
    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)
    Thanx for the snippet. I didn't ask for code because its against the section rules and I wanted to tackle the problem myself, but hey, it's there, might as well use it...

    The problem I had, and still might have, is that I thought that you had to put some kind of header in the file. But it seems like you don't put anything or it's already included ?

    Anyhow, Namreeb, thank you again for all the help.
    Mahalo !
    Last edited by Millow; 08-17-2011 at 03:27 PM.
    "What can be asserted without proof can be dismissed without proof." --- Christopher Hitchens

  12. #27
    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)
    Stop asking me questions via private message. From now on they will not receive any reply what-so-ever. Sorry to be rude about it but I keep getting asked the same question. If you ask your questions publicly, future readers may benefit from the answer(s). Asking a question privately is just a way to hide the fact that either a) you're lazy and want to be spoon fed or b) you are trying to walk before you can crawl. I'm sick of wasting my time on it.

  13. #28
    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)
    Thank you for your source thats nice but that don't help me becouse loading only 1 tile per time is allready working. what i need is how to handle for load more than one mesh :S. Sorry for askin

  14. #29
    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)
    In the case of loading an additional tile, you will already have the mesh (an instance of the dtNavMesh class, in the current R+D). To add another tile to it, call dtNavMesh::addTile again, passing in the data from the second file.

  15. #30
    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)
    So in fact if your creating a "Tiled mesh" ther is only one tile right? do you set an X Y position for the tile positon?

Page 2 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 12:16 PM. 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