Coder Social home page Coder Social logo

Comments (3)

foxiler avatar foxiler commented on August 16, 2024 1

The model works because for both joints the inverseBindMatrices tanslate the model by -0.5 on the X axis and -1 on the Y axis.

This indicates that the model need to be translated by 1 on the Y axis to be correctly placed. If the parent joints move, the model will follow it without issue.

That said, I think it is more intuitive to place the translation on the joint 1 and change the inverseBindMatrices of the joint 0 to this:

1.0   0.0   0.0   -0.5
0.0   1.0   0.0    0.0
0.0   0.0   1.0    0.0
0.0   0.0   0.0    1.0

I also take this opportunity to raise another problem on these pages.

The inverseBindMatrices on this page should be

1.0   0.0   0.0   -0.5
0.0   1.0   0.0   -1.0
0.0   0.0   1.0    0.0
0.0   0.0   0.0    1.0

In addition, the images 20b, 20c and 20d should be change to place the origin and the joints at the correct location. For exemple, the first image of 20c should be something like this:

image

But doing these changes will make the tutorial harder to understand, thus I think it is best to change the model.
The translation on joint 0 should be moved to joint 1, the position of the vertices should be translated by -0.5 on the X axis (the actual position are from (0, 0, 0) to (1, 2, 0), the translated position are from (-0.5, 0, 0) to (0.5, 2, 0)) and the inverseBindMatrices should be changed accordingly.

With these change, the model will truly reflect what we see on the images.

from gltf-tutorials.

javagl avatar javagl commented on August 16, 2024

There is a pending update for this model, c.f. #41 . This specific model causes a remarkable amount of issues - hope we get this ironed out at some point...

from gltf-tutorials.

emackey avatar emackey commented on August 16, 2024

@foxiler I think you're on the right track here. The original (un-edited) diagram shows how it should ideally work, and I think it was just a mistake that crept into an otherwise carefully hand-crafted sample, where the Y axis translation was applied to the wrong joint, but that joint never moves so it doesn't impact the resulting animation. Would you be willing to put together a PR?

from gltf-tutorials.

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.