Skip to content

Commit

Permalink
TinyGltfImporter: spline-interpolated animation import.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Sep 9, 2018
1 parent 27a8cb2 commit 0c55e31
Show file tree
Hide file tree
Showing 11 changed files with 565 additions and 61 deletions.
2 changes: 1 addition & 1 deletion doc/changelog-plugins.dox
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Magnum {

@subsection changelog-plugins-latest-new New features

- Initial support for animation data import in
- Support for object transformation animation import in
@ref Trade::TinyGltfImporter "TinyGltfImporter"
- New @ref Trade::JpegImageConverter plugin for writing JPEG files
- Minimal support for the [KHR_materials_pbrSpecularGlossiness](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
Expand Down
188 changes: 185 additions & 3 deletions src/MagnumPlugins/TinyGltfImporter/Test/TinyGltfImporterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <Magnum/Array.h>
#include <Magnum/Mesh.h>
#include <Magnum/PixelFormat.h>
#include <Magnum/Math/Quaternion.h>
#include <Magnum/Math/CubicHermite.h>
#include <Magnum/Trade/AbstractImporter.h>
#include <Magnum/Trade/AbstractMaterialData.h>
#include <Magnum/Trade/AnimationData.h>
Expand Down Expand Up @@ -67,6 +67,10 @@ struct TinyGltfImporterTest: TestSuite::Tester {
void animationWrongScalingType();
void animationUnsupportedPath();

void animationSpline();
void animationSplineSharedWithSameTimeTrack();
void animationSplineSharedWithDifferentTimeTrack();

void animationShortestPathOptimizationEnabled();
void animationShortestPathOptimizationDisabled();
void animationQuaternionNormalizationEnabled();
Expand Down Expand Up @@ -173,7 +177,13 @@ TinyGltfImporterTest::TinyGltfImporterTest() {
&TinyGltfImporterTest::animationWrongTranslationType,
&TinyGltfImporterTest::animationWrongRotationType,
&TinyGltfImporterTest::animationWrongScalingType,
&TinyGltfImporterTest::animationUnsupportedPath,
&TinyGltfImporterTest::animationUnsupportedPath});

addInstancedTests({&TinyGltfImporterTest::animationSpline},
Containers::arraySize(MultiFileData));

addTests({&TinyGltfImporterTest::animationSplineSharedWithSameTimeTrack,
&TinyGltfImporterTest::animationSplineSharedWithDifferentTimeTrack,

&TinyGltfImporterTest::animationShortestPathOptimizationEnabled,
&TinyGltfImporterTest::animationShortestPathOptimizationDisabled,
Expand Down Expand Up @@ -274,7 +284,7 @@ void TinyGltfImporterTest::animation() {
CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR,
"animation" + std::string{data.suffix})));

CORRADE_COMPARE(importer->animationCount(), 2);
CORRADE_COMPARE(importer->animationCount(), 5);

/* Empty animation */
{
Expand Down Expand Up @@ -453,6 +463,178 @@ void TinyGltfImporterTest::animationUnsupportedPath() {
CORRADE_COMPARE(out.str(), "Trade::TinyGltfImporter::animation(): unsupported track target color\n");
}

namespace {
constexpr Float AnimationSplineTime1Keys[]{ 0.5f, 3.5f, 4.0f, 5.0f };

constexpr CubicHermite3D AnimationSplineTime1TranslationData[]{
{{0.0f, 0.0f, 0.0f},
{3.0f, 0.1f, 2.5f},
{-1.0f, 0.0f, 0.3f}},
{{5.0f, 0.3f, 1.1f},
{-2.0f, 1.1f, -4.3f},
{1.5f, 0.3f, 17.0f}},
{{1.3f, 0.0f, 0.2f},
{1.5f, 9.8f, -5.1f},
{0.1f, 0.2f, -7.1f}},
{{1.3f, 0.5f, 1.0f},
{5.1f, 0.1f, -7.3f},
{0.0f, 0.0f, 0.0f}}
};
}

void TinyGltfImporterTest::animationSpline() {
auto&& data = MultiFileData[testCaseInstanceId()];
setTestCaseDescription(data.name);

std::unique_ptr<AbstractImporter> importer = _manager.instantiate("TinyGltfImporter");
CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR,
"animation" + std::string{data.suffix})));
CORRADE_COMPARE(importer->animationCount(), 5);
CORRADE_COMPARE(importer->animationName(2), "TRS animation, splines");

auto animation = importer->animation(2);
CORRADE_VERIFY(animation);
CORRADE_VERIFY(animation->importerState());
/* Four spline T/R/S keys with one common time track */
CORRADE_COMPARE(animation->data().size(),
4*(sizeof(Float) + 3*sizeof(Quaternion) + 2*3*sizeof(Vector3)));
CORRADE_COMPARE(animation->trackCount(), 3);

/* Rotation */
CORRADE_COMPARE(animation->trackType(0), AnimationTrackType::CubicHermiteQuaternion);
CORRADE_COMPARE(animation->trackResultType(0), AnimationTrackType::Quaternion);
CORRADE_COMPARE(animation->trackTarget(0), AnimationTrackTarget::Rotation3D);
CORRADE_COMPARE(animation->trackTargetId(0), 3);
Animation::TrackView<Float, CubicHermiteQuaternion> rotation = animation->track<CubicHermiteQuaternion>(0);
CORRADE_COMPARE(rotation.interpolation(), Animation::Interpolation::Spline);
CORRADE_COMPARE(rotation.before(), Animation::Extrapolation::Constant);
CORRADE_COMPARE(rotation.after(), Animation::Extrapolation::Constant);
CORRADE_COMPARE_AS(rotation.keys(), (Containers::StridedArrayView<const Float>{AnimationSplineTime1Keys}), TestSuite::Compare::Container);
constexpr CubicHermiteQuaternion rotationValues[]{
{{{0.0f, 0.0f, 0.0f}, 0.0f},
{{0.780076f, 0.0260025f, 0.598059f}, 0.182018f},
{{-1.0f, 0.0f, 0.3f}, 0.4f}},
{{{5.0f, 0.3f, 1.1f}, 0.5f},
{{-0.711568f, 0.391362f, 0.355784f}, 0.462519f},
{{1.5f, 0.3f, 17.0f}, -7.0f}},
{{{1.3f, 0.0f, 0.2f}, 1.2f},
{{0.598059f, 0.182018f, 0.0260025f}, 0.780076f},
{{0.1f, 0.2f, -7.1f}, 1.7f}},
{{{1.3f, 0.5f, 1.0f}, 0.0f},
{{0.711568f, -0.355784f, -0.462519f}, -0.391362f},
{{0.0f, 0.0f, 0.0f}, 0.0f}}
};
CORRADE_COMPARE_AS(rotation.values(), (Containers::StridedArrayView<const CubicHermiteQuaternion>{rotationValues}), TestSuite::Compare::Container);
/* The same as in CubicHermiteTest::splerpQuaternion() */
CORRADE_COMPARE(rotation.at(0.5f + 0.35f*3),
(Quaternion{{-0.309862f, 0.174831f, 0.809747f}, 0.466615f}));

/* Translation */
CORRADE_COMPARE(animation->trackType(1), AnimationTrackType::CubicHermite3D);
CORRADE_COMPARE(animation->trackResultType(1), AnimationTrackType::Vector3);
CORRADE_COMPARE(animation->trackTarget(1), AnimationTrackTarget::Translation3D);
CORRADE_COMPARE(animation->trackTargetId(1), 1);
Animation::TrackView<Float, CubicHermite3D> translation = animation->track<CubicHermite3D>(1);
CORRADE_COMPARE(translation.interpolation(), Animation::Interpolation::Spline);
CORRADE_COMPARE(translation.before(), Animation::Extrapolation::Constant);
CORRADE_COMPARE(translation.after(), Animation::Extrapolation::Constant);
CORRADE_COMPARE_AS(translation.keys(), (Containers::StridedArrayView<const Float>{AnimationSplineTime1Keys}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(translation.values(), (Containers::StridedArrayView<const CubicHermite3D>{AnimationSplineTime1TranslationData}), TestSuite::Compare::Container);
/* The same as in CubicHermiteTest::splerpVector() */
CORRADE_COMPARE(translation.at(0.5f + 0.35f*3),
(Vector3{1.04525f, 0.357862f, 0.540875f}));

/* Scaling */
CORRADE_COMPARE(animation->trackType(2), AnimationTrackType::CubicHermite3D);
CORRADE_COMPARE(animation->trackResultType(2), AnimationTrackType::Vector3);
CORRADE_COMPARE(animation->trackTarget(2), AnimationTrackTarget::Scaling3D);
CORRADE_COMPARE(animation->trackTargetId(2), 2);
Animation::TrackView<Float, CubicHermite3D> scaling = animation->track<CubicHermite3D>(2);
CORRADE_COMPARE(scaling.interpolation(), Animation::Interpolation::Spline);
CORRADE_COMPARE(scaling.before(), Animation::Extrapolation::Constant);
CORRADE_COMPARE(scaling.after(), Animation::Extrapolation::Constant);
CORRADE_COMPARE_AS(scaling.keys(), (Containers::StridedArrayView<const Float>{AnimationSplineTime1Keys}), TestSuite::Compare::Container);
constexpr CubicHermite3D scalingData[]{
{{0.0f, 0.0f, 0.0f},
{-2.0f, 1.1f, -4.3f},
{1.5f, 0.3f, 17.0f}},
{{1.3f, 0.5f, 1.0f},
{5.1f, 0.1f, -7.3f},
{-1.0f, 0.0f, 0.3f}},
{{0.1f, 0.2f, -7.1f},
{3.0f, 0.1f, 2.5f},
{5.0f, 0.3f, 1.1f}},
{{1.3f, 0.0f, 0.2f},
{1.5f, 9.8f, -5.1f},
{0.0f, 0.0f, 0.0f}}
};
CORRADE_COMPARE_AS(scaling.values(), (Containers::StridedArrayView<const CubicHermite3D>{scalingData}), TestSuite::Compare::Container);
CORRADE_COMPARE(scaling.at(0.5f + 0.35f*3),
(Vector3{0.118725f, 0.8228f, -2.711f}));
}

void TinyGltfImporterTest::animationSplineSharedWithSameTimeTrack() {
std::unique_ptr<AbstractImporter> importer = _manager.instantiate("TinyGltfImporter");
CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR,
"animation.gltf")));
CORRADE_COMPARE(importer->animationCount(), 5);
CORRADE_COMPARE(importer->animationName(3), "TRS animation, splines, sharing data with the same time track");

auto animation = importer->animation(3);
CORRADE_VERIFY(animation);
CORRADE_VERIFY(animation->importerState());
/* Four spline T keys with one common time track, used as S as well */
CORRADE_COMPARE(animation->data().size(),
4*(sizeof(Float) + 3*sizeof(Vector3)));
CORRADE_COMPARE(animation->trackCount(), 2);

/* Translation using the translation track and the first time track */
CORRADE_COMPARE(animation->trackType(0), AnimationTrackType::CubicHermite3D);
CORRADE_COMPARE(animation->trackResultType(0), AnimationTrackType::Vector3);
CORRADE_COMPARE(animation->trackTarget(0), AnimationTrackTarget::Translation3D);
CORRADE_COMPARE(animation->trackTargetId(0), 45);
Animation::TrackView<Float, CubicHermite3D> translation = animation->track<CubicHermite3D>(1);
CORRADE_COMPARE(translation.interpolation(), Animation::Interpolation::Spline);
CORRADE_COMPARE(translation.before(), Animation::Extrapolation::Constant);
CORRADE_COMPARE(translation.after(), Animation::Extrapolation::Constant);
CORRADE_COMPARE_AS(translation.keys(), (Containers::StridedArrayView<const Float>{AnimationSplineTime1Keys}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(translation.values(), (Containers::StridedArrayView<const CubicHermite3D>{AnimationSplineTime1TranslationData}), TestSuite::Compare::Container);
/* The same as in CubicHermiteTest::splerpVector() */
CORRADE_COMPARE(translation.at(0.5f + 0.35f*3),
(Vector3{1.04525f, 0.357862f, 0.540875f}));

/* Scaling also using the translation track and the first time track. Yes,
it's weird, but a viable test case verifying the same key/value data
pair used in two different tracks. The imported data should be
absolutely the same, not processed twice or anything. */
CORRADE_COMPARE(animation->trackType(1), AnimationTrackType::CubicHermite3D);
CORRADE_COMPARE(animation->trackResultType(1), AnimationTrackType::Vector3);
CORRADE_COMPARE(animation->trackTarget(1), AnimationTrackTarget::Scaling3D);
CORRADE_COMPARE(animation->trackTargetId(1), 45);
Animation::TrackView<Float, CubicHermite3D> scaling = animation->track<CubicHermite3D>(1);
CORRADE_COMPARE(scaling.interpolation(), Animation::Interpolation::Spline);
CORRADE_COMPARE(scaling.before(), Animation::Extrapolation::Constant);
CORRADE_COMPARE(scaling.after(), Animation::Extrapolation::Constant);
CORRADE_COMPARE_AS(scaling.keys(), (Containers::StridedArrayView<const Float>{AnimationSplineTime1Keys}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(scaling.values(), (Containers::StridedArrayView<const CubicHermite3D>{AnimationSplineTime1TranslationData}), TestSuite::Compare::Container);
/* The same as in CubicHermiteTest::splerpVector() */
CORRADE_COMPARE(scaling.at(0.5f + 0.35f*3),
(Vector3{1.04525f, 0.357862f, 0.540875f}));
}

void TinyGltfImporterTest::animationSplineSharedWithDifferentTimeTrack() {
std::unique_ptr<AbstractImporter> importer = _manager.instantiate("TinyGltfImporter");
CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR,
"animation.gltf")));
CORRADE_COMPARE(importer->animationCount(), 5);
CORRADE_COMPARE(importer->animationName(4), "TRS animation, splines, sharing data with different time track");

std::ostringstream out;
Error redirectError{&out};
CORRADE_VERIFY(!importer->animation(4));
CORRADE_COMPARE(out.str(), "Trade::TinyGltfImporter::animation(): spline track is shared with different time tracks, we don't support that, sorry\n");
}

void TinyGltfImporterTest::animationShortestPathOptimizationEnabled() {
std::unique_ptr<AbstractImporter> importer = _manager.instantiate("TinyGltfImporter");
/* Enabled by default */
Expand Down
Binary file modified src/MagnumPlugins/TinyGltfImporter/Test/animation-embedded.glb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"asset":{"version":"2.0"},"animations":[{"name":"empty","channels":[],"samplers":[]},{"name":"TRS animation","channels":[{"sampler":0,"target":{"node":1337,"path":"rotation"}},{"sampler":1,"target":{"node":42,"path":"translation"}},{"sampler":2,"target":{"node":12,"path":"scale"}}],"samplers":[{"input":0,"interpolation":"LINEAR","output":1},{"input":2,"interpolation":"STEP","output":3},{"input":2,"interpolation":"LINEAR","output":4}]}],"accessors":[{"bufferView":0,"byteOffset":0,"componentType":5126,"count":2,"type":"SCALAR"},{"bufferView":1,"byteOffset":0,"componentType":5126,"count":2,"type":"VEC4"},{"bufferView":0,"byteOffset":8,"componentType":5126,"count":4,"type":"SCALAR"},{"bufferView":2,"byteOffset":0,"componentType":5126,"count":4,"type":"VEC3"},{"bufferView":3,"byteOffset":0,"componentType":5126,"count":4,"type":"VEC3"}],"bufferViews":[{"buffer":0,"byteOffset":0,"byteLength":24},{"buffer":0,"byteOffset":24,"byteLength":32},{"buffer":0,"byteOffset":56,"byteLength":48},{"buffer":0,"byteOffset":104,"byteLength":48}],"buffers":[{"byteLength":152,"uri":"data:application/octet-stream;base64,AACgPwAAIEAAAAAAAACgPwAAIEAAAHBAAAAAAAAAAAAAAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgQAAAAAAAAAAAAAAgQAAAAAAAAAAAAAAAAAAAAAAAAIA/AACAPwAAgD8AAIA/AACAPwAAoEAAAIA/AACAPwAAwEAAAIA/AACAPwAAgD8="}]}
{"asset":{"version":"2.0"},"animations":[{"name":"empty","channels":[],"samplers":[]},{"name":"TRS animation","channels":[{"sampler":0,"target":{"node":1337,"path":"rotation"}},{"sampler":1,"target":{"node":42,"path":"translation"}},{"sampler":2,"target":{"node":12,"path":"scale"}}],"samplers":[{"input":0,"interpolation":"LINEAR","output":1},{"input":2,"interpolation":"STEP","output":3},{"input":2,"interpolation":"LINEAR","output":4}]},{"name":"TRS animation, splines","channels":[{"sampler":0,"target":{"node":3,"path":"rotation"}},{"sampler":1,"target":{"node":1,"path":"translation"}},{"sampler":2,"target":{"node":2,"path":"scale"}}],"samplers":[{"input":5,"interpolation":"CUBICSPLINE","output":7},{"input":5,"interpolation":"CUBICSPLINE","output":8},{"input":5,"interpolation":"CUBICSPLINE","output":9}]},{"name":"TRS animation, splines, sharing data with the same time track","channels":[{"sampler":0,"target":{"node":45,"path":"translation"}},{"sampler":1,"target":{"node":45,"path":"scale"}}],"samplers":[{"input":5,"interpolation":"CUBICSPLINE","output":8},{"input":5,"interpolation":"CUBICSPLINE","output":8}]},{"name":"TRS animation, splines, sharing data with different time track","channels":[{"sampler":0,"target":{"node":45,"path":"translation"}},{"sampler":1,"target":{"node":45,"path":"scale"}}],"samplers":[{"input":5,"interpolation":"CUBICSPLINE","output":8},{"input":6,"interpolation":"CUBICSPLINE","output":8}]}],"accessors":[{"bufferView":0,"byteOffset":0,"componentType":5126,"count":2,"type":"SCALAR"},{"bufferView":1,"byteOffset":0,"componentType":5126,"count":2,"type":"VEC4"},{"bufferView":0,"byteOffset":8,"componentType":5126,"count":4,"type":"SCALAR"},{"bufferView":2,"byteOffset":0,"componentType":5126,"count":4,"type":"VEC3"},{"bufferView":3,"byteOffset":0,"componentType":5126,"count":4,"type":"VEC3"},{"bufferView":4,"byteOffset":0,"componentType":5126,"count":4,"type":"SCALAR"},{"bufferView":4,"byteOffset":16,"componentType":5126,"count":4,"type":"SCALAR"},{"bufferView":5,"byteOffset":0,"componentType":5126,"count":12,"type":"VEC4"},{"bufferView":6,"byteOffset":0,"componentType":5126,"count":12,"type":"VEC3"},{"bufferView":7,"byteOffset":0,"componentType":5126,"count":12,"type":"VEC3"}],"bufferViews":[{"buffer":0,"byteOffset":0,"byteLength":24},{"buffer":0,"byteOffset":24,"byteLength":32},{"buffer":0,"byteOffset":56,"byteLength":48},{"buffer":0,"byteOffset":104,"byteLength":48},{"buffer":0,"byteOffset":152,"byteLength":32},{"buffer":0,"byteOffset":184,"byteLength":192},{"buffer":0,"byteOffset":376,"byteLength":144},{"buffer":0,"byteOffset":520,"byteLength":144}],"buffers":[{"byteLength":664,"uri":"data:application/octet-stream;base64,AACgPwAAIEAAAAAAAACgPwAAIEAAAHBAAAAAAAAAAAAAAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgQAAAAAAAAAAAAAAgQAAAAAAAAAAAAAAAAAAAAAAAAIA/AACAPwAAgD8AAIA/AACAPwAAoEAAAIA/AACAPwAAwEAAAIA/AACAPwAAgD8AAAA/AABgQAAAgEAAAKBAMzMzP83MjD8AAEBAAACwQAAAAAAAAAAAAAAAAAAAAAAQs0c/MgPVPGUaGT/tYjo+q6qqvgAAAADNzMw9iYgIPlVV1T/NzMw9vLu7PquqKj5SKTa/mmDIPlIptj5Kz+w+AABAQJqZGT8AAAhCAABgwWZmJkAAAAAAzczMPpqZGUBlGhk/7WI6PjID1TwQs0c/zczMPc3MTD4zM+PAmpnZP2Zmpj8AAAA/AACAPwAAAABSKTY/Uim2vkrP7L6aYMi+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEDNzMw9AAAgQKuqqr4AAAAAzczMPVVV1T/NzMw9vLu7PgAAAMDNzIw/mpmJwAAAQECamRk/AAAIQmZmJkAAAAAAzczMPgAAwD/NzBxBMzOjwM3MzD3NzEw+MzPjwGZmpj8AAAA/AACAPzMzo0DNzMw9mpnpwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDNzIw/mpmJwAAAAD/NzMw9VVW1QN7d3T6rqio+q6qqPjMzo0DNzMw9mpnpwAAAAMAAAAAAmpkZP83MTD7NzMw+MzNjwQAAQEDNzMw9AAAgQAAAoECamZk+zcyMP2Zmpj8AAAAAzcxMPgAAwD/NzBxBMzOjwAAAAAAAAAAAAAAAAA=="}]}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
],
"buffers": [
{
"byteLength": 152,
"byteLength": 664,
"uri": "animation.bin"
}
]
Expand Down
Binary file modified src/MagnumPlugins/TinyGltfImporter/Test/animation.bin
Binary file not shown.
74 changes: 70 additions & 4 deletions src/MagnumPlugins/TinyGltfImporter/Test/animation.bin.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Data based on AnimatedBox glTF sample model
type = "<6f 8f 12f 12f"
type = "<6f8f12f12f 4f4f48f36f36f"
input = [
# time
1.25, 2.5, 0.0, 1.25, 2.5, 3.75,
# time for rotation
1.25, 2.5,

# time for translation/scaling
0.0, 1.25, 2.5, 3.75,

# rotation track
0.0, 0.0, 0.0, 1.0, # 360° rotation along X
Expand All @@ -18,5 +21,68 @@ input = [
1.0, 1.0, 1.0,
1.0, 1.0, 5.0,
1.0, 1.0, 6.0,
1.0, 1.0, 1.0
1.0, 1.0, 1.0,

# time for spline interpolation -- *need* to have varying keyframe spacing
# to test the cubic hermite postprocessing.
0.5, 3.5, 4.0, 5.0,

# second time track for spline interpolation -- used to test time sharing
0.7, 1.1, 3.0, 5.5,

# rotation values taken from CubicHermiteTest::splerpQuaternion(). The
# first and second keyframe should give the same values as there if the
# postprocessing is correct, the rest is just random with shuffled around
# point values.
0, 0, 0, 0, # not used anyway
0.780076, 0.0260025, 0.598059, 0.182018,
-1.0/3, 0.0/3, 0.3/3, 0.4/3,

5.0/3, 0.3/3, 1.1/3, 0.5/3,
-0.711568, 0.391362, 0.355784, 0.462519,
1.5/0.5, 0.3/0.5, 17.0/0.5, -7.0/0.5,

1.3/0.5, 0.0/0.5, 0.2/0.5, 1.2/0.5,
0.598059, 0.182018, 0.0260025, 0.780076,
0.1, 0.2, -7.1, 1.7,

1.3, 0.5, 1.0, 0.0,
0.711568, -0.355784, -0.462519, -0.391362,
0, 0, 0, 0, # not used anyway

# translation taken from CubicHermiteTest::splerpVector() and extended. The
# first and second keyframe value as there (+ one more dimension) if the
# postprocessing is correct.
0, 0, 0, # not used anyway
3.0, 0.1, 2.5,
-1.0/3, 0.0/3, 0.3/3,

5.0/3, 0.3/3, 1.1/3,
-2.0, 1.1, -4.3,
1.5/0.5, 0.3/0.5, 17.0/0.5,

1.3/0.5, 0.0/0.5, 0.2/0.5,
1.5, 9.8, -5.1,
0.1, 0.2, -7.1,

1.3, 0.5, 1.0,
5.1, 0.1, -7.3,
0, 0, 0, # not used anyway

# scaling is just shuffled translation
0, 0, 0, # not used anyway
-2.0, 1.1, -4.3,
1.5/3, 0.3/3, 17.0/3,

1.3/3, 0.5/3, 1.0/3,
5.1, 0.1, -7.3,
-1.0/0.5, 0.0/0.5, 0.3/0.5,

0.1/0.5, 0.2/0.5, -7.1/0.5,
3.0, 0.1, 2.5,
5.0, 0.3, 1.1,

1.3, 0.0, 0.2,
1.5, 9.8, -5.1,
0, 0, 0, # not used anyway
]
Binary file modified src/MagnumPlugins/TinyGltfImporter/Test/animation.glb
Binary file not shown.
Loading

0 comments on commit 0c55e31

Please sign in to comment.