WoWMapper info to Recast... menu

Shout-Out

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34
  1. #16
    FenixTX2's Avatar Active Member
    Reputation
    23
    Join Date
    Mar 2009
    Posts
    125
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Flowerew View Post
    Sounds strange. Seems like you use a debug build instead of release build, like some other guy that reported that behaviour to me. Reading Azeroth's ADTs should finish in under 30s on most PCs. So the whole process should take at max 10 min to extract the mesh information and write it to your HDD. Recast is another story, I've seen everything from 30 mins to 2 days.
    Ah, ok. I build the sample application from the source code in wowmapper_v0.1.7z
    This time round I just used the sample application contained in the bin folder and it read the ADTs for Azeroth in 89 seconds.
    One thing is strange though. The mesh files being output seem mangled. Here's an example:

    27_53.mesh
    Code:
    BBX    ªª&ÅqF  /FUUÅ  €?UU7FPOS       5   IDX                                                                                VTX 	   Q>ÅqFÂG†.F];Åy?Âä.FíQÅqFÂY€.FÊTÅãI›}.FfÅqFÂd‚.F&ŦxÂ[.Fv8ŝ«	•}.F)KÅJ´µz.F“&ň…ÂN|.F

    WoWMapper info to Recast...
  2. #17
    Nightblizzard's Avatar Active Member
    Reputation
    20
    Join Date
    Jan 2009
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That file is correct. You need to parse them yourself, pretty simple!

    Originally Posted by howto.txt
    This is just a little description for the lazy people who just want to
    export the map files and don't care about the code.

    Usage example on Windows:
    Sample_MeshExporter C:\WoW\Data World\maps\Azeroth\Azeroth


    To read the *.mesh data you need to know the following:

    Bounding box chunk (28 bytes):
    id char[4] (BBX)
    size size_t
    bbmin float[3]
    bbmax float[3]

    ADT position chunk (8 bytes):
    id char[4] (POS)
    size size_t
    x int
    y int

    Index chunk:
    id char[4] (IDX)
    size size_t (num indices)
    indices int[size]

    Vertex chunk:
    id char[4] (VTX)
    size size_t (num vertices)
    vertices float[3][size]

    Have fun.

  3. #18
    sPeC!'s Avatar Member
    Reputation
    23
    Join Date
    Jun 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to read them as binary files and parse them using info from the readme, the one posted by Nightblizzard, not as text...

    Cheers,

  4. #19
    FenixTX2's Avatar Active Member
    Reputation
    23
    Join Date
    Mar 2009
    Posts
    125
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'd just read in the source code that the output file would be usable by recast and just assumed that meant directly. I'll have a look into it when I get home this evening.

  5. #20
    Viano's Avatar Active Member
    Reputation
    37
    Join Date
    May 2008
    Posts
    172
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    public void CreateOBJFile() 
            {
                Console.WriteLine("Creating OBJFile.");
    
                BinaryReader reader = new BinaryReader(
                    File.Open("C:\\30_48.mesh",
                    FileMode.Open)); // stormwind
    
                TextWriter tw = new StreamWriter("stormwind.obj");
    
                reader.ReadBytes(32); //jump over BBX
                reader.ReadBytes(16); //jump over ADT
    
                // INDICES
                reader.ReadChars(3);
                reader.ReadByte();
                UInt32 indexSize = reader.ReadUInt32();
                int[] indexes = new int[indexSize];
                for (int i = 0; i < indexSize; i++) 
                {
                    indexes[i] = (int)(reader.ReadInt32()+1);
                }
    
                Console.WriteLine("Done with saving indices.");
    
                // write VERTICES
                reader.ReadChars(3);
                reader.ReadByte();
                UInt32 vertexSize = reader.ReadUInt32();
                for (int i = 0; i < vertexSize; i++)
                {
                    tw.WriteLine("v " + reader.ReadSingle() + " " + reader.ReadSingle() + " " + reader.ReadSingle());
                }
    
                Console.WriteLine("Done with writing vertices.");
    
                // write INDICES
                for (int i = 0; i < indexSize;)
                {
                    tw.WriteLine("f " + indexes[i++] + " " + indexes[i++] + " " + indexes[i++]);
                }
    
                Console.WriteLine("Done with writing indices.");
    
                tw.Close();
    
                Console.WriteLine("Done.");
            }
    This should generate a decent .obj for recast.

    I am at this point now and have no idea what methods should be called from recast to read the mesh (the steps how to read the mesh) and then call findStraightPath. This may be because I am a lazy f u c k and reading C++ code hurts my brain.
    Last edited by Viano; 08-28-2010 at 01:46 PM.
    Viano

  6. #21
    caytchen's Avatar Contributor
    Reputation
    138
    Join Date
    Apr 2007
    Posts
    162
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats because you can't just use his *.mesh format and expect it to work. You need to actually build the navigation mesh using Recast. Take a look at the demo and how it builds actual navigation meshes.

  7. #22
    Nightblizzard's Avatar Active Member
    Reputation
    20
    Join Date
    Jan 2009
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Viano View Post
    Code:
    public void CreateOBJFile() 
            {
                Console.WriteLine("Creating OBJFile.");
    
                BinaryReader reader = new BinaryReader(
                    File.Open("C:\\30_48.mesh",
                    FileMode.Open)); // stormwind
    
                TextWriter tw = new StreamWriter("stormwind.obj");
    
                reader.ReadBytes(32); //jump over BBX
                reader.ReadBytes(16); //jump over ADT
    
                // INDICES
                reader.ReadChars(3);
                reader.ReadByte();
                UInt32 indexSize = reader.ReadUInt32();
                int[] indexes = new int[indexSize];
                for (int i = 0; i < indexSize; i++) 
                {
                    indexes[i] = (int)(reader.ReadInt32()+1);
                }
    
                Console.WriteLine("Done with saving indices.");
    
                // write VERTICES
                reader.ReadChars(3);
                reader.ReadByte();
                UInt32 vertexSize = reader.ReadUInt32();
                for (int i = 0; i < vertexSize; i++)
                {
                    tw.WriteLine("v " + reader.ReadSingle() + " " + reader.ReadSingle() + " " + reader.ReadSingle());
                }
    
                Console.WriteLine("Done with writing vertices.");
    
                // write INDICES
                for (int i = 0; i < indexSize;)
                {
                    tw.WriteLine("f " + indexes[i++] + " " + indexes[i++] + " " + indexes[i++]);
                }
    
                Console.WriteLine("Done with writing indices.");
    
                tw.Close();
    
                Console.WriteLine("Done.");
            }
    This should generate a decent .obj for recast.
    Are you sure it works that way? I'm trying it the whole day long but i can't get it into the recast demo properly.
    http://imagr.eu/up/4c797df2a81ed9_stormwind.png
    I even rotated it over (I guess) every axis but nothing!

    My code looks pretty similar with yours, so I'll bet your result wont look better.
    C++ | void MeshParser::readVTX(std: - Anonymous - 88FC9H1V - Pastebin.com

  8. #23
    FenixTX2's Avatar Active Member
    Reputation
    23
    Join Date
    Mar 2009
    Posts
    125
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something that could be quite interesting: recastcuda - Project Hosting on Google Code

    Originally Posted by Nightblizzard View Post
    Are you sure it works that way? I'm trying it the whole day long but i can't get it into the recast demo properly.
    http://imagr.eu/up/4c797df2a81ed9_stormwind.png
    I even rotated it over (I guess) every axis but nothing!

    My code looks pretty similar with yours, so I'll bet your result wont look better.
    C++ | void MeshParser::readVTX(std: - Anonymous - 88FC9H1V - Pastebin.com
    Which version of recast are you using? I think the recast demo application in the svn is more up to date

  9. #24
    sPeC!'s Avatar Member
    Reputation
    23
    Join Date
    Jun 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nightblizzard View Post
    Are you sure it works that way? I'm trying it the whole day long but i can't get it into the recast demo properly.
    http://imagr.eu/up/4c797df2a81ed9_stormwind.png
    I even rotated it over (I guess) every axis but nothing!

    My code looks pretty similar with yours, so I'll bet your result wont look better.
    C++ | void MeshParser::readVTX(std: - Anonymous - 88FC9H1V - Pastebin.com
    Just edit the demo provided with wowmapper and create the obj directly if you have no other use for the .mesh files...

    Edit: Btw, your code isn't not similiar with the one posted by Viano, he actually shows the part where he parses the sections headers. You just start reading from the stream, we have no idea where the file pointer is when you call the function or how the other variables are initialized, for example m_IDXindices.

    Cheers,
    Last edited by sPeC!; 08-28-2010 at 09:09 PM.

  10. #25
    Nightblizzard's Avatar Active Member
    Reputation
    20
    Join Date
    Jan 2009
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which version of recast are you using? I think the recast demo application in the svn is more up to date
    I'm using the latest version of both programs (yes, I compiled them) so I guess that aint the problem.

    Just edit the demo provided with wowmapper and create the obj directly if you have no other use for the .mesh files...
    I'm not quite sure, if I have no other use for them in future. But I will try that!

    Edit: Btw, your code isn't not similiar with the one posted by Viano, he actually shows the part where he parses the sections headers. You just start reading from the stream, we have no idea where the file pointer is when you call the function or how the other variables are initialized, for example m_IDXindices.
    Yes, your right. I'm just showing the part where I parse the VTX stuff and writeing everything into a file. But that part looks like Vianos read/write part
    And the file pointer should to be fine, since I read everything else before that. BBX->POS->IDX->VTX

    So, I'll try to parse the obj files directly with wowmapper. Will soon be back with some results.

    Edit:
    Same - Everything is upside down.
    Last edited by Nightblizzard; 08-29-2010 at 08:17 AM.

  11. #26
    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)
    try like this :

    Code:
              // Write the vertex's  
              for (int i = 0; i < mesh.vertices().size(); i++)
    	  {
    		  fs1 << "v " << (mesh.vertices()[i].x) << ' ' << mesh.vertices()[i].y << ' ' << (mesh.vertices()[i].z) << '\n';
    	  }
    
              // Create faces based on the indices (1-based)
    	  for (int i = 0; i < mesh.indices().size();)
    	  {
    		  fs1 << "f " << mesh.indices()[i++]+1;
    		  fs1 << ' ' << mesh.indices()[i++]+1;
    		  fs1 << ' ' << mesh.indices()[i++]+1 << '\n';
    	  }

    Credi : sPeC!
    Last edited by guizmows; 08-31-2010 at 09:46 AM.

  12. #27
    Nightblizzard's Avatar Active Member
    Reputation
    20
    Join Date
    Jan 2009
    Posts
    75
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol that works :O
    The only difference between your code was
    Code:
    	  unsigned int i = 0;
    	  while(i < mesh.indices().size())
    	  {
    		  fs1 << "f " << mesh.indices()[i++]+1 << ' ' << mesh.indices()[i++]+1 << ' ' << mesh.indices()[i++]+1 << '\n';
    	  }
    Well, I don't know what's the problem with this piece of code, it seems to be fine to me Oo

    But ya, it works. Thank you!

  13. #28
    sPeC!'s Avatar Member
    Reputation
    23
    Join Date
    Jun 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe, that was a copy paste of my code on the start of the thread with the change sugested by MaIn on the second post. You should have readed the thread, it would had save you some troubles

    Edit: It seems your problem was related with operator precedence, Operators precedences

    Cheers,
    Last edited by sPeC!; 08-30-2010 at 03:53 PM.

  14. #29
    FenixTX2's Avatar Active Member
    Reputation
    23
    Join Date
    Mar 2009
    Posts
    125
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick question. Why does wowmapper produce .obj files whose models some times have jagged edges? Is there any way to stop this?

  15. #30
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by FenixTX2 View Post
    Quick question. Why does wowmapper produce .obj files whose models some times have jagged edges? Is there any way to stop this?
    I don't really know what 'jagged edges' you're talking about. If you have a zig-zag pattern on the ADT's border it usually means there's a mountain or other structure there. If you're talking about spikes coming from the ground, those are trees.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

Page 2 of 3 FirstFirst 123 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. Free World of Warcraft (10 days not playing with payment info)
    By Fakeskuh in forum World of Warcraft General
    Replies: 5
    Last Post: 06-15-2006, 12:20 PM
  3. Collected Naxx info
    By impulse102 in forum World of Warcraft General
    Replies: 1
    Last Post: 06-04-2006, 01:44 AM
  4. Info on taking Ragnaros (And other MC general info)
    By Cush in forum World of Warcraft Guides
    Replies: 4
    Last Post: 05-28-2006, 03:53 AM
All times are GMT -5. The time now is 11:41 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