Giter Site home page Giter Site logo

Comments (7)

javagl avatar javagl commented on August 15, 2024 1

I first wasn't sure what this referred to, but it is this:

Khronos Interpolation

There seem to be strange values in the corresponding accessor. And... looking more closely at the model, nearly all values seem to be ... slightly off. For example, the (initial) translations of the nodes for the translation animation are

  node6.setTranslation([0,6.665226459503174,0]);
  node7.setTranslation([3.3051798343658447,6.734194278717041,0]);
  node8.setTranslation([-3.2975807189941406,6.958913326263428,0]);

i.e. their initial y-value is 6.66, 6.73 and 6.95, respectively. This is probably caused by the model initially being created in blender by dragging the objects to the "right" position with the mouse.

I started "fixing" this locally (basically by throwing it into gltfTransformifier and hand-editing the values...). A first pass is attached here:

InterpolationTestFix0001.zip

There, the initial y-values are all 6.8. The animations start at 6.8 and and at 6.8. Aint that nice?

But ... here are the key frame times of the animations:

  accessor9.setArray(new Float32Array([
    0.0416666679084301, 
    0.4166666567325592, 
    0.875, 
    1.25, 
    1.6666666269302368
  ]));
  accessor12.setArray(new Float32Array([
    0, 
    0.4166666567325592, 
    0.875, 
    1.25, 
    1.7083333730697632
  ]));
  accessor15.setArray(new Float32Array([
    0, 
    0.4583333432674408, 
    0.8333333134651184, 
    1.2916666269302368, 
    1.7083333730697632
  ]));
  accessor17.setArray(new Float32Array([
    0, 
    0.4166666567325592, 
    0.8333333134651184, 
    1.25, 
    1.6666666269302368
  ]));

I'll probably do another pass over that and try to fix it a bit more.

In the meantime, for all other perfectionists out there, enjoy this image of a 89° angle....

89degree

from gltf-sample-models.

javagl avatar javagl commented on August 15, 2024 1

An updated version, with "all nice" values:

InterpolationTestFix0003.zip

(it also contains the hand-tweaked gltfTransformifier output that was used for creating it)

Unless someone disagrees, I'd create a PR to update the sample model with this one.

from gltf-sample-models.

mkulagowski avatar mkulagowski commented on August 15, 2024

I've tested the 3rd version and it loops perfectly! This issue is actually result of my debug session, searching why my gltf anim implementation is jumping on looping...only to find out that the animation itself was baked poorly 🤣

from gltf-sample-models.

javagl avatar javagl commented on August 15, 2024

An update for the model is in KhronosGroup/glTF-Sample-Assets#26 (note that the glTF-Sample-Models repo will soon transition to the glTF-Sample-Assets repo, so it probably makes sense to create the PR there).

There is still some issue with either the model or the glTF-Sample-Viewer. That may have to be sorted out before merging it.

from gltf-sample-models.

DRx3D avatar DRx3D commented on August 15, 2024

@javagl : Do you believe that all aspects of this issue have been resolved with the PR to Sample Assets?

If so, this issue will be closed by 27 Nov.

from gltf-sample-models.

javagl avatar javagl commented on August 15, 2024

The issue itself is resolved with the linked PR, and when the linked PR is merged, then this issue can be closed.

I just added a comment at KhronosGroup/glTF-Sample-Assets#77 : We could consider handling the "0-1-scaling" in the InterpolationTest as well. But one could also make a case for creating a new model (no strong opinion here)

from gltf-sample-models.

DRx3D avatar DRx3D commented on August 15, 2024

PR #6 for Sample-Assets has been merged. This Issue is being closed without action because Sample-Assets supersedes Sample-Models.

from gltf-sample-models.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.