Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Översatt version av -------.txt
- . Pak
- Resources in Baotou
- struct _Header
- {
- the flag of a char [256];
- DWORD dwUnknown;
- The DWORD dwIndexCount; / / the total number of file index
- The offset location of the the DWORD dwIndexOffset; / / file index data in the pak
- ;}
- / / For each file, the data block of the index data is zip
- struct EyedentityIndex
- {
- a char fileName [256]; / / file name
- DWORD dwSizeCompressed; / / the compressed size
- DWORD dwSizeUncompressed; / / the uncompressed size
- DWORD the dwSize; / / pak package size
- The location of the DWORD the dwOffset; / / offset in pak
- DWORD dwUnkonwn;
- The DWORD dwReserved [10];
- ;}
- . Ext
- Two-dimensional table in front of the header list, followed by each row of data, format, size + data
- Each header occupy 64byte
- The first one uint32 unknown
- The second one uint32 the number of header
- The third uint32 is the number of rows
- For example defaultcreatetable.ext
- Second uint32 3C010000 that is, 316 is the number of header information when creating personas
- Third uint32 for the 04 million that is, 4 is the number of rows, only four occupational
- File at the end to the THEND
- Beginning of each line the first one uint32 the number of rows
- Header
- struct _ExtHeader
- {
- uint32, the id;
- / / header uint32, maxHeader;
- uint32 nLines; / / number of rows
- / / Table header
- struct _Header
- {
- char name [64];
- uint32, type; / / data types is 32 digits, a string, etc.
- ;}
- ;}
- . Msh
- The model mesh, the following format
- struct _DNHeader
- {
- char name [256];
- uint32, version; / / version
- uint32, nMesh; / / total number of the mesh
- uint32 unknown3;
- uint32 unknown4;
- vec3f max;
- vec3f min;
- uint32 nBone; / / total number of the back bone
- ;}
- Beginning of the file offset of 1024 bytes is the bone data
- struct _DNBone
- {
- char name [256];
- vec4f a, b, c, d;
- ;}
- Followed by the mesh information, followed by the triangle index, vertices, normals, texture
- struct _DNSceneRoot
- {
- a char of name1 [256];
- a char name2 [256];
- uint32 nVertex; / / vertices of the total number of
- uint32 count16; / / 2 bytes of the total number of triangular index
- uint32 unknown1;
- uint32, renderMode; / / renderMode & 0x01? square using GL_TRIANGLE_STRIP just: GL_TRIANGLES as the
- char unknown [512 - 16];
- ;}
- Followed by 8 * vertex the total number of bytes of data, uint16 four integer a vertex, the vertices of the four bones index
- Followed by the total number of bytes of data 16 * vertex, a vertex is four floating-point numbers, added together is just one, may be the vertex of the four bone weights
- A msh file may have more than one mesh, above the main mesh information
- Behind the main mesh is a uint32 number and said the total number of back bone, where the bone is only 256 bytes of the name, but not abcd these four floating-point
- Followed SceneRoot, with the main mesh structure
- Then followed a uint32 number, said the total number of back bone, and so on
- .. Skn
- Material file
- struct _DNSkinHeader
- {
- char name [256]; / / flag
- char meshName [256]; / / corresponding mesh name
- uint32, version;
- uint32 nSkin; / / containing skin the total number of
- ;}
- The header information of each material
- struct _Header
- {
- char name [256];
- char DiffuseFX [256];
- float32 unknown1;
- uint32 unknown2;
- ;}
- Behind the data is a string form of identification
- Is an object serialization to store the number of elements, then the type and size of the data, then the specific data
- For example, vec4f type is 2, the std :: string is 3. Float32 is a string storage format is: Size + bytes data + 0
- vec4f g_MaterialAmbient;
- vec4f g_MaterialDiffuse;
- std :: string g_DiffuseTex;
- std :: string g_MaskTex;
- vec4f g_EmissiveColor;
- float32 g_EmissivePower;
- float32 g_EmissivePowerRange;
- float32 g_EmissiveAniSpeed;
- vec4f g_SkinColor;
- std :: string g_TatooTex;
- vec4f g_EyeColor;
- vec4f g_CustomColor;
- Added: (17:01 2010/8/10)
- A msh file can contain more than one mesh,
- Each mesh data format, the two string name, index, the vertex normal, texcoord
- Bone, then the followed boneIndex and boneWeight, each vertex of each of four
- Followed by the sub bone boneIndex, in front of this index the sub bone re-index files at the beginning of bone
- The bones of the beginning of the file only keep the name string is used to index. Ani file in the bone,
- In order to find the impact of vertices of a bone in a frame animation of the transformation matrix
- . Ani format
- Header
- struct _AniHeader
- {
- char name [256];
- uint32, version;
- uint32, nBone; / / bone the total number of
- uint32 nAni; / / animation the total number of
- ;}
- Followed by the number of frames in each animation, is the total number of frames for each animation
- Followed by the data of a bone a bone points, the number of bones in the file header nBone
- Contains all the animation data in a bone, and then the next bone, or containing the skeletal animation data
- Data structure for each bone:
- Bone name string, the name of the parent bone string
- Then the transformation data for each animation, the animation number in the file header nAni
- The data structure for each animation:
- First, a translation vec3f a rotating vec4f, a zoom vec3f, this is the the animations initial frame transformation
- Followed by a uint32, said to transform the number of translation, no translation transformation is 0
- Followed by a uint32,, that the rotation transformation number, there is no rotation transformation is 0
- Followed by a uint32, the scaling transformation number, there is no scaling transformation is 0
- Translation transform structure: a uint16 number of frames, a vec3f
- Rotation transform structure: a uint16 number of frames, a vec4f
- Scaling transformation structure: a uint16 number of frames, a vec3f
- The above is a version for 11 ani file format, version 10 is not uint16 but uint32
- version 11, the rotation transform not vec4f the, but four short, you need to turn into a floating point number and then the unit of about
- In front of a mesh, b, c, d constitute a transformation matrix used to transform the vertices to the bone space affected by the skeleton vertices in each frame to do to transform the former must be multiplied by the matrix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement