Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to render the brushes from a Source engine .vmf file in C++, using OpenGL.

The .vmf stores solid brushes as a series of planes which I would like to use to calculate the points for each brush. I'm pretty sure this would be done exactly the same as for all Quake engine based .map files as well.

Basically each point of the brush is the point where 3 planes intersect. I found a similar question to mine on stackoverflow and the explanation is to get the unit normals for the 3 planes, then use equation 8 on this page My problem is that I have no idea how to implement that

Here's some code for a single 6 sided cube shaped brush:

"plane" "(0 0 256) (0 256 256) (256 256 256)"
"plane" "(0 256 0) (0 0 0) (256 0 0)"
"plane" "(0 0 0) (0 256 0) (0 256 256)"
"plane" "(256 256 0) (256 0 0) (256 0 256)"
"plane" "(0 256 0) (256 256 0) (256 256 256)"
"plane" "(256 0 0) (0 0 0) (0 0 256)"

I really have no idea where to start.

share|improve this question

closed as unclear what you're asking by Josh Petrie Jun 25 '14 at 15:21

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

The points are the intersections of all of the planes in a brush. – MFAH Jul 29 '13 at 12:56
You seem to answer your own question (that points are the intersection of the planes). It's not clear what you actually expect as an answer to this question. What have you tried, and where in that implementation did you stumble? – Josh Petrie Jun 25 '14 at 15:22