Jump to content
  • Advertisement


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


A File Format Question

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

can any one answer me the MD2 file format's questions //////////////////////////////////// question 1: what is the vertexlist's allign is it: vertex[0]---> X vertex[1]---> Y vertex[2]---> Z or what?????!! typedef struct { byte vertex[3]; byte lightNormalIndex; }triangleVertex_t; ////////////////////////////////// question 2: is the vertexIndices ClockWise or CounterClockWise? typedef struct { short vertexIndices[3]; short textureIndices[3]; }triangle_t; question 3: i saw in an example that it calculates vertex position different it multiplys it -1.0f why why?? and it puts it in vertex[2] not vertex[1] why why???HELP the vertex that is going to render is VERTREN the vertex that loaded from file is VERTFILE VERTREN[j].vertex[0]=VERTFILE[j].vertex[0]*scl[0]+trnslt[0] VERTREN[j].vertex[2]=-1.0f*VERTFILE[j].vertex[1]*scl[1]+trnslt[1] VERTREN[j].vertex[1]=VERTFILE[j].vertex[2]*scl[2]+trnslt[2] RENDERING order is VERTREN[j].vertex[0] VERTREN[j].vertex[1] VERTREN[j].vertex[2] HEEELP please!! i am trying to render it in DX8 and it renders a bit wrong!! Edited by - dabutabey on December 17, 2001 6:29:03 AM

Share this post

Link to post
Share on other sites
1) Yes.

You can directly use the light-normal-index for the predefined array and transform the vertices using the given scaling and translation values.

2) Sorry, don''t reminder that, but you should be able to find out by testing.

3) Because one has to convert the values to the coordinate-system used in your application. I have seen this way of conversion in GL apps before, for a D3D8 reference have a look at the samples provided by NVidia ( http://developer.nvidia.com ).


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!