[x3d-public] best way to implment Gltf2 in web3d browser: converter or native render?
Michalis Kamburelis
michalis at castle-engine.io
Tue Mar 31 13:14:06 PDT 2026
Same approach (as Holger describes for X_ITE) applies also to Castle Game Engine and Castle Model Viewer.
When loading glTF, we convert 100% of the information to X3D nodes. Most of them are standard X3D nodes, though we added some extensions to make it easier. It's all documented on https://github.com/michaliskambi/x3d-tests/wiki/Converting-glTF-to-X3D . We have deliberately made it easy by "aligning" some X3D features with glTF, e.g. X3D 4 PhysicalMaterial is very much like standard glTF material (sans glTF extensions to material, for which X_ITE has extensions to X3D which I also like!).
Our supported nodes, along with some extensions, are documented on pages linked from https://castle-engine.io/x3d (see the sidebar).
Note: This answer is not specific to glTF. We load _all_ 3D models (we support about 15 model formats) this way. So this includes formats like Collada, IFC, Spine JSON etc. See https://castle-engine.io/model_formats . All the loaders are defined in https://github.com/castle-engine/castle-engine/tree/master/src/scene/load -- as you can verify, the "loaders" are really just "converters into X3D nodes graph".
Note: This answer is not specific to web either :) We use this approach for all platforms in CGE, including web.
Regards,
Michalis
On Tuesday, March 31st, 2026 at 17:32, GPU Group via x3d-public <x3d-public at web3d.org> wrote:
> Q. What's the best/right way to support gltf2 in a web3d browser:
> a) on loading convert to web3d nodes
> b) load into a gltf node and treat as a sub-scenegraph, and use a gltf2-specific rendering pipeline on each frame
> -Doug Sanden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260331/510f3dd1/attachment.html>
More information about the x3d-public
mailing list