Archived

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

onnel

Vertex Normals in MD3

Recommended Posts

I found some code that parses md3s and originally displayed them in opengl. I converted it to use dx8 and index/vertex buffers. My only question was with regards to vertex normals. The struct used to hold vertices loaded from the md is: typedef struct { signed short Vec[3]; unsigned char Normal[2]; } vertice_t; That means just two chars for normals. Can anyone explain how I am supposed to get a Normals vector from 2 chars? Any help appreciated! Onnel

Share this post


Link to post
Share on other sites
This can mean two things:

1) these are indices into an array containing vertex/normal data
2) the model format contains some sort of byte packing just like the MD2 format.

You''ll just have to dig around some more in the OpenGL code to find the answer.

Share this post


Link to post
Share on other sites
Got it, there''s a lookup table built...And the values are for lookups into the table.

Thanks

Onnel

Share this post


Link to post
Share on other sites