Question about rendering vmfs in opengl

Started by
3 comments, last by Chris528 10 years, 8 months ago
I just finished up coding a vmf(valve map format) parser and have no idea how I should go about calculating the points from the planes so I can load them into a vbo. I know the points are calculated using some type of plane intersect equation but I have no idea how to do that or even where to start.
Advertisement

As I understand it, It's not a trivial process: you need to find all the intersections between planes, and then subdivide the resulting polygons into triangles, and reassemble them into indexed arrays.

You might be better off converting the VMF to some other format and parsing that.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

As I understand it, It's not a trivial process: you need to find all the intersections between planes, and then subdivide the resulting polygons into triangles, and reassemble them into indexed arrays.

You might be better off converting the VMF to some other format and parsing that.


Thanks for responding, I know its not a trivial process, I was just looking for a general explanation or even a useful link. I know I could convert my model to obj, but thats not what I'm aiming for.


I know I could convert my model to obj, but thats not what I'm aiming for.

The only reason I mentioned this, is because you aren't meant to render VMF files directly. The usual approach is to run them through the BSP compiler, and render those.

As for implementing your own BSP compiler, I don't have a reference off hand, but older gamedev books would be more likely to cover the topic, and there are a bunch of open-source BSP compilers.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I know I could convert my model to obj, but thats not what I'm aiming for.

The only reason I mentioned this, is because you aren't meant to render VMF files directly. The usual approach is to run them through the BSP compiler, and render those.

As for implementing your own BSP compiler, I don't have a reference off hand, but older gamedev books would be more likely to cover the topic, and there are a bunch of open-source BSP compilers.


My goal is to make a simple map editor which would require rendering the vmf. The code for the bsp compiler is already included in the sdk, but that's not what I'm trying to do.

This topic is closed to new replies.

Advertisement