PLZ PLZ Help Q2 bsp prob :(

Started by
1 comment, last by Zerosignull 22 years, 8 months ago
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 going into face edge lump -> the edge lump -> 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,-112 16,0-50 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~
Advertisement
check out glvelocity.gamedev.net under download there is a quake 2 bsp loader...check it out even though it just stores all the data in a display list it will give you a good idea of what to do when you have all the data and how to render it once you got that working you can start focusing on the bsp algorithim that then only displays certain poly''s when the player is in certain nodes or leaves . So focus in the bsp.cpp under the Render function(btw this is really slow since its all in a display list and processing stuff you cant see.
ive look at that and as far as i can c it uses a call th GL_TRIANGLE_FAN whic is really strange and as for the bsp im not to bothered i just want to get the level out of the map

~prevail by daring to fail~

This topic is closed to new replies.

Advertisement