Jump to content

  • Log In with Google      Sign In   
  • Create Account

Question about rendering vmfs in opengl


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 26 July 2013 - 03:48 PM

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, 26 July 2013 - 03:50 PM.


Sponsor:

#2 swiftcoder   Senior Moderators   -  Reputation: 10363

Like
1Likes
Like

Posted 26 July 2013 - 07:18 PM

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 - Software Engineer @Amazon - [swiftcoding]


#3 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 27 July 2013 - 02:07 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.

Edited by Chris528, 27 July 2013 - 02:14 AM.


#4 swiftcoder   Senior Moderators   -  Reputation: 10363

Like
0Likes
Like

Posted 27 July 2013 - 06:49 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.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#5 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 27 July 2013 - 09:35 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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS