# Custom 3D Model Format

**URL:** https://discussions.unity.com/t/custom-3d-model-format/403841
**Category:** Community Showcases
**Created:** [December 16, 2009, 2:29pm UTC](https://discussions.unity.com/t/custom-3d-model-format/403841 "2009-12-16T14:29:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jake\_Haas](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jake_haas/32/476363_2.png) [@Jake\_Haas](https://discussions.unity.com/u/Jake_Haas)
#### Post date: [December 16, 2009, 2:29pm UTC](https://discussions.unity.com/t/custom-3d-model-format/403841/1 "2009-12-16T14:29:27Z")

</div>

Hey guys…

So I’ve been experimenting with designing my own file format for holding 3D data. I call it SDS.

Here is an example of a cube:

```auto
// SDS format by Jake Haas
// Exported with Unity 2.6.1f3

StartObject [Cube] {

Translation [2.070201,-47.29834,73.69731]
Rotation [0,0,0]
Scale [1,1,1]

numVertices [24]
numTriangles [12]
numNormals [24]
numUVs [24]

Vertices {
0 [0.5,-0.5,0.5]
1 [-0.5,-0.5,0.5]
2 [0.5,0.5,0.5]
3 [-0.5,0.5,0.5]
4 [0.5,0.5,-0.5]
5 [-0.5,0.5,-0.5]
6 [0.5,-0.5,-0.5]
7 [-0.5,-0.5,-0.5]
8 [0.5,0.5,0.5]
9 [-0.5,0.5,0.5]
10 [0.5,0.5,-0.5]
11 [-0.5,0.5,-0.5]
12 [0.5,-0.5,-0.5]
13 [-0.5,-0.5,0.5]
14 [-0.5,-0.5,-0.5]
15 [0.5,-0.5,0.5]
16 [-0.5,-0.5,0.5]
17 [-0.5,0.5,-0.5]
18 [-0.5,-0.5,-0.5]
19 [-0.5,0.5,0.5]
20 [0.5,-0.5,-0.5]
21 [0.5,0.5,0.5]
22 [0.5,-0.5,0.5]
23 [0.5,0.5,-0.5]
}

Triangles {
0 [1,0,3]
1 [3,0,2]
2 [9,8,5]
3 [5,8,4]
4 [11,10,7]
5 [7,10,6]
6 [14,12,13]
7 [13,12,15]
8 [18,16,17]
9 [17,16,19]
10 [22,20,21]
11 [21,20,23]
}

Normals {
0 [0,0,1]
1 [0,0,1]
2 [0,0,1]
3 [0,0,1]
4 [0,1,0]
5 [0,1,0]
6 [0,0,-1]
7 [0,0,-1]
8 [0,1,0]
9 [0,1,0]
10 [0,0,-1]
11 [0,0,-1]
12 [0,-1,0]
13 [0,-1,0]
14 [0,-1,0]
15 [0,-1,0]
16 [-1,0,0]
17 [-1,0,0]
18 [-1,0,0]
19 [-1,0,0]
20 [1,0,0]
21 [1,0,0]
22 [1,0,0]
23 [1,0,0]
}

UVs {
0 [0,0]
1 [1,0]
2 [0,1]
3 [1,1]
4 [0,1]
5 [1,1]
6 [0,1]
7 [1,1]
8 [0,0]
9 [1,0]
10 [0,0]
11 [1,0]
12 [0,0]
13 [1,1]
14 [1,0]
15 [0,1]
16 [0,0]
17 [1,1]
18 [1,0]
19 [0,1]
20 [0,0]
21 [1,1]
22 [1,0]
23 [0,1]
}

} [EndObject]

```

So far I have an importer and exporter working for both Maya and Unity. They support Verts, UVs, Tris, Normals and scale, translation etc.

If anyone has any hints for for storing bones and animation info, please chime in.

-Jake

---

<div class="post-metadata">

### Author: ![anon\_704682](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@anon\_704682](https://discussions.unity.com/u/anon_704682)
#### Post date: [December 16, 2009, 5:24pm UTC](https://discussions.unity.com/t/custom-3d-model-format/403841/2 "2009-12-16T17:24:57Z")

</div>

1. for what? 🙂
2. did you look at .smd or .md5 formats? they can help you with bones and can give you basic ideas of animation 🙂

---

<div class="post-metadata">

### Author: ![Jake\_Haas](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jake_haas/32/476363_2.png) [@Jake\_Haas](https://discussions.unity.com/u/Jake_Haas)
#### Post date: [December 16, 2009, 6:20pm UTC](https://discussions.unity.com/t/custom-3d-model-format/403841/3 "2009-12-16T18:20:45Z")

</div>

> [@""](#):
>
> 1. for what? 🙂

Well, It started as a way to store mesh data that would be manipulated in game, but I never ended up using it, so I am just continuing as a learning experience.

> [@""](#):
>
> 1. did you look at .smd or .md5 formats? they can help you with bones and can give you basic ideas of animation 🙂

I’ll take a look. Thanks 😄
