Wartbed:Files/Formats
From Dark Omen Wiki
(→Geometry) |
|||
Line 5: | Line 5: | ||
<div style="border:1px solid gray; background:rgb(215,225,215);"> | <div style="border:1px solid gray; background:rgb(215,225,215);"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''modelname''.'''model'''</div> | + | <div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''modelname''.'''model'''</div> |
- | <div style="padding:1em; "> | + | <div style="padding:1em; "><tt> |
- | <tt> | + | |
{| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" | | {| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" | | ||
|style="padding-right:8em;"|'''meshes.desc''' ||text || (1) | |style="padding-right:8em;"|'''meshes.desc''' ||text || (1) | ||
Line 27: | Line 26: | ||
===Model description=== | ===Model description=== | ||
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | <div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">1: '''meshes.desc'''</div> | + | <div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">1: '''meshes.desc'''</div> |
<div style="padding:1em; color:rgb(0,32,0);"><tt>''Mesh_name''<br> | <div style="padding:1em; color:rgb(0,32,0);"><tt>''Mesh_name''<br> | ||
{<br> | {<br> | ||
Line 51: | Line 50: | ||
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | <div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">2: ''filename''.'''vertices'''</div> | + | <div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">2: ''filename''.'''vertices'''</div> |
<div style="padding:1em; color:rgb(0,32,0);"><tt>definition<br> | <div style="padding:1em; color:rgb(0,32,0);"><tt>definition<br> | ||
{<br> | {<br> | ||
Line 76: | Line 75: | ||
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | <div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">3: ''filename''.'''indices'''</div> | + | <div style="float:right;text-align:right;float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">3: ''filename''.'''indices'''</div> |
<div style="padding:1em; color:rgb(0,32,0);"> | <div style="padding:1em; color:rgb(0,32,0);"> | ||
<tt>textures<br> | <tt>textures<br> | ||
Line 105: | Line 104: | ||
<div style="border:1px solid gray; background:rgb(215,225,215);"> | <div style="border:1px solid gray; background:rgb(215,225,215);"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''spritename''.'''sprite'''</div> | + | <div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''spritename''.'''sprite'''</div> |
<div style="padding:1em; color:rgb(0,32,0);"><tt>'''frames.desc''' (1)<br> | <div style="padding:1em; color:rgb(0,32,0);"><tt>'''frames.desc''' (1)<br> | ||
spritesheet.bmp|jpg|png<br></tt></div> | spritesheet.bmp|jpg|png<br></tt></div> | ||
Line 112: | Line 111: | ||
==Map== | ==Map== | ||
<div style="border:1px solid gray; background:rgb(215,225,215);%"> | <div style="border:1px solid gray; background:rgb(215,225,215);%"> | ||
- | <div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''mapname''.'''map'''</div> | + | <div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''mapname''.'''map'''</div> |
<div style="padding:1em; color:rgb(0,32,0);"><tt>'''map.desc''' (1)<br> | <div style="padding:1em; color:rgb(0,32,0);"><tt>'''map.desc''' (1)<br> | ||
placeholder line<br> | placeholder line<br> |
Revision as of 22:55, 6 September 2008
Description of WARTBED file formats
Contents |
Geometry
.ZIP archive with .model extension. Archive containing the following file types and extensions (can conatin any number of all file types except meshes.desc).
meshes.desc | text | (1) |
filename.vertices | text | (2) |
filename.indices | text | (3) |
filename.bmp/jpg/png | bitmap | |
filename.skeleton | ??? | |
filename.animation | ??? |
Model description
{
vertices : filename.vertices;
indices : filename.vertices;
offset : [x,y,z];
}
Mesh_2_name
{
...
Vertices
Space, tab, '[', ']' and ',' are all valid separators and can be exchanged for reabability. Separators should be able to follow each other (cross your fingers).
The first block is identified by the keyword "definition" (of rather, any character sequence starting with "def") and details the components are their order in a vertex. Valid tokens are "xy" for a two-float dataype, "xyz" for a three-float , "xyzw" for a four-float; and "argb", "bgra" and "rgba" for four-byte colours.
Valid field names are "position", "normal", "diffuse", "specular", "emissive" and "texture coordinate". There can be multiple fields of the same type in a vertex, however, it is not yet defined how WARTBED handles this.
The second block is identified as "vertices" (or "vtx"). Every vertex is numbered (though item identifiers are actually ignored when parsing). Multiple vertex blocks are appended into one consecutive vertex buffer (regardless of vertex numbering).
{
xyz : position;
xyz : normal;
argb : diffuse;
argb : specular;
argb : emissive;
xy : texture coordinates;
}
vertices
{
0 : [1,2,3] [0,1,0] 0xFFFFFFFF, 0xF0F0F0F0, 0x10101010 [0,0];
1 : [4,5,6] [1,0,0] 0xFFFFFFFF, 0xF0F0F0F0, 0x10101010 [1,1];
Indices
As for vertices. space, tab, '[', ']' and ',' are all valid separators and can be exchanged for readability, and separators should be able to follow each other.
Each faces block is created in a new index buffer, depending on parsing parameters.
textures
{
0 : texture1.png;
1 : texture2.jpg;
}
definition
{
123 : indices;
xyz : normal;
id : texture;
}
faces
{
0 : 1,2,3 [0,1,0] 0;
1 : 2,3,5 [0,0,1] 1;
}
faces //requesting creation in new index buffer
{
...
Sprites
spritesheet.bmp|jpg|png
Map
placeholder line
Army
placeholder line
Mission
placeholder line