Is a navmesh just the walkable terrain geometry? Can I work backwards with an obj file of a mesh? menu

User Tag List

Results 1 to 12 of 12
  1. #1
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is a navmesh just the walkable terrain geometry? Can I work backwards with an obj file of a mesh?

    The raw adt files don't contain the obstacles, so I tried exporting the navmesh as an obj file once it was baked with all the buildings and whatnot. Does this process lose all the agent information? It would be convenient if I can somehow make the file digestible for Detour, but I understand that if it's more than just the geometry of the mesh taken into account then obviously this won't work.

    I assume that there is some way of accomplishing this because the 3D software used for games used to have native R/D integration, so it wouldn't make sense for their to be no pipeline to feed it to Detour. Any help would be greatly appreciated because my bots are protesting that they are sick of fishing and dungeon farming. They want to be real bots in the open world.

    These ads disappear when you log in.

  2. #2
    mazer's Avatar Site Donator Authenticator enabled
    Reputation
    11
    Join Date
    Sep 2007
    Posts
    69
    Thanks G/R
    7/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    currently working on navmesh generation myself (more or less just poking around)
    if all files are exported and merged correctly, the final terrain (or mesh file) should look like this, which will be used to generate the path (while using your agent parameters)



  3. #3
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm currently importing into blender and trying to make use of an addon to bake the mesh there, but I don't think I can get the export type I need for Detour unfortunately. So what my plan is now is to just save a sample tile (1 tile = 1 adt until later) for testing purposes.

    sw.png

  4. #4
    mazer's Avatar Site Donator Authenticator enabled
    Reputation
    11
    Join Date
    Sep 2007
    Posts
    69
    Thanks G/R
    7/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is far as i have read, typically all the baking and composing is done in a row and you will one mesh per adt file

    i used the mangos solution. for one it is documented well enough and on the other hand, the map does not differ this much from current classic:
    https://drewkestell.us/Article/6/Chapter/20

    a few other ressources that i found usefull this far (mostly outdated and need some adjustments but you will get the idea)
    GitHub - miceiken/WoWMap and a updated fork GitHub - aeo24/WoWMap: Modified version of miceiken's WoWMap
    GitHub - stschake/meshReader: WoW NavMesh generator based on Recast&Detour (and geometry reader)
    GitHub - cleverca22/wowmapviewer: A modified version of the WoWmapview (https://sourceforge.net/p/wowmapview).

    at this point i got the all the meshes needed, but unable to get pathes calculated (mostly because examples are outdated or compilation fails horribly)
    my goal is to get it calculated with sparpnav https://github.com/Robmaister/SharpNav

  5. Thanks silverpieces, Creepwalker (2 members gave Thanks to mazer for this useful post)
  6. #5
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    checkout WoW.tools | Export

    they have an exporter to dump all the tiles and can be linked to blender via addon


    edit: I'm not sure why, but it fails here when I try to allocate the mesh..

    Code:
    dtNavMesh* mesh = dtAllocNavMesh();
    if (!mesh)
    {
    	fclose(fp);
    	return 0;
    }
    Last edited by silverpieces; 01-07-2021 at 11:20 PM.

  7. #6
    Jadd's Avatar 🐸
    Reputation
    1475
    Join Date
    May 2008
    Posts
    2,401
    Thanks G/R
    77/302
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't really understand what you're asking. What are you importing into blender? If it's the map geometry, that's what you should be importing into Recast.

    In regards to your thread title: Detour meshes are not just geometry. It's actually quite a lot more complex than that, without even regarding the pathfinding aspect: tiles/tile connections, poly mesh, poly portals/neighbour connections, detail mesh, off-mesh connections. There's even more intermediate data if you're planning on rebuilding mesh tiles on the fly (like when using temporary obstacles.)

    Originally Posted by silverpieces View Post
    Code:
    dtNavMesh* mesh = dtAllocNavMesh();
    if (!mesh)
    {
    	fclose(fp);
    	return 0;
    }
    This should never happen, unless you replaced the default memory allocator function (sAllocFunc) or something that executed before-hand took up *all* of your available memory.

    FYI: SharpNav is also pretty well outdated by about 5-6 years.
    Last edited by Jadd; 01-08-2021 at 02:32 AM.

  8. #7
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a little better understanding now after playing around with a mesh created from the R/D demo project. I was thinking the mesh is just a 3D object itself, but it has a lot of data as well like the agent info and the things you mentioned. I did sort of succeed in what I wanted by being able to feed it to detour. Spent all day with some project setting that was causing it to fuck up like that code snippet above. I knew something was off when that part failed every time, so I remade the project and loaded my mesh finally.

    Now I suppose it's time to try and integrate with my project and figure out how to get all the geometry working together plus all the little caveats of navigation in general but one thing at a time..

    Here it's actually reading the mesh properly when before it was screwing up the data chunk of it.

    mesh.png
    Last edited by silverpieces; 01-08-2021 at 03:22 AM.

  9. #8
    mazer's Avatar Site Donator Authenticator enabled
    Reputation
    11
    Join Date
    Sep 2007
    Posts
    69
    Thanks G/R
    7/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    FYI: SharpNav is also pretty well outdated by about 5-6 years.
    noticed that as well. all demos / project i could find are somewhat outdated too.
    kindly asked, could you point me to working / updated direction? dont want to spend too much time on researching the wrong things.

  10. #9
    Jadd's Avatar 🐸
    Reputation
    1475
    Join Date
    May 2008
    Posts
    2,401
    Thanks G/R
    77/302
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mazer View Post
    noticed that as well. all demos / project i could find are somewhat outdated too.
    kindly asked, could you point me to working / updated direction? dont want to spend too much time on researching the wrong things.
    Coincidentally, I'm currently working on a functionally equivalent, standardized version of Detours (minus Recast) for .NET to consume the meshes generated by the native R&D library. Recast isn't typically used frequently, so I was happy to leave the functionality (and workload) out of it.

    I've finished the first half - pathfinding works - but I'm still adding temporary obstacle support and I want to clean everything before an initial release.

    I suspect it will be available within the next month if all goes to plan.

  11. Thanks mazer, Alisha (2 members gave Thanks to Jadd for this useful post)
  12. #10
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Coincidentally, I'm currently working on a functionally equivalent, standardized version of Detours (minus Recast) for .NET to consume the meshes generated by the native R&D library. Recast isn't typically used frequently, so I was happy to leave the functionality (and workload) out of it.

    I've finished the first half - pathfinding works - but I'm still adding temporary obstacle support and I want to clean everything before an initial release.

    I suspect it will be available within the next month if all goes to plan.
    I'm eagerly awaiting this Jadd, but I'm still lost with how to orient my 3D objects and it's driving me crazy. I tried just baking a mesh for flat geometry with origin set to the center, but my path is always zero points. Blender has the option to export with the forward of your choice and which direction you want to be up, but the wow.tools exporter has X rotated 90 degrees, so I can't do the mental imaging to decide how to export. I'm just guessing at this point how to orient it. Probably the only thing I've done right and maybe not is set the "origin to geometry".

    Here is my straight path calculation (CapekNav) maybe more keen eyes can see my fault..

    Code:
    int Nav::FindStraightPath(WOWPOS start, WOWPOS end, WOWPOS* path, int size)
    {
    	float m_spos[3];
    	m_spos[0] = -1.0f * start.y;
    	m_spos[1] = start.z;
    	m_spos[2] = -1.0f * start.x;
    
    	float m_epos[3];
    	m_epos[0] = -1.0f * end.y;
    	m_epos[1] = end.z;
    	m_epos[2] = -1.0f * end.x;
    
    	dtQueryFilter m_filter;
    	m_filter.setIncludeFlags(1);	// walk
    	m_filter.setExcludeFlags(0);
    
    	float m_polyPickExt[3];		// I'm not sure how extents are used when calculating so using what CapekNav had
    	m_polyPickExt[0] = 2;
    	m_polyPickExt[1] = 4;
    	m_polyPickExt[2] = 2;
    
    	dtPolyRef m_startRef;
    	dtPolyRef m_endRef;
    
    	m_navQuery->findNearestPoly(m_spos, m_polyPickExt, &m_filter, &m_startRef, 0);
    	m_navQuery->findNearestPoly(m_epos, m_polyPickExt, &m_filter, &m_endRef, 0);
    
    	static const int MAX_POLYS = 256;
    	dtPolyRef m_polys[MAX_POLYS];
    	float m_straightPath[MAX_POLYS * 3];
    	unsigned char m_straightPathFlags[MAX_POLYS];
    	dtPolyRef m_straightPathPolys;
    	int m_nstraightPath;
    	int m_npolys;
    
    	int numPositions = 0;
    
    	m_navQuery->findPath(m_startRef, m_endRef, m_spos, m_epos, &m_filter, m_polys, &m_npolys, MAX_POLYS);
    	m_nstraightPath = 0;
    	if (m_npolys)
    	{
    		m_nstraightPath = m_navQuery->findStraightPath(m_spos, m_epos, m_polys, m_npolys, m_straightPath, m_straightPathFlags, &m_straightPathPolys, &m_nstraightPath, MAX_POLYS);
    		for (int i = 0; i < m_nstraightPath * 3; )
    		{
    			path[numPositions].y = -1.0f * m_straightPath[i++];
    			path[numPositions].z = m_straightPath[i++];
    			path[numPositions].x = -1.0f * m_straightPath[i++];
    			numPositions++;
    		}
    		// append the end point
    		path[numPositions].x = end.x;
    		path[numPositions].y = end.y;
    		path[numPositions].z = end.z;
    		numPositions++;
    	}
    
    	return numPositions;
    }

  13. #11
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugghh I literally solved the issue 3 seconds after posting this, but that is just for my flat geometry. There are only so many combinations of how to orient my wow obj, so fingers crossed I can get it working with that too.

    edit: I was able to make a path in Human start zone. To clarify what's next I need to also load adjacent tiles as 3d data and extend the tile I'm working with by at least an agent's width? Then I need to check my position to load the adjacent tile when I cross into a new mesh?
    Last edited by silverpieces; 01-09-2021 at 09:41 AM.

  14. #12
    silverpieces's Avatar Member
    Reputation
    1
    Join Date
    Nov 2020
    Posts
    11
    Thanks G/R
    4/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Made a gif with the window 3d viewer.

    Stormwind.gif - Album on Imgur

Similar Threads

  1. [Buying] a rogue with an absurd amount of hks, 100000+ nad possibly the Conqueror title
    By skunkryger in forum WoW-EU Account Buy Sell Trade
    Replies: 0
    Last Post: 12-25-2017, 08:48 AM
  2. [Buying] a rogue with an absurd amount of hks, 100000+ nad possibly the Conqueror title
    By skunkryger in forum WoW-US Account Buy Sell Trade
    Replies: 0
    Last Post: 12-25-2017, 08:48 AM
  3. [Question] Lockito + Nox: are these bugs or just the way it is?
    By Pokeman in forum Pokemon GO Chat
    Replies: 6
    Last Post: 07-21-2016, 09:09 AM
  4. [BUG] If you were toxis or w/e and permaban is threatening you, just change the serve
    By MileP in forum League of Legends Exploits. Cheats, Hacks
    Replies: 0
    Last Post: 09-11-2015, 06:32 AM
  5. Server is public...I'm the only one that can connect..(+REP IF HELP)
    By DJGonn in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 06-12-2008, 07:51 PM
All times are GMT -5. The time now is 11:55 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search