In this chapter, we will explore the glTF (GL Transmission Format) file format and provide some open files that can be used as test files in Re:Earth.

Keywords of glTF

Nowadays, we have many introductions about the glTF file everywhere, and here I just want to pick up some keywords that our users need to pay attention to.

Open-source

The GL Transmission Format ( glTF for short ) is an open-source format that was released to the public in October 2015 by members of the COLLADA working group. You can check out all the details on the GitHub pageĀ here. It is also because of open source that many platforms support this format quite well. Large companies like Google, Microsoft are trying to embed glTF format into their environments. Other open-source communities like three.js use glTF as the main 3D files. Cesium also supports glTF at the beginning.

Design for web

While formats like OBJ and FBX can be used in WebGL, they are not specifically designed for the web environment and may not offer the best performance and efficiency. That's where glTF comes in.

The glTF format was specifically designed for web-based applications, addressing the limitations of other formats and providing a more optimized and streamlined solution.

You can find many glTF files running onlineĀ here. Just have a try.

File extensions

When working with glTF files, you may come across variations in their appearance and associated files. Some glTF files include texture files, while others may not. It's important to note that glTF is a format that supports different file formats and can accommodate various types of assets.

Let's take the famous duck model as an example. In order to use the duck model, you will need to download and extract the Duck.zip file. This file likely contains the glTF model file itself, along with any associated textures or other resources that are needed to render the model accurately.

By having separate files for textures, glTF allows for flexibility in how textures are applied to the 3D model. Instead of embedding textures directly into the glTF file, they can be referenced as separate files. This allows for more efficient use of resources and the ability to reuse textures across multiple glTF models.

So, when working with glTF files, it's important to ensure that you have all the necessary files, including the glTF model file and any associated textures, to properly render the 3D model as intended.

By using the Duck.zip example, you can explore the glTF format and understand how different files work together to create a complete 3D model.

glTF

The glTF file format serves as a default format that contains scene information such as cameras, lights, materials, and more. When you open the Duck.gltf file with any IDE, you'll see the JSON structure representing these scene details. However, the mesh information, including vertex coordinates and normals, is not present in the glTF file itself. Instead, this information is stored in a separate binary file called Duck0.bin, which cannot be read directly as it is in binary format. The DuckCM.png file, on the other hand, represents the color texture for the model.

When loading the Duck.gltf file in compatible software, the binary (.bin) file and the texture file will be automatically loaded along with it, combining to render the complete 3D model.

It's important to note that Re:Earth currently only supports uploading a single 3D file, and as a result, this specific glTF format with separate binary and texture files is not supported in the platform.

glTF-Embedded