Drawing quake .map files

I have managed to decode quake .map files into a usable table, the table consists of brushes and triangles.
The problem is, although I did manage to parse the map reading other topics (such as the one shown below) I could not find a way to convert the map into a playable area

Could anyone point toward the right way to do this?

1 Like

Reading into the topic, I might have found a reply to a forum post stating pretty much what i need to do

It does not contains vertices. It contains 6 planes, each one defined by 3 points. I think there are tutorials out there to convert each 3 point plane into a plane defined by 3 normal components and a distance. Then you check for intersections between the planes of the brush. When 3 or more planes collide, a vertex must be added.

Then you need some CSG functions that determines when a new vertex must be deleted (its mainly a matter of checking if the vertex is on the back of any of the planes, and in that case delete it).

And once you have the vertices for your polygon, you must make a function to sort them in clockwise order.

So you have some work to do. If you don't understand normals nd vectors very well, it would be complicated.