[header] | Required |
|---|---|
[Object](1) | Required |
[Vertex] | Required |
[Normal] | Required |
[polygon] | Required |
[Model name] | expansion |
...... | |
[Object](2) | |
[Vertex] | |
[Normal] | |
[polygon] | |
...... | |
[object]... | |
............. |
typedef char CHAR;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef float FLOAT;
struct tag_IFF{
CHAR chunk[4]; //4 character chunk name
DWORD size; //data size
};
[tag] [data] [tag] [data] ...... ......
Contents: File identification information Chunk: "SG3D" Size: 256 Data: Type Contents DWORD version (0x00011000) DWORD number of objects DWORD[62] Reservation
Contents: Hierarchy information
Chunk: "OBJT"
Size: 96
Data: Type Contents
FLOAT[4][3] 3x4 transformation matrix
FLOAT[3] Translation (XYZ)
FLOAT[3] Rotation (XYZ)
FLOAT[3] Scaling (XYZ)
DWORD ID(0~n)
DWORD Child ID
DWORD Sibling ID
Note: The unit of angle is (degrees)
ID is -1 (0xffffffff) if there are no children or siblings
Contents: Vertex coordinates Chunk: "VerF" Size: 12x number of vertices Data: Type Contents FLOAT[3] Vertex coordinates (XYZ) Note: Set the above data for the number of vertices.
Contents: Vertex normal vector Chunk: "NorF" Size: 12x number of vertices Data: Type Contents FLOAT[3] Vertex normal vector (XYZ) Note: Unit vector that sets the above data for the number of vertices
Contents: Polygon vertex number Chunk: "POLY" Size: 8x number of polygons Data: Type Contents WORD[4] Vertex numbers that make up the 4-point polygon Note: Set the above data for the number of polygons. Vertex number is clockwise
Contents: Object (layer) name
Chunk: "MoNm"
Size: string length
Data: Type Contents
CHAR[?] Object name string
Note: The string must include the exit code ('\0')
Contents: Gouro table for Sega Saturn
Chunk: "SSGr"
Size: 8x number of polygons
Data: Type Contents
WORD[4] Gouraud data with polygon applied
Note: Set the above data for the number of polygons.
Default is {0xc210,0xc210,0xc210,0xc210}
Details separately
Contents: Surface attributes for Sega Saturn
Chunk: "SSAt"
Size: 12x number of polygons
Data: Type Contents
WORD Front and back flip flag
0 Single_Plane
1 Dual_Plane
WORD Z sort flag
0 SORT_CEN (center point)
1 SORT_MIN (nearest point)
2 SORT_MAX (refar point)
3 SORT_FAR (unused)
4 SORT_NER (unused)
WORD Texture number WORD Color (R:G:B=5:5:5)
DWORD Surface attribute type BIT
0 texHflip
1 texVflip
2
3 sprTexture
4 sprPolygon
5 sprPolyLine
6
7 User Shade
8 MESHon
9 CL_Shadow
10 CL_Half
11 CL_Trans
12 CL_Gouraud
13 ECdis
14 SPdis
15 CL16Bnk
16 CL16Look
17 CL64Bnk
18 CL128Bnk
19 CL256Bnk
20 CL32KRGB
21 Window_In
22 Window_Out
23
24 UseLight
25 UseClip
26 UsePalette
27 UseNearClip
28 UseDepth
29
30
31
Note: The default setting of the above data for the number of polygons is {0,0,0,0xc210,0x01100010}
Details separately
★ Graphic Tools Guide ★ Format list