Generating Navmesh Files menu

Shout-Out

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    berlinermauer's Avatar Master Sergeant
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generating Navmesh Files

    Hello Guys

    As of the Release of MoP, I decided to completely recode my bot using C#. As this is a shitload of work, I thought about also implementing Detours NavMesh-Files.

    As days of googling didn't help me out, I wanted to ask here.

    First to the Basics:

    > I have to unpack the MPQ-Files (which?).
    The I get some maps.dbc files?
    > These dbc Files can be read by wowmapper, which is pretty outdated, I saw. Is there another good Alternative, or is it a good way, writing an own dbc-file parser, as the structure changed with MoP and is useful to get the SpellCooldowns?

    > Do they change the way, an MPQ-Archive is packed?

    Edit: I am now able to unpack mpq files, for example world.mpq which leads me dispite some Compression not supported exceptions to tons of adt files.
    What now?

    Edit2: Found out now, that the DBC-Files don't have anything to do with this.
    Is there a Sourcecode or something, where I can read on how to Parse a ADT-File and pass it to Recast?
    Last edited by berlinermauer; 09-26-2012 at 05:10 AM.

    Generating Navmesh Files
  2. #2
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    209
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you had googled around maybe you would have wound up with this link.

  3. #3
    Empted's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2011
    Posts
    117
    Thanks G/R
    0/5
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Search this forum for any kind of 'navmesh' and 'wowmapper' tags. The main idea is:
    First, you should get geometry (mesh) of the world (see wowmapper or link below). Also wowdev your bible for WoW file formats.
    Second, you should build a navmesh and implement an algorithm of pathfinding on that mesh (i would recommend opensource project- Recast/Detour).
    Links: I recommend to study this WoW geometry ([Mpq][C#] Geometry parser/viewer) project. Code is very informative and it implements all you need to take the first step, also it's written by our member.. And for details concerning navmeshes and general concepts i would recommend this article Recast/Detour java port. Also google to get sourceforge link to Recast/Detour itself and try to compile. You can try it's demo with mesh i generated once ago (attached it).
    Or if you are not interested in doing things yourself, the link by miceiken fits good.
    P.S. I prefer using StormLib for mpq files in my projects.
    P.P.S. There is another interesting project you'd like to see probably. sharpwow
    Attached Files Attached Files
    Last edited by Empted; 09-26-2012 at 10:25 AM.

  4. #4
    berlinermauer's Avatar Master Sergeant
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I made some progress, I now extract the Vertices and Triangles from an ADT-File.

    When I now try to write an adt-File I get inappropriate results:
    The Triangles, of course, are static.
    The Vertices contain World-Coordinates, I have to make them relative to current chunck I guess?
    Is there an easy way to do?

    What to do next? I know I am missing WMO etc right now, but I want to do a navmesh with only the Terrain first.
    I have to change the coords from WoW to Recast. No big deal.
    Then I have to use Recast to generate a NavMesh. Is there an easy API? I somehow did not find a documentation of Recast+Detour.
    I Only found a how-to what they want to implement in their wiki?

    Also: What does the f stand for?

    Ok using f with my GenerateTriangles and v for the Vertices I get:


    It doesn't look quite right, although it's only one MCNK.
    Also my GenerateTriangles can only handle one MCNK.

    Any suggestions?
    Last edited by berlinermauer; 10-21-2012 at 04:22 PM.

  5. #5
    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)
    Originally Posted by berlinermauer View Post
    Ok I made some progress, I now extract the Vertices and Triangles from an ADT-File.

    When I now try to write an adt-File I get inappropriate results:
    The Triangles, of course, are static.
    The Vertices contain World-Coordinates, I have to make them relative to current chunck I guess?
    Is there an easy way to do?

    What to do next? I know I am missing WMO etc right now, but I want to do a navmesh with only the Terrain first.
    I have to change the coords from WoW to Recast. No big deal.
    Then I have to use Recast to generate a NavMesh. Is there an easy API? I somehow did not find a documentation of Recast+Detour.
    I Only found a how-to what they want to implement in their wiki?

    Also: What does the f stand for?

    Ok using f with my GenerateTriangles and v for the Vertices I get:


    It doesn't look quite right, although it's only one MCNK.
    Also my GenerateTriangles can only handle one MCNK.

    Any suggestions?
    https://github.com/stschake/meshReader - ready to use (well, not sure if this is adopted to MOP, but easy to do)
    recast/detour has well done API documentation in header files + bunch of examples .

  6. #6
    Pandu91's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    meshBuilder does not work (maybe it doesn't work only with MOP, didn't tested it with Cata)

    meshBuilder\ContinentBuilder.cs

    Code:
    data = builder.Build(new MemoryLog());
    is alway null

    Didn't had time to find the reason yet, maybe someon already knows something about it?

    Best regards

  7. #7
    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)
    Originally Posted by Pandu91 View Post
    meshBuilder does not work (maybe it doesn't work only with MOP, didn't tested it with Cata)

    meshBuilder\ContinentBuilder.cs

    Code:
    data = builder.Build(new MemoryLog());
    is alway null

    Didn't had time to find the reason yet, maybe someon already knows something about it?

    Best regards
    yes, it needs to be adapted to MOP, in your particular case MpqManager needs to be updated coz some (Map.dbc if i can recall) been moved from language mpq to misc.mpq. i also not sure if "stock" mpqmanager is handling mpq patches.

  8. #8
    Pandu91's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, is there a list which DBC files have changed for MOP? Or do I need to compare them for myself?

    Best regards

  9. #9
    berlinermauer's Avatar Master Sergeant
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well that is exactly the Project I started from.

    Just to get things clear: One tile is for example Azeroth_Y_X and they are referenced in the WDT, so parsing WDT is HasTileMap(). Is this needed or could I just use File.Exists?
    This Tile is a seperated obj file which will be fired thorugh recast? So the Triangle-Set (f) is per-tile?!

    The Problem with the Triangle is solved now I guess by a more clearly look into the SourceCode.

    In the Tile: Do I need to use some relative Coords or world-wide coords as it is mapped to one file by the generation (which is not true?!).
    If the Coords are absolute, WoW or Recast/Usual Coordinate System?

  10. #10
    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)
    Originally Posted by Pandu91 View Post
    Okay, is there a list which DBC files have changed for MOP? Or do I need to compare them for myself?

    Best regards
    not sure about whole list but for meshReader only 1 file (i beleive) WorldMapArea.dbc migrated from locale-XXXX to misc.mpq, so this one needs to be fixed.

  11. #11
    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)
    Originally Posted by berlinermauer View Post
    Well that is exactly the Project I started from.

    Just to get things clear: One tile is for example Azeroth_Y_X and they are referenced in the WDT, so parsing WDT is HasTileMap(). Is this needed or could I just use File.Exists?
    This Tile is a seperated obj file which will be fired thorugh recast? So the Triangle-Set (f) is per-tile?!

    The Problem with the Triangle is solved now I guess by a more clearly look into the SourceCode.

    In the Tile: Do I need to use some relative Coords or world-wide coords as it is mapped to one file by the generation (which is not true?!).
    If the Coords are absolute, WoW or Recast/Usual Coordinate System?
    1. you can't use File.Exists for mpq file system
    2. each tile has reference to objects (building,trees etc...) its contain, you will have to load all of them in order generate proper mesh.
    3. you will need to transform wow coordinate system to recast (opengl) to build mesh and navigate.

    honestly, look into meshReader, it has clean code. it is pretty much ready to use solution (as stand-alone navigation) and/or good reference to start build own one.

  12. #12
    berlinermauer's Avatar Master Sergeant
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use meshReader at the moment.
    1: I have extracted the whole world.MPQ to the Disk. I could as well Check if the File is there in the MPQ. I wanted to know if that's proof enough, if it is there, so I don't need the WDT-File?
    3. Already done
    2. To Generate a Mesh I need to load all tiles of one continent? or just the ones that overlapp (or the objects overlapp)?
    Each tile has reference to objects -> Does it? or are they just included into the geometrical Vertices?

    I also have the following Error:

    It seems like this is happening due to I am generating 256 Triangles and only have 145 Vertices (ofc 8x8 + 9x9)
    The 256 come like this: 8x8 Loop is generating 4 Triangles.

    Well as I am seeing now, meshReader does exactly the Same? Generate more tris than verts? Is this legit? And if so, why do I have some Errors in my Mesh?

    btw: The Mesh-Vertices have -8000 -> -7500 coordinates etc. Is this legit or should they be rebased to 0 - 500?

  13. #13
    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)
    Originally Posted by berlinermauer View Post
    I use meshReader at the moment.
    1: I have extracted the whole world.MPQ to the Disk. I could as well Check if the File is there in the MPQ. I wanted to know if that's proof enough, if it is there, so I don't need the WDT-File?
    3. Already done
    2. To Generate a Mesh I need to load all tiles of one continent? or just the ones that overlapp (or the objects overlapp)?
    Each tile has reference to objects -> Does it? or are they just included into the geometrical Vertices?

    I also have the following Error:

    It seems like this is happening due to I am generating 256 Triangles and only have 145 Vertices (ofc 8x8 + 9x9)
    The 256 come like this: 8x8 Loop is generating 4 Triangles.

    Well as I am seeing now, meshReader does exactly the Same? Generate more tris than verts? Is this legit? And if so, why do I have some Errors in my Mesh?

    btw: The Mesh-Vertices have -8000 -> -7500 coordinates etc. Is this legit or should they be rebased to 0 - 500?
    ADT/v18 - WoWDev will provide information for all your question about geometry and structure .

  14. #14
    berlinermauer's Avatar Master Sergeant
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems like you are not getting my problem: The ADT-File is no problem to me. The question is the passing to RecastDemo which fails.
    The first question is how those Tiles are built up. Each one is using the absolute coordinates I guess.
    The next question is, If it is correct, having 4 Triangles for each of the Outer Values. I believe it is correct, as well.

    Now I am asking, why I get such an errorneous Image in RecastDemo?

  15. #15
    Pandu91's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I fixed the path for WorldMapArea, but my data is still null.

    I've done some code research and found out, that my Mesh Builder Interface does not run AreaHelper.Initialize(); so it does have no effect,

    Any suggestions?

    Best regards

Page 1 of 3 123 LastLast

Similar Threads

  1. Parsing mpq files for navmeshes
    By karnkore in forum Diablo 3 Memory Editing
    Replies: 1
    Last Post: 04-23-2014, 03:17 AM
  2. Lazer Upload - A new generation of file sharing
    By evilwhynot in forum Community Chat
    Replies: 0
    Last Post: 02-17-2013, 12:12 AM
  3. [Release] Gamecard Generator - Batch File
    By Mudkips in forum World of Warcraft Bots and Programs
    Replies: 147
    Last Post: 10-30-2009, 07:39 PM
  4. Allow members to upload files to the forums?
    By Matt in forum Suggestions
    Replies: 5
    Last Post: 07-07-2006, 08:07 AM
  5. The Wow-dupe File!!
    By Cyboi in forum World of Warcraft Exploits
    Replies: 9
    Last Post: 06-14-2006, 10:14 PM
All times are GMT -5. The time now is 10:51 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