Jump to content
  • Advertisement
Sign in to follow this  
Chris528

OpenGL Question about rendering vmfs in opengl

This topic is 2180 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. Edited by Chris528

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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. Edited by Chris528

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!