Triangulation of my Heart
Monday, May 19th, 2008I’ve spent the last week or so trying to convince QBSP to accept raw triangles. This has been challenging to say the least and what’s funny is that it -almost- works. Almost. The problem is that the triangles are not being added into the clipping hulls correctly so they don’t block players, weapon fire or monsters. They do, however, appear in the drawing hull and Quake happily draws them for me.
There are other problems as well like - if the triangle mesh I’m feeding isn’t convex, it doesn’t carve into the existing BSP correctly (convex meshes work fine).
It’s all very shaky and almost-working-y but I think I’m going to take a step back and take another crack at dissecting the mesh myself before saving out the MAP file. What I mean is that I’ll take the imported mesh and break it down into convex shapes and write those out individually to the MAP file.
To that end, I’ve spent the weekend solidifying my CSG and math routines to the point where I’d be tempted to call them “rock solid”. I can’t find any maps now that display artifacts when loaded so that’s a good sign. I would sometimes get stray polygons shooting off into infinity and stuff like that but that all seems to be fixed now and happily working.
I’ll post another update once I’ve had a chance to throw these new math routines at some mesh dissection concepts I have bumping around in my head.
