   Brushes in a quake3 .bsp file
  I am building a quake3 clone engine.  I have added collision detection code, but I don''t understand how the brushes in the q3 .bsp file are used.  It seems like its just a big index of planes.  if someone could point me in the direction of how these are used, or how they think q3 deals with collision detection, it would be greatly apprectiated 
  When a map is compiled to BSP format, it isn't composed of brushes any more. The BSP compilation process collects all the polygons of every brush, converts them all to triangles, and creates a BSP tree from them. The Quake III BSP format, in the simplest terms, is nothing but a collection of planes (triangles) and BSP node data (along with other stuff like entity positions, etc.)However, certain brushes are preserved through the BSP process: brushes tied to entities like movers. I don't know how you'd access these (I have little experience with Quake III's BSP files), but there are myriad tutorials out on the net which deal with exactly these topics. Look for them with Google. Another good place to start is www.GameTutorials.com's Quake III BSP tutorials.As regards collision detection: You have two points, right? The start and end positions? Well, I think (I don't completely know, but this is how I'd do it) that you take the two points, and see which BSP node they are in. Then, all you have to do is test the triangles contained in that node, and you have your collision detection. If the start and end positions are in different nodes, you have to test the nodes they're in, plus the nodes which connect the nodes they're in. I think that one of the GameTutorials.com exercises does have some rudimentary BSP collision detection, but if it doesn't, there's always the net...    Coding Stuff ->  [   iNsAn1tY Games | DarkVertex | How To Do CSG | Direct3D Vs. OpenGL | Google ]  Fun Stuff    ->  [   Evil T-Shirts | Stick-Based Comedy | You're Already Here | The Best Film Reviews ]  [edited by - iNsAn1tY on August 18, 2003 6:41:34 AM];quote:Original post by iNsAn1tY  When a map is compiled to BSP format, it isn''t composed of brushes any more. ..  .. The Quake III BSP format, in the simplest terms, is nothing but a collection of planes (triangles) and BSP node data (along with other stuff like entity positions, etc.)Quake3 BSP files store a lot of brush information for collision detection purposes, each brush entry has links to how many faces it has, the faces themselves, contents information, and planes   -----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack 