Archived

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

Zerosignull

Quake123 .bsp, what is a face ?...

Recommended Posts

The question i would like answered is this. ive spent days finding out how to extract edges for the faces from a quake 2 .bsp file. Now the question is.. What are those faces supposed to represent? IE a triangle strip?, a triangle, a polygon or somthing else???!! plz help me!!! Also if its something else plz could u tell me how to contruct polys from the Something else, or point me to some web site that can thnx Zsnl, .. ~prevail by daring to fail~

Share this post


Link to post
Share on other sites
A Face is a Triangle... or any polygon that''s coplanar... Atleast that''s what I understand as a "Face"..

cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states

Share this post


Link to post
Share on other sites
I have never use bsp 2 but in quake 3, I think it''s fans.

I give some piece of code on how I make it, This is how i fill the index buffer. I have allready an vertex buffer that is fill with all the vertex in the bsp.

  
// Loop for each face

// dwi is the index is the location in the index buffer in wich we are writting the current index

for( i=0; i < bsp.face_count ; i++)
{
// We generate (number of vertex -2) triangles

for( int j=1; j < m_pBackObj->bsp.faces[i].vert_count -1; j++)
{
// Always taking the origin (we are making fan)

pVertices[dwi] = m_pBackObj->bsp.faces[i].vert_start;
dwi++;
pVertices[dwi] = m_pBackObj->bsp.faces[i].vert_start + j;
dwi++;
pVertices[dwi] = m_pBackObj->bsp.faces[i].vert_start + j +1;
dwi++;

}
}


In Q3 bsp there is some meshes too. They are composed of triangles.

Why English rules?? C pas très malin tout ça!

Share this post


Link to post
Share on other sites