Jump to content
  • Advertisement

Archived

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

SIGMA

Quake's md3 format...

This topic is 6000 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

Hey, can anybody point me to a listing of the md3 format? I couldn''t find it on Wotsit''s! (gasp!) Also, does the md3 include all the fun skeletal info? If it doesn''t, can someone point me out to a handy format that is very detailed? Thanks, -Jesse

Share this post


Link to post
Share on other sites
Advertisement
Okay, after about 3 hours of searching I found it on some small little quake3 forum, here it is:
typedef unsigned int uint_t;
typedef unsigned char byte_t;
typedef float texcoord_t[2];
typedef float bboxf_t[6];
typedef float mat3_t[9]; // 3x3 matrix

/* Each MD3 model is composed of one or more meshes. Currently the md3
* loader is used only for mapents, so animated (multiframe) models
* are not supported.
*/

typedef struct
{
int shader; /* Shader reference */
int numverts;
vec3_t *points;
texcoord_t *tex_st; /* Texture coords */
texcoord_t *env_st; /* Used for environment mapping ? */
int numelems;
uint_t *elems;
} md3mesh_t;

typedef struct
{
bboxf_t bbox;
int nummeshes;
md3mesh_t *meshes;
} md3model_t;

typedef struct
{
char id[4];
int version;
char filename[68];
int numboneframes;
int numtags;
int nummeshes;
int headerlen;
int bone_offs;
int tag_offs;
int mesh_offs;
} md3header_t;

typedef struct
{
char name[64];
vec3_t pos;
mat3_t rot;
} md3tag_t;

typedef struct
{
bboxf_t bbox;
vec3_t pos;
float scale;
char creator[16];
} md3boneframe_t;

typedef struct
{
char id[4];
char name[68];
int numframes;
int numskins;
int numverts;
int numtris;
int elem_offs;
int skin_offs;
int tc_offs;
int vert_offs;
int meshsize;
} md3mesh_file_t;

typedef struct
{
signed short vec[3];
byte_t tc[2];
} md3vert_t;
Thanks for all the help (no sarcasm here )
-Jesse

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It''s a bit late, but try this site: http://www.cfxweb.net/~lonerunn/opengl.php

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!