Defold supports models, skeletons and animations in the glTF 2.0 (GL Transmission Format) format. Use .gltf or .glb files for 3D models. The glTF is a modern format designed for transferring and loading 3D data in game engines and real-time applications.
You can use tools such as Maya, 3ds Max, SketchUp and Blender to create or convert 3D models to glTF.
Blender is a powerful and popular 3D modeling, animation and rendering program. It runs on Windows, macOS and Linux and is freely available from https://www.blender.org.

To import a model, drag and drop the .gltf or .glb file into the Defold editor Assets pane.
glTF can be stored in two common ways:
If the model should use a texture in Defold, import the texture image as a separate asset. Even when the source glTF/GLB file contains embedded images, textures must be assigned to the Model component through the component material texture properties.

Once you have imported the model, use it in a Model component:
The exported .gltf or .glb file contains all the vertices, edges and faces that make up the model, as well as UV coordinates (what part of the texture image maps to a certain part of the mesh) if you have defined them, the bones in the skeleton and animation data.
A detailed description on polygon meshes can be found on http://en.wikipedia.org/wiki/Polygon_mesh.
UV coordinates and UV mapping is described at http://en.wikipedia.org/wiki/UV_mapping.
Defold imposes some limitations on exported animation data:
Defold currently only supports baked animations. Animations need to have matrices for each animated bone each keyframe, and not position, rotation and scale as separate keys.
Animations are also linearly interpolated. If you do more advanced curve interpolation the animations needs to be prebaked from the exporter.
When you export a model, keep in mind that glTF support can differ between tools and engines. Use glTF 2.0, make sure the model has correct UV coordinates if it uses textures, and import texture images separately when they should be assigned to a Model component.
While our ambition is to fully support the glTF format, we’re not fully there yet. If a feature is missing, please make a feature request for it in our repo
If you do not already have a texture for your model you can use Blender to generate a texture. You should do this before you remove extra materials from the model. Start by selecting the mesh and all of its vertices:

When all vertices are selected you unwrap the mesh to get the UV layout:

You can then proceed to export the UV layout to an image that can be used as a texture:


Export your model from Blender using File ▸ Export ▸ glTF 2.0 (.glb/.gltf).

Select the object or objects before exporting and enable Selected Objects if you only want to export the selection.
Choose one of the Format options:
If the model contains animations, enable animation export and make sure the animations are baked. If the model uses textures, make sure the mesh has a UV unwrap and that texture images are exported in a format Defold can import, such as PNG or JPEG.
