darrenc182 Posted August 20, 2011 Share Posted August 20, 2011 Does anyone know how to use Detour to handle dynamic obstacles? I've been looking online in Mikko's blog however I did not get any information about it. I saw a video in this forum that was using spheres as dynamic objects and showing Detour performing path adjustments when the path is being blocked. The video I am referring to is here: . Any and all help will, as always, be greatly appreciated. Quote Intel 2nd Generation i5 Quad Core Running at 3.30GHz. 8GB RAM, GeForce GTX 460 1024MB DDR5. Link to comment Share on other sites More sharing options...
Josh Posted August 20, 2011 Share Posted August 20, 2011 I'm trying to figure this out myself. His library is completely undocumented...there's just a demo with SDL, a GUI, and who knows what else built into it, so it's impossible to tell what the actual commands to use it are. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
L B Posted August 20, 2011 Share Posted August 20, 2011 Why don't you get your documentation and examples from http://code.google.com/p/recastnavigation/? When I used Detour/Recast, the programmer in charge of that part had to rebuild small chunks of the navmesh to update it. It was the only built-in way, unless you wanted to code your own algorithms to avoid obstacles. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 Why don't you get your documentation and examples from http://code.google.com/p/recastnavigation/? So where's the documentation? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
darrenc182 Posted August 21, 2011 Author Share Posted August 21, 2011 So where's the documentation? That's what I was going to ask. I did see additional source code and header files that are not in the depreciated zip files available for download. I just don't know how to use them with detour and recast. Quote Intel 2nd Generation i5 Quad Core Running at 3.30GHz. 8GB RAM, GeForce GTX 460 1024MB DDR5. Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 If you download it with SVN there's a doxygen folder. There's a footer and header html files, but no index or main page: http://code.google.com/p/recastnavigation/source/checkout Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
L B Posted August 21, 2011 Share Posted August 21, 2011 If I recall correctly, we used this as a starting point: http://code.google.com/p/recastnavigation/source/browse/#svn%2Ftrunk%2FRecastDemo%2FSource Quote Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 Your programmer must be smarter than me, because I just see pages and pages of gibberish. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 Handmade navmeshes in the CSG editor might be much more optimal: http://www.ai-blog.net/archives/000152.html However, my instinct says people will prefer an automatic solution, even if performance was ten times slower. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
L B Posted August 21, 2011 Share Posted August 21, 2011 Don't get me wrong, it did take us 1 month to get it running (admittedly, it was very part-time hobbyism). I had read that blog post, and so did the Recast/Detour team, I think. The flexibility in the Recast parameters allows you to create high quality navigation meshes, once it's set up. And computation time of navmeshes might make 10 times slower irrelevant, in the event that one hasn't played enough with the parameters to make a decent navmesh. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 Recast uses a fixed radius, doesn't it? I mean, it can't dynamically handle characters with different radii, can it? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2011 Share Posted August 21, 2011 I think this is what we want the classes to be: #include "../le3.h" namespace le3 { class NavMesh { public: float radius; float height; float climbheight; float maxslope; float cellsize; void AddVertex(const float& x, const float& y, const float&z); void AddPolygon(const int& count, const short* indices); bool Build(); bool BuildTile(const int& tilex, const int& tilez); Path* FindPath(const Vec3& p0, const Vec3& p1) }; class Path { public: std::vector<Vec3> points; }; } Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
L B Posted August 21, 2011 Share Posted August 21, 2011 Detour (the pathfinding algorithms) can't handle any dynamic changes. Recast can only rebuild part of the navmesh for Detour to be updated. So radii or not, it's just not dynamic. Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted August 23, 2011 Share Posted August 23, 2011 ..my library deal with such problem (dynamic obstacle avoiding) on such way that each generated navigation grid cell extracted as a path node, updating itself with bounding space and soon as it is triggered looking for alternate route..quite simple and fast.. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 23, 2011 Share Posted August 23, 2011 Everyone who claimed to be using recast has mysteriously disappeared. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted August 23, 2011 Share Posted August 23, 2011 It's sad that such a library can't handle dynamic environments or objects with different radii. Makes me want to dive back into my pathing libraries just to help you guys... MarleysGhost also has a decent library as well Quote Link to comment Share on other sites More sharing options...
Josh Posted August 23, 2011 Share Posted August 23, 2011 Yes, but those are all node or grid based, are they not? Recast handles dynamic changes by splitting the mesh into tiles and recalculating only tiles that have changed. That might not work well if you have thousands of objects rolling around, but most games don't tend to do that anyways. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Naughty Alien Posted August 23, 2011 Share Posted August 23, 2011 .is there any particular reason why you want to go recast route ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.