I have been adding support for exporting skeleton and animation data from glTF (2.0) to my custom engine. glTF utilizes a right-handed coordinate system (+y up, +z in, +x left), whereas my engine utilizes a left-handed coordinate system (+y up, +z in, +x right).
For mesh import, this is a simple conversion (flip x, reverse winding order). Skeleton and animation (keyframe data), however, is a bit more complicated. glTF provides all of these transforms in bone-local space (both skeleton nodes and keyframe data). Were it just a matter of the skeleton, simply composing the model-space transforms, flipping x translation, and zeroing out rotations then re-calculating the bone-local transforms is simple enough and produces the correct results. Of course, this makes it a zero-rotation bind pose, which is not really en vogue these days for various reasons. However, the keyframe animation data is another matter. Obviously, the zero-rotation bind pose is no longer in the same reference space as the animation keyframe data. I can't really wrap my head around how to transform the keyframes into either the new zero-rotation, LHCS base pose reference frame, OR, preferably, how I can do the LHCS conversion to the skeleton and maintain rotations and apply the same conversion to the animation keyframes.
I feel like I might be over-thinking this, but I'm having trouble rationalizing how to make this work without doing some laborious full keyframe pose local->model->convert->local transformation. It gets especially hard to think about how this might work considering that we can't guarantee that there are a full set of bone transforms for every keyframe (or that there are necessarily matching keyframes across the bone set (could be at different/unaligned times).
Anyone have thoughts/experience with this particular problem?