Giter VIP home page Giter VIP logo

Comments (3)

jessey-git avatar jessey-git commented on September 28, 2024

Hi Skrat, thanks for the suggestions and the PR. I think having an iostream interface option sounds reasonable at first glance and I'd be willing to see how that might integrate here. As for the extra chunks, I will need to think about that a bit.

My time is somewhat limited these days but I'll leave some initial comments from my very brief look through the code in a bit. It would be best if these were submitted as 2 separate PRs though to keep things separated.

from fx-gltf.

jessey-git avatar jessey-git commented on September 28, 2024

As a followup for the extra chunks, I spoke a little bit with the folks running glTF and I'll update this comment here as replies come in etc.

Summary:

  • Prefer to use custom bufferViews into the main BIN chunk for custom data (all the machinery is already in place as bufferViews let you know how/where to access it)
  • In either case, extensions should be used to identify how to access the extra custom data
  • Using new chunks is technically supported but doesn't seem to have much use (padding with any appropriate set of bytes to hit alignment requirements is fine)

Ed Mackey [10:30 AM]
@deadpin Rather than do that, I think a more standard approach would be to store the custom data in its own bufferView view into the single GLB binary chunk. A glTF extension could be used to specify the index of which bufferView holds the custom data.

Don McCurdy [11:22 AM]
@deadpin @vpenades @ed Mackey I agree with Ed that using a bufferView would be the more standard approach. That said, I believe it is valid to append custom chunks after the default two. From https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#chunks

Client implementations must ignore chunks with unknown types to enable glTF extensions to reference additional chunks with new types following the first two chunks.
(edited)

In either case, an extension should be included to identify the model as non-standard.

Don McCurdy [11:57 AM]
if it's a custom binary chunk then ideally it should be padded with 0x00, but that's up to your (or your user's) extension to define.
e.g. the custom chunk could technically be JSON, XML, etc, in which case 0x20 would be more appropriate, or you can pad with ascii art for that matter.

from fx-gltf.

jessey-git avatar jessey-git commented on September 28, 2024

iostream support has now been checked in to master.

from fx-gltf.

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.