Defold 3d GLTF import

Hello everyone, I would like to know if I can import GLTF files to Defold.

Defold does support glTF format. Give it a try :slight_smile:

Note that currently, the gltf files need to have the vertex data embedded. And we don’t support embedded texture (since we deal with textures our own way).

3 Likes

It does but you want to be selective as it will otherwise import the whole scene. Also last I checked they have a one mesh limitation.

We recently removed the one mesh limitation. It now shows the entire scene.

6 Likes

I have a GLTF file which has a hard surface machine with a skeleton, and a few animations. And one of the animations controls a blend shape value, to deform part of the mesh.

Is this error because of the blend shape?
ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.

Full message:

ERROR:GAMESYS: Failed to create Model component. Material vertex space option VERTEX_SPACE_LOCAL does not support skinning.
WARNING:RESOURCE: Unable to create resource: /assets/model/moenda.modelc: NOT_SUPPORTED
WARNING:RESOURCE: Unable to create resource: /_generated_8ed61566.goc: NOT_SUPPORTED
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /_generated_8ed61566.goc.
WARNING:RESOURCE: Unable to create resource: /main/main.collectionc: FORMAT_ERROR

We currently don’t support instanced skinning. So you need a material which uses World Space vertices. This means that the skinning is done on the CPU.

Also we currently don’t support blend shapes, only skeletal animations.

2 Likes

I have gltf model with 2 materials.
Can i set different tint for this materials?