-
Notifications
You must be signed in to change notification settings - Fork 19
Model Data Format
Dzmitry Malyshau edited this page Apr 21, 2019
·
4 revisions
This document describes the mesh and vehicle model data formats used in the original Vangers game.
This is a basic 3D mesh format.
| Type | Description |
|---|---|
u32 |
version, has to be 8 |
u32 |
number of vertices (num_vertices) |
u32 |
number of normals (num_normals) |
u32 |
number of polygons (num_polygons) |
u32 |
total number of vertices (?) |
[u32; 3] |
maximum bound of coordinates |
[u32; 3] |
minimum bound of coordinates |
[u32; 3] |
offset (?) |
u32 |
maximum radius |
[u32; 3] |
angles (angles?) |
[u32 ;3]? |
some extras (?) |
[Vertex; num_vertices] |
vertex array |
[Normal; num_normals] |
normal array |
[Polygon; num_polygons] |
polygon array |
Vertex format:
| Type | Description |
|---|---|
[Q; 3] |
unknown data, where Q = (angles == [83,83,83] ? f32 : u32 )
|
[u8; 3] |
normalized X,Y,Z coordinates within the bounding box |
u32 |
sort info (?) |
Normal format:
| Type | Description |
|---|---|
[u8; 3] |
normalized normal vector |
u8 |
normal power (?) |
u32 |
sort info (?) |
Polygon format:
| Type | Description |
|---|---|
u32 |
number of corners (num_corners), has to be 3 |
u32 |
sort info (?) |
(u32, u32) |
color index and shift |
| Normal | flat normal, not used |
[u8; 3] |
middle point |
[(u32, u32), num_corners] |
vertex and normal indices per corner |
Animated 3D model.
| Type | Description |
|---|---|
u32 |
model count (num_models) |
[u32; 3] |
body bounds (X,Y,Z) (what units?) |
u32 |
body maximum radius (units?) |
(u32, u32) |
body color offset and shift |
[C3D; num_models] |
models |
The vehicles ("mechoes") format, containing multiple meshes (for the body and wheels) as well as some meta-data.
| Type | Description |
|---|---|
| C3D | body model |
[u32; 3] |
body bounds (X,Y,Z) (what units?) |
u32 |
body maximum radius (units?) |
u32 |
number of wheels (num_wheels) |
u32 |
number of debris (num_debris) |
(u32, u32) |
body color offset and shift |
[Wheel, num_wheels] |
wheels |
[Debris, num_debris] |
debris |
| C3D | physical bound |
bool? |
has attached slots (has_slots) |
Option<[Slot; MAX_SLOTS]> |
slots data, where MAX_SLOTS = 3; provided if has_slots == true
|
Wheel format:
| Type | Description |
|---|---|
u32 |
steering? |
[f64; 3] |
? |
u32 |
width? |
u32 |
radius? |
u32 |
bound index? |
Option<C3D> |
wheel model, only provided if steering != 0 |
Debris format:
| Type | Description |
|---|---|
| C3D | debris model |
| C3D | debris physical bound |
Slot format:
| Type | Description |
|---|---|
[u32; 3] |
R? |
| C3D | slot physical bound |
u32 |
location angle |