question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GLTFLoader: Extensibility

See original GitHub issue

Hi,

We are currently implement b3dm (a format that encapsulates glTF) support in our project and have encountered a few problems with the current GLTFLoader implementation.

We need to support addition attribute (batchid, used to identify the different objects packed in the geometry), extensions (CESIUM_RTC) and potentially additional uniforms. However, there does not seem to be any way to add these new features without modifying the GLTFLoader file itself.

So my question is: how to support the extensible nature of glTF? Do we contribute directly to the source and add the attributes/extensions/uniforms that we need? Or does the loader need to be modified so extensions can be “plugged in” without changing the source?

Related question: when loading glTFs in a scene rendered using a logarithmic depth buffer, the model’s shader are not modified to account for it, resulting in depth issues: http://jsfiddle.net/x6ufnz3y/. I implemented a small hack to fix the problem. Should this process be added to the loader natively? Or could Three provide a helper function to patch the materials?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
garyocommented, May 13, 2019

On a similar topic, I may need to postprocess some geometry before exporting to glTF. Would there be any interest if I proposed a similar extension mechanism for GLTFExporter? For instance I need to not export certain subtrees, and change materials to glTF-compatible ones. (If there is any interest I’ll follow up in a new issue of course. Don’t want to hijack this discussion.)

1reaction
Mugen87commented, Jul 17, 2020

Should be solved via #19144 (which was merged in r118).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extending the glTF Loader in Babylon.js - Medium
The glTF 2.0 loader in Babylon.js is built to be extensible via loader extensions. Some loader extensions are built-in while others are provided...
Read more >
GLTFLoader – three.js docs
GLTFLoader. A loader for glTF 2.0 resources. glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D...
Read more >
glTF | glTF – Runtime 3D Asset Delivery
glTF defines an extensible, common publishing format for 3D content tools and ... A minimal, engine-agnostic JavaScript glTF Loader, with a raw WebGL...
Read more >
glTF RUNTIME 3D ASSET DELIVERY - Khronos Group
glTF defines an extensible, publishing format that streamlines authoring workflows and interactive services by enabling the interoperable use of 3D content ...
Read more >
gltf-model - A-Frame
... extensible format for 3D assets that is both efficient and highly interoperable ... Work on the three.js glTF loader and converters are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found