Jump to content
  • Advertisement

Archived

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

tobiaso

Q3 Map faces

This topic is 5967 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''m a little confused over the face structure of the q3 map format. I just want the triangles to render but I can not seem to get it rigt. I do it like this.... number_of_tris = 0 for (all faces) { if (current_face.type == 1) { // type one describes triangle fans... number_of_tris += current_face.n_vertexes - 2 number_of_tris += current_face.n_meshverts - 2 } if (current_face.type == 3) { // type 3 describes unconnected triangles... number_of_tris += current_face.n_vertexes / 3 } } ... To get the indices of the mesh vertices i do something like this: ... current_face.vertex + meshverts[current_face.meshvert + i].offset ... But this does not seem to be right... anyone got any ideas? Regards! /hObbE

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
actually type 1 AND 3 are discrete triangles, not triangle fans.

type 1 are planar faces (walls for instance, the normal field of the face structure can be used for further culling)
type 3 are triangle soups (mostly former mapobjects)

to be complete:
type 2 are patches (with the vertices being the control points, dimension of the patch is stored in face.patchdim[])
type 4 are meant to be flares (use the lmorigin field of the face structure as midpoint for the billboard)

skynet

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!