by somat · 2y ago · 0 comments
The article touches on this, but for them unfamiliar, the quake .map format is the editable text based format. but it does not use the common method of vertices into edges into faces as the base building block. it uses planes, the graphics primitive is is the three points that define a plane, where these planes intersect are the edges.
I never dove into the subject enough to figure out if this plane representation was also internal to the compiled bsp format, but I suspect it is. My guess is that it is the natural conclusion when you need a map interchange format for your highly optimized space partitioned engine.
Not exactly. The BSP format stores planes as a normal (3 floats) + distance to the origin + an int that flags axis aligned planes. Which is the representation the engine uses.
I believe “3 points on the plane” was chosen for the map file so the coordinates could be exact integers in the text file, to avoid precision loss from storing the normal+distance representation. The latter representation uses less space and is easier to work with.
Some .map extensions do store vectors instead of scale/shift/rotate that allow much more flexible texture mapping (though still need to be on a plane, but can represent things like skewing), but these are still stored separately from the plane.
And yes. Intersection of planes is a higher level language than vertices and UVs. It pushes more work onto the computer instead of the human.