   Collision Detection Methods
  What (efficient) methods are there ?I know only of either employing vector math (raycasting, intersection testing & stuff). or using image based techniques(looking a z-buffer).(3d)Both not very efficient/attractive.Are there any more competitors out there ?   
  try bounding(Box/Sphere/Object/...)[still intersection testing] and try to use some sort of ordering to pick them based on distenace or something like that.check BSP Tree or so.take care,   ;Quote:Original post by ff8try bounding(Box/Sphere/Object/...)[still intersection testing] and try to use some sort of ordering to pick them based on distenace or something like that.check BSP Tree or so.take care,thanx, but I know of those. Am wondering about any others (just general curiosity)   ;  Well most methods that are practical in the context of games are what you'd call "vector math" methods, but they are extremely varied. They can be made fairly efficient by using crude-approximations as early tests, organizing objects into spatial structures and caching results to take advantage of spatial and temporal locality.It's a large subject and there are way too many techniques to cover in a forum posts, but if you are serious about learning about these techniques I've found the book "Real-time collision detection" by Christer Ericson to be a great introduction to the subject (check out the table of contents to get an idea of the scope of the subject area).   ;  Generating bitmasks and testing for intersection with MMX is pretty fast.   ;  thanx for the replies.could you elaborate on that bitmask concept ?But I gather there are no fundametally different techniques?like e.g. the zbuffer. I get that this also comes down to the 'same vector' math ultimately, but in this case collision detection (in viewdirection that is) is a 'free side-effect', which you basically get for free, except the reading back from the buffer. Its these kind of properties I find interesting, whereas ALL standard 'doing the math' techniques (you know, intersecting pionts/planes/boxes etc) have no such attraction AND are heavily dependant on searching, and all that comes with it (narrowing down, explosive search spaces, etc etc etc).   ;  Take an image, and generate a bitmask (1 bit per pixel) based on areas of transparency: a 1 for opaque, and a 0 for transparent.  Then, to test if two objects overlap, test if the collision masks intersect by using bitwise-AND on bits from the two masks.  If anything comes back 1 after the AND, there is an overlap and you can immediately exit the test.  It can be extremely fast using MMX, which can test a bitwise AND on 64 bits at once, effectively testing 64 pixels for overlap per loop iteration - and bitmasks are typically small (a 256x256 bitmask is 8kb, therefore caching well with small memory bandwidth requirements).Problems include: generating new bitmasks for rotated/scaled objects (which can still be done very quickly), bitshifting required for objects at non-multiple of 8 offsets (which can be solved with pre-shifted masks), and possibly alignment and endian issues.  But I've managed to get this system working pretty well, with about 1 clock cycle per pixel tested, which isn't bad considering it includes all memory and loop iteration overhead.   