Hello! Please choose your
desired language:
Dismiss

3D model essentials

3D models are imported into decentraland in glTF format. There are a number of supported features that these models can include. This section goes over ways to make them compatible with Decentraland and best practices.

See Set entity position for information on how you can configure a 3D model in a Decentraland scene to set its position, scale, etc.

Keep in mind that all models, their shaders and their textures must be within the parameters of the scene limitations.

Supported 3D model formats

All 3D models in Decentraland must be in glTF format. glTF (GL Transmission Format) is an open project by Khronos providing a common, extensible format for 3D assets that is both efficient and highly interoperable with modern web technologies.

glTF models can have either a .gltf or a .glb extension. glTF files are human-readable, you can open one in a text editor and read it like a JSON file. This is useful, for example, to verify that animations are properly attached and to check for their names. glb files are binary, so they’re not readable but they are considerably smaller in size, which is good for the scene’s performance.

We recommend using .gltf while you’re working on a scene, but then switching to .glb when uploading it.

The following aspects of a 3D model can either be embedded in a glTF file or referenced externally:

  • Textures can either be embedded or referenced from an external image file.
  • Binary data about geometry, animations, and other buffer-related aspects of the model can either be embedded or referenced from an external .bin file.

Note: Animations must be embedded inside the glTF file to use in Decentraland.

Export to glTF from Blender

Blender doesn’t support exporting to glTF by default, but you can install a plugin to enable it.

  1. Download the Khronos Exporter
  2. To install the exporter, extract the .zip file, and then copy the scripts/addons/io_scene_gltf2 folder under the scripts/addons folder in your Blender installation.
  3. Activate the addon by opening User Preferences… in Blender. In the Add-ons tab, enable Import-Export: glTF 2.0 format. Don’t forget to click Save User Settings.

    Note: If you have another glTF 2.0 exporter installed, disable it. Only one can be enabled at a time.

When exporting 3D models that include multiple animations, make sure that all animations are embedded in the model. To do this, open the NLA editor and click Stash to add each animation to the model.

We recommend using the following export settings when exporting models with animations:

Blender export menu

Export to glTF from 3D Studio Max

3D Studio Max doesn’t support exporting to glTF by default, but you can install a plugin to enable it.

  1. Download the plugin from this link.
  2. Install the plugin by following these instructions.
  3. Export glTF files using the plugin by following these instructions.

Export to glTF from Maya

Maya doesn’t support exporting to glTF by default, but you can install a plugin to enable it.

  1. Install the plugin by following these instructions.
  2. Export glTF files using the plugin by following these instructions.

Note: As an alternative, you can try this other plugin too.

Export to glTF from Unity

Unity doesn’t support exporting to glTF by default, but you can install a plugin to enable it.

Download the plugin from this link.

Note: As an alternative, you can try this other plugin too.

Export to glTF from SketchUp

SketchUp doesn’t support exporting to glTF by default, but you can install a plugin to enable it.

Download the plugin from this link.

Preview a glTF model

A quick and easy way to preview the contents of a glTF model before importing it into a scene is to use the Babylon.js Sandbox. Just drag and drop the glTF file (and its .bin file if applicable) into the canvas to view the model.

In the sandbox you can also view the animations that are embedded in the model, select which to display by picking it out of a dropdown menu.

Why we use glTF

Compared to the older OBJ format, which supports only vertices, normals, texture coordinates, and basic materials, glTF provides a more powerful set of features that includes:

  • Hierarchical objects
  • Skeletal structure and animation
  • More robust materials and shaders
  • Scene information (light sources, cameras)

Note: .obj models are supported in Decentraland scenes as a legacy feature, but will likely not be supported for much longer.

Compared to COLLADA, the supported features are very similar. However, because glTF focuses on providing a “transmission format” rather than an editor format, it is more interoperable with web technologies.

Consider this analogy: the .PSD (Adobe Photoshop) format is helpful for editing 2D images, but images must then be converted to .JPG for use on the web. In the same way, COLLADA may be used to edit a 3D asset, but glTF is a simpler way of transmitting it while rendering the same result.

Convert fbx into glTF

.fbx is a very popular standard for 3D models. It’s not supported by our engine, but you can easily export an .fbx model to .gltf format.

We recommend using these tools:

  • Facebook’s CLI tool: this is the most robust alternative, but requires using the command line.

  • Blackthread: This the most complete web based tool. Less robust than the CLI, but a lot easier to use.

  • Modelconverter: Another easy-to-use web based tool.

Optimize a glTF

The following tool offers some optimizations that will make 3D models lighter and faster to download for players in your scene.

glTF pipeline

Among other things, it converts .gltf format into .glb, which is binary and so occupies a lot less. It also places texture files outside the 3D model, which allows you to use the same texture on multiple models.

Note: .glb format by default always has textures embedded in the file. The engine can’t recognize two embedded textures as the same, they need to be external files that share a same hash.

See also

The following pages also cover topics related to 3D models for Decentraland: