gltfExporter does not support animation tracks that target one or two axis, such as the x or y or z

I’m trying to export an animation that has tracks that control each axis separately, but I end up with errors when validating my gltf file:

{
“code”: “ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_FORMAT”,
“message”: “Invalid animation sampler output accessor format ‘{SCALAR, FLOAT}’ for path ‘translation’. Must be one of (‘{VEC3, FLOAT}’).”,
“severity”: 0,
“pointer”: “/animations/0/channels/0/sampler”
},
{
“code”: “ANIMATION_DUPLICATE_TARGETS”,
“message”: “Animation channel has the same target as channel 1.”,
“severity”: 0,
“pointer”: “/animations/0/channels/0/target”
},

Does the gltf format support this? Do I need to convert the tracks to vec3? Will that change the way the animation looks if I do?
Is there a built in method in three for converting these?

also, wondering what the other error means…

The animation will need to be converted to one targeting XYZ channels together; GLTFExporter cannot currently do that conversion itself. The second error is probably related to the first, but hard to guess without the file.

I see. I’ll work on combining them. It might be difficult if they use different interpolations, but I can probably convert that and create extra keyframes.

I’ve combined the components and now it is exporting just fine. :slight_smile:

1 Like