.gltf animation export

I’m trying to export an animation as .gltf for Sketchfab.

I’ve broken my animation down into a simple representation using a single bone, cube, and empty.

Essentially I need the cube to follow the bone animation (vertical animation) whilst the bone follows an empty (horizontal animation). The result being a bouncing cube following a path.

I’ve created NLA strips for the animation however when I try and export as .gltf I get a bunch of errors and the file doesn’t export.

I’m using the following export settings:

image

I’m selecting all objects in scene and exporting selection.

I’ve also attached the .blend file. Any tips would be greatly appreciated. Thank you.

cube.blend (434.2 KB)

Hi Sophie,

I’m assuming you’re using Blender 2.8. I was able to export to gltf, but my tab looks different:

image

which may mean you’re on a different 2.8 build from me ( I’m on the 26th March release - ie yesterday’s) or on a 2.7x version ( which may cause the issue ).
This is my export from 2.8, with no changes at all to your file:

cube_no_changes.glb (136.6 KB)

You can import this into Blender 2.8, though you’ll need to change the bone viewport type to Stick or you’ll never see the cube, which is tiny in comparison [ no idea why that is the case ].

However, on SketchFab, I was not able to get the animation to combine both actions when I tried it, either you have the cube bouncing OR the cube traversing, but not both together ( you select which you want in the panel on the sketchfab interface during playback). Why this is I don’t know, [ an issue with the hierarchy of the armature and empties or possibly a binding effect ? ].

I would also recommend resetting the scale to 1 on all geometry, bones etc before you do rigging, parenting, linking and especially animation. In Blender this is not normally an issue, but once exported you are at the mercy of the importing software, and there is no way of knowing if it’s implemented in a compatible manner until you try :scream: . . . and then changing your file might be a nightmare :exploding_head:

Cheers,
Dj

2 Likes

Hi Damian,

Thanks for your reply. My main issue at the moment is exporting a .gltf with multiple animations. As you say, it’s either traversing or moving vertically.

It looks like this is an issue for Sketchfab to resolve. Unless anyone knows of a way to combine animations in one .gltf export for Sketchfab?