Coder Social home page Coder Social logo

Comments (2)

javagl avatar javagl commented on July 17, 2024

You should keep in mind the semantics of what is represented in a glTF asset. For example: The joint matrices are not stored in the glTF directly. They are computed from the information that is contained in the glTF, taking into account the structure and relationships of the elements in the glTF.

When you have classes like Mesh, Skin and Node that roughly correspond to the elements in a glTF, then you would probably not store any List<Matrix> jointMatrices in the Mesh class. You would also not store it in the Skin class. You might store it in the Node class, because that's where all the information that is required for computing the joint matrices comes together. But you might very well "encapsulate" this part in a class that is specific for rendering. This might be something like a RenderedMesh, maybe even with specializations like RenderedSkinnedMesh or so.

This is probably related to #80 (comment) . In any case, it sounds like a very specific question about the class design of a library that is supposed to load or render glTF. As such, there is no single, 'true' answer, and I'd recommend looking at other glTF libraries to see how they solved this. (This does not mean that you'd have to take the same approach - but it might make you aware of some caveats...)

from gltf-tutorials.

3dportable avatar 3dportable commented on July 17, 2024

ok, thanks

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.