BSP Blues
I decided to try something out yesterday. I’m trying to figure out how to get an OBJ file to integrate with ToeTag in a seamless fashion. I had many ideas but then came up with the one that I felt was ideal : have QBSP simply insert those triangles directly into the resulting BSP! Why fool around with trying to create convex shapes from the OBJ file or extruding the polys backwards or other techniques that can get messy?
Well, because the QBSP code is horrifically complicated. Well maybe not for some people but for me, it is. I can’t make heads or tails out of what Carmack is doing in there. Global variables everywhere, obscure variable names, oddly structured function calls - ye gods. So that idea is dead. I thought that I was close at one point as I had it reading the triangles in and I was inserting them into the BSP but lots of stuff was breaking and they weren’t rendering and … well, just forget it.
I’m going to do a more traditional implementation of it now. ToeTag will read the triangulated mesh into the editor, break it down immediately into a set of brushes and then you can work with it freely.
I will offset the pain of this somewhat by implementing a feature that I will call “Quick Groups”. You’ll be able to select a set of brushes, hit CMD+G, and then those brushes will work as a group. If you double click on one, it will select all of the others in the quick group. Any imported triangle meshes will automatically go into their own quick group. Should work well enough I suppose although I really would have liked to have gotten the QBSP solution working. I guess that’ll have to wait until someone who speaks Carmack better than I do can take a look at it.
Tags: Code, qbsp, Quake, quick groups