aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-02-28 23:45:47 +0100
committerdec05eba <dec05eba@protonmail.com>2020-02-28 23:45:47 +0100
commit8b8a84334f234b21945e8433ba3bd7d117ca69d9 (patch)
treec1178f5b06b084f62a8733adc4d17d364a459f7a /README.md
Initial commit, it works
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a53393e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+# Amalgine 3D model file format (.a3d)
+All types are stored in little endian format. Any type with a * is optional.
+|Type |Description |
+|-------|-------------------------------------------------------------------------------------|
+|uint |The magic number, the value will always be 0x036144AF. |
+|uint |Version of the file format. This is backwards compatible but not forwards compatible.|
+|mesh[] |The mesh data. |
+
+mesh:
+|Type |Description |
+|-----------|-------------------------------------------------------------------------------------|
+|uint |The number of vertices, normals and optionally texture coordinates. |
+|vec3f[] |A list of vertices. |
+|vec3f[] |A list of normals. |
+|uint |The number of faces. Each face has 3 indices of type uint. |
+|uint[] |The face indices. |
+|uint |1 if the model has texture coordinates, otherwise 0. |
+|vec3f[]* |A list of texture coordinates. |
+|uint |1 if the model has materials, otherwise 0. |
+|material[3]|The material data. This is a list of [diffuse, specular, ambient] materials. |
+
+vec3f:
+|Type |Description |
+|-----|----------------|
+|float|The x coordiate.|
+|float|The y coordiate.|
+|float|The z coordiate.|
+
+material:
+|Type |Description |
+|------|-------------------------------------------------------------------------|
+|uint |The number of textures. |
+|char[]|The filepath to the texture (relative). This is a null-terminated string.|