Forum archive
Voxel Collision Detection
- Hi Ken and other Voxel fans
Id like to start a discussion on voxel collision detection. I'd like to know more about interesting ideas you have on voxel-accurate collision detection algorithms.
@Ken: how do you do collision detection between voxel models? Is it just a voxel by voxel comparison? Do you have any smarter alorithm with your RLE Approach?
I want to implement some smart algorithm but not sure if the brute force method is really the only the way to do that.
Rgrds
Sebastian Re: Voxel Collision Detection
Voxlap uses bounding spheres. You didn't notice? I have not studied voxel-accurate collision. All I can think of is the brute force method, which is to rasterize one model into the grid space of the other, and exiting early if an intersection is found.- Voxlap uses bounding boxes, but there are more possbiblities, like clear voxel2voxel crashes based on pixel2pixel collision detection...
EDIT:
oops..ken wus first, sry, didnt notice :P - A way to obtain voxel-accurate collision detection is to use an increasing algorithm. First you use an space culling, as a quad-tree or oct-tree, even a simple tile-map, to detect which objects may colide with each other. Then use an bounding sphere (don't need to use square roots:
Then use the idea from Awesoken.if sqr ((x1*x1) + (y1*y1)) > sqr ((x2*x2) + (y2*y2)) then ((x1*x1) + (y1*y1)) > ((x2*x2) + (y2*y2))
May be it seems it's slower than directly overlap the objects, but the first step (space culling) will exclude a lot of slow voxel overlapings.Edited by Ñuño Martínez at