A File Format Question
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
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 ).
Bye
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 ).
Bye
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement