<p>There is not a single standard that defines the storage of 3D models. The graphics API only cares about triangles, which are defined by vertices and indices indicating which vertices form a triangle.</p>

<p>Many companies have created their own model formats with different features and goals. One of the simplest is the .obj (Wavefront Object) format. Which contains lists of vertex positions, normals and texture coordinates and a list of indices that make up the triangles. It also contains materials, with some basic properties as textures, diffuse and specular colors.</p>

<p>More advanced model formats, such as .fbx (FilmBox) used by Autodesk contain additional information required by the modeling software. These might include bones, hierarchies and even more vertex properties used for skinning etc. So there are "standards", but they are not really unified as every program might require different information. But wavefront is a very good choice, because many modelling applications can export to it and it is easy to write (find) an importer for.</p>

CC BY-SA 3.0
2015-08-11T02:57:02.380Z
2015-08-11T02:57:02.380Z
Maurice
<p>There is no standard format for 3D models. Some common ones are listed in glampert's answer, more can be found <a href="https://stackoverflow.com/questions/13600158/recommended-file-formats-and-graphics-libraries-for-importing-3d-model-into-open">in this SE answer</a>.</p>

<p>If you are designing your own format for your own purposes, (a fairly common thing to do, actually) it's a good first step to look at how you are using your model data. For example, if you are focused on rendering, you can use the format that the graphics library expects. If you want to reduce the load time of your software as much as possible then reducing the amount of parsing and processing you have to do can help. A simple utility that can output a file in the format that your engine expects will mean you can simply map the file into memory and then pass a pointer into your graphics library.</p>

<p>On the other hand, if rendering is not your main concern and editing is more important to you, you might consider a format more amenable to editing, such as <a href="https://en.wikipedia.org/wiki/Winged_edge" rel="nofollow noreferrer">winged edge</a>. Using a general purpose model format may suit your purposes at the beginning of a project, but ultimately there are many things you can do with 3D models and each format has its own benefits and drawbacks, so you can choose the one that works best for you.</p>

CC BY-SA 3.0
2015-08-11T03:00:43.867Z
2015-08-11T03:00:43.867Z
2017-05-23T12:39:19.850Z
Jorge Rodriguez
<p>As other answers have mentioned, there are multiple competing formats for storing 3D data.</p>

<p>However, one specific format has appeared since this question was asked, that has many characteristics you'd expect from a "standard": <strong>the glTF format</strong>.</p>

<hr>

<p>glTF is a 3D standard published by the Khronos Group (the organization behind OpenGL and Vulkan), that aims to make up for the flaws in Collada.</p>

<p>Its main advantages are:</p>

<ul>
<li><p>It's JSON-based, which makes it very easy to parse, serialize, read, and send over network.</p></li>
<li><p>There is very little ambiguity or redundancy in the standard (though there is some*). The units, handedness, texture coordinates signs, etc are all standardized; everything is always index-based, which means there is no data redundancy. This makes it really easy to write an importer.</p></li>
<li><p>The documentation is very clean and exhaustive.</p></li>
<li><p>The layout of the data is based on the OpenGL/WebGL workflows, which means that imported models can be used as in-engine data with little plumbing.</p></li>
<li><p>The standard is Open Source, and the specification is hosted on Github. That means the standard will always be available, usable for free, and the development process is visible to everyone. By opposition, the future of closed-source standards is decided by private interests, which is inherently dangerous.</p></li>
<li><p>glTF is supported by many industry giants through Khronos (Adobe, Google, Microsoft, Mozilla, Unity); it can be exported by Blender (exporting from Maya is still officially unsupported), and imported by Unreal, Unity and Godot.</p></li>
</ul>

<p>See also:</p>

<ul>
<li><p><a href="https://www.khronos.org/gltf/" rel="nofollow noreferrer">The official glTF overview</a></p></li>
<li><p><a href="https://godotengine.org/article/we-should-all-use-gltf-20-export-3d-assets-game-engines" rel="nofollow noreferrer">Why we should use glTF 2.0 by the Godot Engine team</a></p></li>
</ul>

<p>* I'm pretty sure the variable-handedness tangents are pointless.</p>

CC BY-SA 4.0
2021-07-17T20:24:47.913Z
I actually found the mix of JSON and binary harder to parse than plain binary would have been, and wish they had an alternative format which doesn't involve JSON.
Hakanai
CC BY-SA 4.0
2018-07-08T15:17:42.233Z
2018-07-08T15:17:42.233Z
Narrateur du chaos
<p>To add to other answers, there are actually two kinds of formats, intermediate and runtime. Intermediate formats (example: COLLADA) are more verbose/slower and are converted between tools ultimately to the custom runtime format that is optimized for a specific application/hardware. Simple applications that do not care much about performance can directly use intermediate formats.</p>

CC BY-SA 3.0
2015-08-11T07:10:16.647Z
2015-08-11T07:10:16.647Z
SurvivalMachine
<p>When talking about file formats, we are talking about persisting some data related to a 3D model/geometry. There is no universal standard on file formats for persisting 3D geometry. There are only a few formats more dominant than others.</p>

<p>Just as it is with image file formats, the PNGs and JPEGs are the most common formats out there today, but there is no universal agreement between applications on using one or the other. Each app uses the best fit for its purposes.</p>

<p>The same happens with file formats storing 3D data. Each 3D modeling software will generally have one or a set of preferred formats. Most actually define custom formats that only work with the specific version of the tool. This can happen for many reasons, from simplifying the inner workings of the application, or making loading of files faster, to binding the user to a given tool on purpose.</p>

<p>This <code>.dat</code> format you describe is a custom format created by the authors of the book, which was probably designed with simplicity in mind. It seems to be a text file similar to the <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">Wavefront OBJ</a> format, which in turn is a very popular format for storing static geometry, though a bit outdated by now. One could say that the <code>.OBJ</code> format is the <code>.BMP</code> of 3D model formats.</p>

<p>Other popular 3D model formats include:</p>

<ul>
<li><p>The <a href="https://en.wikipedia.org/wiki/COLLADA">Collada</a> format.</p></li>
<li><p>The <a href="https://en.wikipedia.org/wiki/.3ds">3DS</a> format.</p></li>
<li><p>The <a href="https://en.wikipedia.org/wiki/PLY_(file_format)">PLY</a> format.</p></li>
</ul>

<p>And many others. More general explanation <a href="https://en.wikipedia.org/wiki/Polygon_mesh">here</a>.</p>

<p>Also note that I said at the beginning that these are formats for storing/persisting a 3D model or geometry on an offline storage. It doesn't mean (and it usually isn't the case) that the applications that use them will store the data internally in memory using the same layout as the file. Normally, this kind of data will undergo a lot of processing after being loaded from a file until it is, for instance, displayed on the screen.</p>

CC BY-SA 4.0
2018-07-09T19:50:53.160Z
BMP, being a binary format, is not a good counterpart to OBJ. A better match would be [XPM](https://en.wikipedia.org/wiki/X_PixMap), which is textual.
Ruslan
CC BY-SA 4.0
2021-07-17T20:23:17.617Z
MOD (the binary alternative to OBJ) is the BMP of 3D model formats.
Hakanai
CC BY-SA 3.0
2016-08-28T20:59:45.067Z
@ratchetfreak but not all uses of 3D formats end up on the screen.
joojaa
CC BY-SA 3.0
2015-08-11T09:04:51.697Z
"Normally, this kind of data will undergo a lot of processing after being loaded from a file until it is, for instance, displayed on the screen." like an image gets transformed to a pixel array before getting pushed on screen *regardless* of what the original format was. (hardware compression notwithstanding)
ratchet freak
CC BY-SA 3.0
2015-08-11T02:49:30.960Z
2015-08-11T03:01:33.010Z
2015-08-11T03:01:33.010Z
glampert
<p>I'm reading a <a href="https://books.google.com.br/books/about/Computer_graphics_for_Java_programmers.html?id=vY5RAAAAMAAJ&amp;redir_esc=y">book on computer graphics</a>, and at some point, it shows a 3D model, created from a .dat file.</p>

<p>Here are a few rules for the .dat file creation:</p>

<ul>
<li>Made of a list of vertex positions / faces</li>
<li>Written counter-clockwise</li>
<li>Faces end with a dot (.)</li>
<li>Fractions are also acceptable</li>
</ul>

<p>I want to know if this is the standard, and if not, what is the standard way of defining a 3D object.</p>

<p>Also, if there is a specification, who defined it and where to find it?</p>

<3d>
Is there a standard specification for 3D graphic representation?
Daniel
# Is there a standard specification for 3D graphic representation?

(Asked by: username_0 on 2015-08-11)

I'm reading a [book on computer graphics](https://books.google.com.br/books/about/Computer_graphics_for_Java_programmers.html?id=vY5RAAAAMAAJ&redir_esc=y), and at some point, it shows a 3D model, created from a .dat file.

Here are a few rules for the .dat file creation:

* Made of a list of vertex positions / faces
* Written counter-clockwise
* Faces end with a dot (.)
* Fractions are also acceptable

I want to know if this is the standard, and if not, what is the standard way of defining a 3D object.

Also, if there is a specification, who defined it and where to find it?

**Tags:** 3d


---

## 5 answers

### Answer by username_6 on 2015-08-11. Score: 8 | Accepted answer

When talking about file formats, we are talking about persisting some data related to a 3D model/geometry. There is no universal standard on file formats for persisting 3D geometry. There are only a few formats more dominant than others.

Just as it is with image file formats, the PNGs and JPEGs are the most common formats out there today, but there is no universal agreement between applications on using one or the other. Each app uses the best fit for its purposes.

The same happens with file formats storing 3D data. Each 3D modeling software will generally have one or a set of preferred formats. Most actually define custom formats that only work with the specific version of the tool. This can happen for many reasons, from simplifying the inner workings of the application, or making loading of files faster, to binding the user to a given tool on purpose.

This `.dat` format you describe is a custom format created by the authors of the book, which was probably designed with simplicity in mind. It seems to be a text file similar to the [Wavefront OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file) format, which in turn is a very popular format for storing static geometry, though a bit outdated by now. One could say that the `.OBJ` format is the `.BMP` of 3D model formats.

Other popular 3D model formats include:

* The [Collada](https://en.wikipedia.org/wiki/COLLADA) format.
* The [3DS](https://en.wikipedia.org/wiki/.3ds) format.
* The [PLY](https://en.wikipedia.org/wiki/PLY_(file_format)) format.

And many others. More general explanation [here](https://en.wikipedia.org/wiki/Polygon_mesh).

Also note that I said at the beginning that these are formats for storing/persisting a 3D model or geometry on an offline storage. It doesn't mean (and it usually isn't the case) that the applications that use them will store the data internally in memory using the same layout as the file. Normally, this kind of data will undergo a lot of processing after being loaded from a file until it is, for instance, displayed on the screen.

> **Comments:**
> **username_9**: "Normally, this kind of data will undergo a lot of processing after being loaded from a file until it is, for instance, displayed on the screen." like an image gets transformed to a pixel array before getting pushed on screen *regardless* of what the original format was. (hardware compression notwithstanding)  
> **username_8**: @username_9 but not all uses of 3D formats end up on the screen.  
> **username_7**: BMP, being a binary format, is not a good counterpart to OBJ. A better match would be [XPM](https://en.wikipedia.org/wiki/X_PixMap), which is textual.  
> **username_4**: MOD (the binary alternative to OBJ) is the BMP of 3D model formats.  

---

### Answer by username_1 on 2015-08-11. Score: 5

There is not a single standard that defines the storage of 3D models. The graphics API only cares about triangles, which are defined by vertices and indices indicating which vertices form a triangle.

Many companies have created their own model formats with different features and goals. One of the simplest is the .obj (Wavefront Object) format. Which contains lists of vertex positions, normals and texture coordinates and a list of indices that make up the triangles. It also contains materials, with some basic properties as textures, diffuse and specular colors.

More advanced model formats, such as .fbx (FilmBox) used by Autodesk contain additional information required by the modeling software. These might include bones, hierarchies and even more vertex properties used for skinning etc. So there are "standards", but they are not really unified as every program might require different information. But wavefront is a very good choice, because many modelling applications can export to it and it is easy to write (find) an importer for.


---

### Answer by username_2 on 2015-08-11. Score: 5

There is no standard format for 3D models. Some common ones are listed in username_6's answer, more can be found [in this SE answer](https://stackoverflow.com/questions/13600158/recommended-file-formats-and-graphics-libraries-for-importing-3d-model-into-open).

If you are designing your own format for your own purposes, (a fairly common thing to do, actually) it's a good first step to look at how you are using your model data. For example, if you are focused on rendering, you can use the format that the graphics library expects. If you want to reduce the load time of your software as much as possible then reducing the amount of parsing and processing you have to do can help. A simple utility that can output a file in the format that your engine expects will mean you can simply map the file into memory and then pass a pointer into your graphics library.

On the other hand, if rendering is not your main concern and editing is more important to you, you might consider a format more amenable to editing, such as [winged edge](https://en.wikipedia.org/wiki/Winged_edge). Using a general purpose model format may suit your purposes at the beginning of a project, but ultimately there are many things you can do with 3D models and each format has its own benefits and drawbacks, so you can choose the one that works best for you.


---

### Answer by username_3 on 2018-07-08. Score: 4

As other answers have mentioned, there are multiple competing formats for storing 3D data.

However, one specific format has appeared since this question was asked, that has many characteristics you'd expect from a "standard": **the glTF format**.

---

glTF is a 3D standard published by the Khronos Group (the organization behind OpenGL and Vulkan), that aims to make up for the flaws in Collada.

Its main advantages are:

* It's JSON-based, which makes it very easy to parse, serialize, read, and send over network.
* There is very little ambiguity or redundancy in the standard (though there is some\*). The units, handedness, texture coordinates signs, etc are all standardized; everything is always index-based, which means there is no data redundancy. This makes it really easy to write an importer.
* The documentation is very clean and exhaustive.
* The layout of the data is based on the OpenGL/WebGL workflows, which means that imported models can be used as in-engine data with little plumbing.
* The standard is Open Source, and the specification is hosted on Github. That means the standard will always be available, usable for free, and the development process is visible to everyone. By opposition, the future of closed-source standards is decided by private interests, which is inherently dangerous.
* glTF is supported by many industry giants through Khronos (Adobe, Google, Microsoft, Mozilla, Unity); it can be exported by Blender (exporting from Maya is still officially unsupported), and imported by Unreal, Unity and Godot.

See also:

* [The official glTF overview](https://www.khronos.org/gltf/)
* [Why we should use glTF 2.0 by the Godot Engine team](https://godotengine.org/article/we-should-all-use-gltf-20-export-3d-assets-game-engines)

\* I'm pretty sure the variable-handedness tangents are pointless.

> **Comments:**
> **username_4**: I actually found the mix of JSON and binary harder to parse than plain binary would have been, and wish they had an alternative format which doesn't involve JSON.  

---

### Answer by username_5 on 2015-08-11. Score: 2

To add to other answers, there are actually two kinds of formats, intermediate and runtime. Intermediate formats (example: COLLADA) are more verbose/slower and are converted between tools ultimately to the custom runtime format that is optimized for a specific application/hardware. Simple applications that do not care much about performance can directly use intermediate formats.


---

