https://github.com/opensourcebim/gltfserializers
BIMserver that converts a model to binary glTF
https://github.com/opensourcebim/gltfserializers
Last synced: 10 months ago
JSON representation
BIMserver that converts a model to binary glTF
- Host: GitHub
- URL: https://github.com/opensourcebim/gltfserializers
- Owner: opensourceBIM
- Created: 2016-03-08T07:05:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-01-14T19:26:51.000Z (about 1 year ago)
- Last Synced: 2025-03-24T17:14:40.945Z (11 months ago)
- Language: Java
- Homepage:
- Size: 210 KB
- Stars: 18
- Watchers: 8
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GltfSerializers
This is mainly just a demo, but it might evolve into a useful glTF serializer with a bit more effort.
##
> Note: This plugin only works with the (yet unreleased) version 1.5 of BIMserver
## Implemented:
- https://github.com/KhronosGroup/glTF/blob/master/extensions/Khronos/KHR_binary_glTF/README.md
- Using vertex-colors where available, otherwise it defaults to a set of predefined type-colors
> Update glTF 2.0 does not use an extension anymore but natively supports embedding all data in one binary file. This is now also implementen as the glTF 2.0 serializer in this plugin.
## Usage
- Install this plugin
- Download .glb files of your models with the "Binary glTF Serializer"
## Using with CesiumJS
- You can use a little bit of boilerplate code from the CesiumLoader project
- https://github.com/opensourceBIM/CesiumLoader
## TODO
- Convert to meters (the default length unit in glTF and Cesium) server-side
- Transparency does not seem to work (for window for example)
- Better default colors for objects with no vertex-colors
- Implement non-binary version as well
- Use object instancing
- Actually reuse vertices (requires a BIMserver change as well, vertices are now stored on a per-object basis). At the moment all object's vertices array are just concatenated into one big buffer (with separate views for each object).
- Do something with the normals in the shaders (maybe add some lights to the scene as well, not sure how that works in Cesium)