[proposal] Increasing the memory and rendering efficiency of glb files by giving each accessor its own buffer view #3639
chetan-set
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a glb is generated by IfcOpenShell, the glb output file only has two buffer views, one is an indices buffer view and the second is a vertices buffer view.
For small ifc models, this is generally fine. However for large ifc models, this becomes an issue, especially when a model is rotated for example, and the renderer has to load and unload various accessors into memory.
Furthermore some renderers like SceneKit, with the help of GLTFSceneKit loads the complete associated buffer view for each accessor into memory regardless of whether they are pointing to the same buffer. This causes simple model to quickly run out of memory on low end devices.
I would like to make a proposal to give each accessor its own buffer view.
There are two main advantages and they are:
Memory Efficiency: In many cases, different accessors have different data usage patterns. For instance, vertex positions might be accessed more frequently than tangents or texture coordinates. By separating these into different buffer views, we can optimize memory usage and loading times.
Rendering Efficiency: In real-time rendering scenarios, rendering APIs often require data to be in specific formats for efficient rendering. By using separate buffer views, we can prepare the data in the required format for each type of accessor.
I have created a pull request here for your review.
Please give me your thoughts and suggestions.
Beta Was this translation helpful? Give feedback.
All reactions