Tuesday, July 28, 2015

Giving Recast Another Shot

It seems that although Recast grossly lacks any documentation whatsoever, the rest of the Internet grossly lacks friendly information on navigation mesh creation. Unfortunately, although I was able to cover the main surface in triangles, there was little in the way to actually figure out how to create a navigation mesh with the triangles that were blocked by an object. 

These things do happen, and I had to start over from scratch with not enough knowledge on the intimately complex process of navigation meshes. I decided to give Recast another shot, using premake (the new version supports VS2013! Thank goodness!) to make the demo so I could trace variables that would otherwise seem horribly confusing by just perusing the source code. 

I understand the process of Recast's mesh input a little better. The bounds I have to set manually (main plane z and x bounds, y bounds aren't too wild since the ball can't go up such a steep plane), while the vertices and indices (labeled triangles with Recast) are entered not into a specific buffer, like DirectX's buffers, but a dynamic array of floats and ints. Luckily I've got plenty of experience with dynamic array usage while working with C, so I understood that process. However, I'm not too sure whether it'll work. The demo loaded from an obj file, whereas I am loading multiple models from multiple obj files (e.g. world-specific models). The conversion process seemed to workout alright, and I am currently on the post-build config process (before I head to bed, *yawn*)

In the demo, settings were managed via an editor, but I'll put some values in on the fly and manage them from code. Those settings won't be changed in the front end anytime soon. Hopefully this works out; navigation meshes are no joke, and could use some more support from the open source audience and/or people looking to post another pathfinding tutorial.

No comments:

Post a Comment