It’s amazing how much fun something like this can be…
I made a simple format for 3D data. It’s very easy to understand, and it hardly takes up any space too. This is the data for four cubes, each with the same material used (only 795 bytes total):
vertices [
0 [-1.0,-1.0,1.0]
1 [-1.0,1.0,1.0]
2 [1.0,1.0,1.0]
3 [1.0,-1.0,1.0]
4 [-1.0,-1.0,-1.0]
5 [-1.0,1.0,-1.0]
6 [1.0,1.0,-1.0]
7 [1.0,-1.0,-1.0]
]
materials [
mat1 [
diffuse
color [1,1,1,1]
]
]
object [
material mat1
worldPosition [0,0,0]
face 0 [0,1,2,3]
face 1 [3,2,6,7]
face 2 [4,0,3,7]
face 3 [2,1,5,6]
face 4 [7,6,5,4]
face 5 [4,5,1,0]
]
object [
material mat1
worldPosition [1,0,0]
face 0 [0,1,2,3]
face 1 [3,2,6,7]
face 2 [4,0,3,7]
face 3 [2,1,5,6]
face 4 [7,6,5,4]
face 5 [4,5,1,0]
]
object [
material mat1
worldPosition [0,1,0]
face 0 [0,1,2,3]
face 1 [3,2,6,7]
face 2 [4,0,3,7]
face 3 [2,1,5,6]
face 4 [7,6,5,4]
face 5 [4,5,1,0]
]
object [
material mat1
worldPosition [0,0,1]
face 0 [0,1,2,3]
face 1 [3,2,6,7]
face 2 [4,0,3,7]
face 3 [2,1,5,6]
face 4 [7,6,5,4]
face 5 [4,5,1,0]
]
Does anyone think this is worth implementing at all?