Importing glTF models straight from the box is not working

I finally reached the point where I’m working on a 3D game using Defold, and I noticed there isn’t much information available on this topic. I discovered that Defold works best in combination with Blender—which makes sense, as both are wonderful open-source tools.

I managed to integrate 3D elements and even wrote my own shaders to get everything looking just right. Feeling encouraged, I decided to try adding animations next. However, I ran into some difficulties: there are very few guides available for this, and it’s not clear which ones are up to date.

I thought that models from a popular site like Sketchfab should work out of the box, but I downloaded a couple of animated models and none of them worked as expected.
image

Meanwhile, these models run perfectly in other engines.

This isn’t a complaint, just a friendly request: could we consider making it so that everything works after download? It would be great if we didn’t need to reconfigure things, add bones, or perform extra tweaks just to get a model running. I’m not a tech expert, and I can only imagine how challenging this might be. But as a designer, I ended up having to act as a technical designer for several days just to get a simple downloaded file integrated.

Thanks for reading, and I appreciate any insights or improvements on this process!

1 Like


To make sure we’re not limited in our choice of models, here are the criteria you should select. Feel free to choose any model and give it a try. While there are some paid models out there, there are also a million free ones available!

https://sketchfab.com/search?features=downloadable+animated&type=models

1 Like

You can use .obj and gltf/glb in defold, but it is very moddest: No full scenes (im working on an extension that basically gets gltf scenes as a level file and transforms into a collection using your already built collections and gameobjects), only one mesh per file, no shaders… Today it is still very barebones tbfr. Speaking of, afaik 3d animation is working but with some drawbacks, like no more than 1 animation can be played at once even if they work on different bones. The animation has to be a separate file… Its not all handed to you like we might see in other engines, frustration with this hit me like a while ago too i totally understand seeing this as too much to take into consideration. Im still not too much knowlegeable in 3d Defold, but i do know some handy links:

The best thing defold has going for is that bones are treated as gameobjects, dont know how it is in other engines but afaik bones can be manipulated just as easily as GOs.

So, to answer it short: defold isnt loading the models probably bc they have too much information that defold cant handle like shaders, animation data, multiple meshes…

To solve this i would just open my 3d editor and cut the fat out, if possible/practical

1 Like

Thank you so much for the detailed explanation and links! I’ve tried working with static models—adding textures and shaders—which all work fine. My only issues are with animations at this point.

I have to admit that skeletal animation isn’t my strongest suit. I tried animating a cube frame by frame in 3ds Max without bones, but that approach didn’t carry over into Defold. Then I thought about downloading a pre-made animated model Chest Animations - Download Free 3D model by Aidan Gross (@AidanGross) [75fda8e] - Sketchfab and maybe swapping out the meshes and textures later, but honestly, nothing seemed to import correctly into Defold.

I suspect it might be related to the bone hierarchy or linking issues, but I’m not entirely sure. Most of the forum threads on this subject are quite old, and it seems like this topic isn’t actively discussed anymore.

Thanks again for your help—I really appreciate it!

1 Like

I don’t recommend using online-converted versions. Online converters often break things and are not optimized. For example, this chest model is 12MB/5MB, which is insane. I’m pretty sure this animated chest can’t be over 500KB.

I highly recommend downloading the original file and exporting it from Blender or any other software as a GLB. Models without animations are very straightforward, but with animations, it can be a pain. I couldn’t convert one of my FBX files either. I found this, which might help:

1 Like

I have a look.
The model itself is size 45KB.
the rest are PBR textures.
2025-02-03_12-30-57

But I agree that this is not a suitable example for embedding in games. Overcomplicated geometry and model structure.

And yep it’s not showing correct even after reexport from Blender.

2 Likes

Yes, we want a smooth workflow for GLTF files, and have full support for their features.
We have many things on our todo-list, but we have to prioritise our paid work with our partners, hence the slow progress on 3D support.

3 Likes

Here are the issues where we track issues with and improvements we want to make to glTF models:

As you can see there are a few issues which focus on treating glTF more as a “resource container” rather than a single model.

1 Like

@Mathias_Westerdahl @britzl Thanks for your help!I don’t really need that specific chest—it was just the first file I came across. I downloaded it and imported it into 3ds Max, where it animates fine; in Blender, everything works perfectly; in Unity, it also works as expected; but when I imported it into Defold, I ran into issues.

As I mentioned before, I’m not an animation expert—I was just trying to see how these challenges are handled. It seems that waiting for an update might be the best option. I also tried a simple test with two moving cubes without bones, but that didn’t work either. In short, it looks like I might have to work around animations for now.