Export mesh animation to .gltf / .usdz

Hello everybody. I’m not very familiar with Blender yet and this is my first project. I have been looking for a solution to my problem for a few days, but nothing has worked so far.

The issue
II animated a kind of “blob” by giving an Icosphere a Displace > Texture Modifier with a cloudy texture. I linked that to an Empty Plain Axes and that in turn linked to a Bezier Circle. The animation consists basically of this blob shape, which differs in a loop. Everything works fine in Blender but when I export it as .gltf or .usdz there is no animation. Only when I export it as .abc, everything ist fine too.

Blender Version 2.90.0 on Mac

What I’ve already tried

  • First, I solved the animation differently by using a wave modifier. Unfortunately I have the same result here.
  • I checked “Use Nodes”. Same Problem.
  • I baked the animations, but Blender doesn’t do the mesh functions.
  • I saved the animation as an .abc file and then imported it again. Here the animation is converted into a mesh sequence. As soon as I export it as .gltf / .usdz, I unfortunately have the same problem.

Another problem is that the material won’t load either.

Please help me. Thank you!

If your animation can be baked down to a mesh sequence, then I think this workflow should be possible:

Basically you need to convert the animation to a sequence of morph targets (shape keys) by converting to .mdd first. Then the glTF addon can export that.

I’m not sure you’ll be able to do this with USDZ. In theory USDZ supports it but the last I heard, Apple’s USDZ viewers (which are usually what people mean when they ask about USDZ) do not support it. https://twitter.com/usdzshare/status/1256810461476995077

1 Like

Hi Don. Thank you for your help. I converted the animation to shape keys and exported it to glTF. The glTF file is mostly fine, there is a loop animation (with a break in between, but that doesn’t matter).

But when I convert it to .usdz there is still no animation. Probably because Apple doesn’t support the function. Do you have any other ideas to convert the animation?

I’m afraid I don’t really know if Apple’s USDZ tooling supports enough animation features to do this. Perhaps the usdzshare user on Twitter would know.

Another option if that fails, would be to export each of the objects as a separate mesh — without animation — in the same glTF file. Then you can use a script I’ve written to create an animation that shows each mesh sequentially.


// my-animation.js
const { NodeIO } = require('@gltf-transform/core');
const { sequence } = require('@gltf-transform/lib');
const { KHRONOS_EXTENSIONS } = require('@gltf-transform/extensions');

const io = new NodeIO().registerExtensions(KHRONOS_EXTENSIONS);

const doc = io.read('static.glb');

// Show each Box.* object, in sequence, at 10fps. You will have to adjust
// this pattern depending on the names of your objects.
await doc.transform(
  sequence({pattern: /Box.*/, fps: 10})

io.write('animated.glb', doc);
npm install --global @gltf-transform/core @gltf-transform/lib @gltf-transform/extensions
node my-animation.js

This creates a different type of animation that doesn’t require shape keys, simply scaling each mesh instantly between 0 and 1 when it should be shown. I know glTF also supports this style of animation, but again I’m basically guessing with Apple’s USDZ support. :confused:

EDIT: A version of this script is now available as a simpler CLI command, see gltf-transform sequence --help on this tool: https://gltf-transform.donmccurdy.com/cli.html.


Wow, this really saved me, thank you!!! My animation could be baked perfectly onto one mesh since the alembic didn’t really deformed that much, so I did shape key with every frame and using Shrinkwrap and then I could export the mesh to gltf. I was about to give up since both formats are incompatible and I’ve been searching for a solution for 2 weeks :sob:
I will also try that script for scaling the mesh sequence, but I know how big my glb is going to be, so i prefer the first solution