[x3d-public] gltf inspired binary storage

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Wed Jan 19 11:04:27 PST 2022


Tweeted @Web3dConsortium with some nice screenshots.  Bravo!


  *   Improved #X3DOM binary storage of field values on GPU using (inspired by @glTF3D techniques) can efficiently store exceptionally large arrays such as #X3D CoordinateInterpolator, useful for large keyframe animations.

http://web3d.org/pipermail/x3d-public_web3d.org/2022-January/016533.html



  *   https://twitter.com/Web3DConsortium/status/1483819271016824835

all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
X3D graphics, virtual worlds, Navy robotics https:// faculty.nps.edu/brutzman

From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas Plesch
Sent: Tuesday, January 18, 2022 7:40 PM
To: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: [x3d-public] gltf inspired binary storage

Let me announce x3dom support for efficient support of large CoordinateInterpolator (and other) nodes by adopting gltf inspired binary storage of field values.

Here is an example:

regular CoordinateInterpolator (ca. 12MB):

https://61e75f82d2db93000729e6a7--x3dom.netlify.app/examples/cases/coordinateInterpolator/coordinateInterpolator.html<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F61e75f82d2db93000729e6a7--x3dom.netlify.app%2Fexamples%2Fcases%2FcoordinateInterpolator%2FcoordinateInterpolator.html&data=04%7C01%7Cbrutzman%40nps.edu%7C11c642aa39e64ee5d74308d9dafd8cd3%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637781605870008109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=fk2hxhsaAhFrsdxPdlFEaAiXYCaR%2BnOaWX47MuE439k%3D&reserved=0>

binary CoordinateInterpolator (ca. 5MB):
https://61e75f82d2db93000729e6a7--x3dom.netlify.app/examples/cases/coordinateinterpolator/coordinateinterpolatorbuffer<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2F61e75f82d2db93000729e6a7--x3dom.netlify.app%2Fexamples%2Fcases%2Fcoordinateinterpolator%2Fcoordinateinterpolatorbuffer&data=04%7C01%7Cbrutzman%40nps.edu%7C11c642aa39e64ee5d74308d9dafd8cd3%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637781605870008109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iWR%2BY%2F1nrkhX%2FoZzDVrtjxHRBqMpF9M7yYdXv8K7r6w%3D&reserved=0>

The binary version should load faster. There is no visual difference. There is also no performance difference after initial loading.

This is useful for large keyframe animations.

Background:

glTF stores all data in buffers, eg. binary storage which can often be used directly on the GPU. The details on how the data is stored is provided by 'views' into the buffer and 'accessors' of views.
x3dom implements glTF support not by translating these data structures into x3d field values but by implementing additional x3d nodes and fields. There is a 'BufferGeometry' node and additional fields such as BufferAccessor for Interpolators. This has the advantage that these additions can also be used outside of glTF.
glTF only has support for translation, scale and rotation interpolation. In x3dom, buffer storage can now also be used for other interpolators. Here is a fuller description:

https://github.com/x3dom/x3dom/wiki/Buffer-interpolators<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fx3dom%2Fx3dom%2Fwiki%2FBuffer-interpolators&data=04%7C01%7Cbrutzman%40nps.edu%7C11c642aa39e64ee5d74308d9dafd8cd3%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637781605870008109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=KPrj5x9bVk%2Fg221HgXvPUnBqRvbi2a4bFCdIBz42jXI%3D&reserved=0>

It is possible to convert regular Interpolators to buffer Interpolators. Here is a sample converter for CoordinateInterpolator:

https://observablehq.com/@andreasplesch/x3dom-interpolator-buffer-converter<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fobservablehq.com%2F%40andreasplesch%2Fx3dom-interpolator-buffer-converter&data=04%7C01%7Cbrutzman%40nps.edu%7C11c642aa39e64ee5d74308d9dafd8cd3%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637781605870008109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=aDaTKLOaravV%2Btsx6C6WZZA4AHEW%2FsVwlQ39D3czom4%3D&reserved=0>

In x3dom, there is also a BinaryGeometry node which is a precursor to the BufferGeometry node used for glTF support. Though non-standard, the BinaryGeometry node is very popular since it allows for faster and more efficient loading of large IFS. There is a converter (aopt) which generates BinaryGeometry. It should be possible to write another converter to BufferGeometry. This binary format is quite different from x3db, the Fast Infoset based binary encoding of x3d which requires heavy processing. With glTF support in x3d, there may be now more interest in glTF type binary storage of heavy models, perhaps leading to standardization.

Any feedback or comment always welcome,

Andreas
--
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220119/5be35ad5/attachment-0001.html>


More information about the x3d-public mailing list