   3d Model Formats
  Hi, I am interested in loading quake .bsp files, but first I need understand how the 3d geometry is stored when saving a 3d model to any format in general. I understand that when a model is rendered, it is made up of triangles, but could you please explain how exactly the data is stored in a file? Thanks   
Quote:I need understand how the 3d geometry is stored when saving a 3d model to any format in generalThat's a very general question, and the best I can do is give you a very general answer as there are many file formats for geometry of various sorts.Data generally appears as one or more of the following groups:Vertex data (usually in a set of 3 coordinates X, Y, Z)Normal data (usually in a set of 3 values nx, ny, nz)Face indices ( a set of 3 vertex indices which form a triangle )Texture coordinates ( a set of 2 values tu, tv )Materials ( a set of values perhaps containing color, a texture name, etc. )Each of those data sets is usually preceded by some sort of indication of what group follows. E.g., for vertex data-// a DirectX meshMesh {  234; // number of vertices in mesh  0.715, 0.5, 1.0;,  0.715, 0.3, 1.0;,  ...}// an OBJ filev 0.715 0.5 1.0 // each set of vertex data preceded by 'v'v 0.715 0.3 1.0...;Quote:Original post by BuckeyeQuote:I need understand how the 3d geometry is stored when saving a 3d model to any format in generalThat's a very general question, and the best I can do is give you a very general answer as there are many file formats for geometry of various sorts.Data generally appears as one or more of the following groups:Vertex data (usually in a set of 3 coordinates X, Y, Z)Normal data (usually in a set of 3 values nx, ny, nz)Face indices ( a set of 3 vertex indices which form a triangle )Texture coordinates ( a set of 2 values tu, tv )Materials ( a set of values perhaps containing color, a texture name, etc. )Each of those data sets is usually preceded by some sort of indication of what group follows. E.g., for vertex data-// a DirectX meshMesh {  234; // number of vertices in mesh  0.715, 0.5, 1.0;,  0.715, 0.3, 1.0;,  ...}// an OBJ filev 0.715 0.5 1.0 // each set of vertex data preceded by 'v'v 0.715 0.3 1.0...Thanks a lot, that's just what I needed   