Comments (2)
Until recently, the b3dmToGlb
command did extract the GLB data from the B3DM, and (always) upgraded it with gltf-pipeline
. In version 0.3.0 this was changed: The goal was to make sure that the b3dmToGlb
function really extracts the true data, as-it-is.
But... yes, "as-it-is" currently means that it does include the padding bytes. And this may not be the smartest thing to do. I can not imagine a reason why someone would want these bytes in a GLB file. They are not part of the GLB itself. They are only required for the validity of the B3DM. But tools that only want the GLB data might choke on these unnecessary bytes.
This was already fixed in the 3d-tiles-validator
, via CesiumGS/3d-tiles-validator#258 (with a stripPadding
function). But the 3d-tiles-tools
still extract that whole data.
I'm a bit on the fence about where exactly the padding bytes should be omitted. Reading B3DM data into a TileData
object can be done like this:
const tileData = TileFormats.readTileData(b3dmBuffer);
const glbBuffer = tileData.payload;
This glbBuffer
then is the GLB buffer, including the padding. And I think that it should still contain the padding, because ... that's what it is. But for the command-line functions that write GLB data to files, the padding bytes should definitely be omitted before writing the files. So there should probably be a "public" convenience function like that stripPadding
from the validator, which is called before writing the actual file data.
I'll address that in a PR soon (including some other, minor issues).
from 3d-tiles-tools.
This might now already be fixed with #83 . The "roundtrip" of GLB->B3DM->GLB should now result in a GLB file without the padding bytes.
from 3d-tiles-tools.
Related Issues (20)
- Questions about how to respond to errors during installation using yum in CentOS 7 HOT 5
- Document and extend the functionality of `createTilesetJson`
- Consider a command to re-compute bounding volumes
- missing BATCH_LENGTH property in b3dm files HOT 5
- ReferenceError: performance is not defined HOT 3
- `glTF model references separate files but no resourceDirectory is supplied` Error when upgrading legacy 3d tiles HOT 15
- Unable to set cartographic position while creating tileset.json HOT 3
- How to use the pipeline tool HOT 7
- Combining discards transforms of input tilesets
- Can a model be converted into multiple b3mm/i3mm to form a tiles set? HOT 4
- Creating b3dm results in loss of original attributes HOT 10
- Implement LOD grading for tiles HOT 8
- Unknown argument: convertB3dmToGlb error while executing 3d-tiles-tools HOT 1
- Texture transform is not written for property textures HOT 1
- Cannot extract data from GLB without BIN chunk
- The issue after merging 3dtiles HOT 2
- Merged tileset resolution HOT 16
- Consider pinning the Node version to a specific number
- Upgraded New York City b3dm tiles, but data not rendered using CesiumJS v1.113 HOT 15
- Fix legacy oct-encoded normals in glTF as part of `upgrade`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3d-tiles-tools.