Thursday, September 3, 2009
I have got some pretty good progress on the areas. I have been concentrating on marking the areas. Volume based areas were pretty simple to do. So far I have only axis aligned box, but I do not expect the rest to be too complicated.
The height based areas were a bit more challenging. In above picture, the blue are is marked by the black box, the yellow area is where the character can stand, the red areas are where the character can crouch and on blue ares the character needs to go "prone". Those are dummy categories just to test that I can handle more than one height value.
That kind of sampling tends to generate a lot of small areas here and there. For example if a wall is slightly tilted, you may get one voxel worth of proning and three voxels worth of crouching. I tried several kinds of filtering methods to get rid of those artifacts.
First I tried median filter, but I either had to do too many passes or the filter ate away certain small bridge areas, which should have been left unaffected. After some fiddling, I tried similar filtering method I used for the region merging and it turned out much better. The filter checks adjacency, so it will not remove small areas which connects two neighbor regions (such as low doors), it does a bit smarter merging, so that tiny 'crouch' area can be merged to a 'prone' area but not to 'stand' area or else the character collision would fail.
Next up is to enable the partition system to understand the areas. I expect that to be the most challenging part of the this whole feature.
Posted by Mikko Mononen at 8:20 AM
Subscribe to: Post Comments (Atom)
very cool. are the custom regions going to be mark-able with flags at the voxel level? or must you create them with a box or bounds of some sort?ReplyDelete
p.s. I sent you a PM on aigamedev.net
Both is possible. I'd imagine that if you want to do some annotation in editor, you'd like to create polygons or some simple volumes. Some things are better handled per voxel, such as the area annotation based on height.ReplyDelete
Thanks for sharing the Recast/Detour project and your impressive expertise, I've been discovering your work via http://aigamedev.com I posted a discussion thread there http://forums.aigamedev.com/showthread.php?t=3241 basically looking for command line type tools that I might use to integrate these more advanced map analysis/experimentation into existing workflows.
For example I am currently working with .t3d map geometry files exported from Unreal Tournament. I would like to be able to convert these to the .obj input mesh file format, and run a region/area analysis for creating/annotating waypoints placed back into the .t3d geometry file all from a set of batch commands. I don't believe this type of pipeline utility process is currently supported although I can imagine repackaging your code/algorithms towards that end outside of the direct tool visualization context.