Archived

This topic is now archived and is closed to further replies.

Zerosignull

Constructing A Face from Quake 2 bsp file

Recommended Posts

Hi ive been trying to get my program to load up quake 2 bsp files (the maps) but after i have extracted the face information then obtained the relevant vertex co-ords for the Edges that make up the face i am unsure what to do with them next. here is a example of the first face Face Lump - First Face Plane - 682 Plane Side - 1 First Edge - 0 num Edges - 6 testure Info - 2 Lightmap styles[] - 0,255,255,255 Lightmap Offset - 0 Now ive interpreted it as saying - I have a face which has 6 edges contained consecutively in the face edge lump(starting @ 0). Now after ive been through the rigmaral of extracting the vertex inf by then going into the edge lump then into the vertex lump when i try to reconstruct them i get some right blx of results. here are the co-ords im geting from the vertex lump for the edges that make up the face above. 0,0,0 240,0,-192 240,0,-192 16,0,-192 16,0,-192 16,0-192 16,0,-92 16,0-112 16,0,-112 16,0-112 16,0,-50 16,0-112 now im guessing (well ive tried) the u carnt just put these points stright into a api draw routine like eg glBegin(GL_POLYGON) and xpect it to draw the corect shape. Now what im wondering which points of the above set of vertecies im expected to use to constuct the face bearing in mind that a 6 edged figure ie hexagon, only requires 6 vertices. SO PLz help me !!!! even if u just have a theory post it as a reply. Thnx ZSL ~prevail by daring to fail~

Share this post


Link to post
Share on other sites
I know it''s been a while since you posted, but did you ever figure this out? I''m at the same point, having the same problem. If I draw everything with GL_LINES I get a nice wireframe of the whole level - that''s essentially just rendering all the edges. But if you connect all the edges associated with a particular "face", they don''t appear to make triangles or even polygons or any sort of regular closed shape. Whatever it makes, it''s wrong. I have no idea how to turn all the edges intro triangles/quads/polygons/whatever.

Anyone else know?

Share this post


Link to post
Share on other sites