CesiumGS / cdb-to-3dtiles

Convert CDB to 3D Tiles
Apache License 2.0
76 stars 28 forks source link

Fix padding in combineGltfs #68

Closed lilleyse closed 2 years ago

lilleyse commented 2 years ago

I noticed some byte offset issues when loading the GTModels tileset and tracked it down to incorrect padding in combineGltfs. I did a quick search for other areas that handle padding and it seems like only this area has the problem.

A 3D tile failed to load: http://localhost:8002/static/Desktop/temp/CDB_yemen/Tiles/N12/E045/GTModels/2_1/N12E045_D101_S002_T001_L5_U24_R0.glb
Error: Failed to load model: http://localhost:8002/static/Desktop/temp/CDB_yemen/Tiles/N12/E045/GTModels/2_1/N12E045_D101_S002_T001_L5_U24_R0.glb
Failed to load glTF
Failed to load index buffer
start offset of Uint32Array should be a multiple of 4
A 3D tile failed to load: http://localhost:8002/static/Desktop/temp/CDB_yemen/Tiles/N12/E045/GTModels/2_1/N12E045_D101_S002_T001_L5_U25_R0.glb
Error: Failed to load model: http://localhost:8002/static/Desktop/temp/CDB_yemen/Tiles/N12/E045/GTModels/2_1/N12E045_D101_S002_T001_L5_U25_R0.glb
Failed to load glTF
Failed to load index buffer
start offset of Uint32Array should be a multiple of 4
lilleyse commented 2 years ago

I don't think this fix should be too controversial so I'm going to go ahead and merge.