Sketchup 2018 > dae > COLLADA2GLTF > gltf > gltf-pipeline > glb > OL-Cesium

1. A concise explanation of the problem you're experiencing.

I have locally installed both COLLADA2GLTF and gltf-pipeline. I can't find the right command line flags to take my .dae file from Sketchup, and run it through both COLLADA2GLTF and gltf-pipeline to create a viable .glb file for use in OL-Cesium.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

Supposing I start with an export from SketchUp: sketchup.dae
I ran the following commands:
/COLLADA2GLTF/bin/Release/collada2gltf -f ./sketchup.dae -o ./sketchup_gltf
node /gltf-pipeline/bin/gltf-pipeline.js -i ./sketchup_gltf.gltf -o ./sketchup_glb.glb -b --cesium

This only creates the following 1kb file: sketchup_glb.glb

Can someone please give me the appropriate command line calls/flags to create a glb for the following pipe:
Sketchup 2018 > dae > COLLADA2GLTF > gltf > gltf-pipeline > glb > OL-Cesium

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am trying to Load a Sketchup2018 .dae model into OpenLayers Cesium.

4. The Cesium version you're using, your operating system and browser.
Cesium: ol-cesium-v1.27 (based off OL 4.1.1 and Cesium 1.33)

Are you able to identify which step causes the problem? Also feel free to send over the model if that’s easier.

If I had to guess, I would say it is failing in the gltf-pipeline command to turn the gltf into a glb, but I can't be sure, because I don't know if I even have the command flags set properly. I can send the model, but I would like to teach myself to perform this operation locally for the future.

Any hints on the proper flags?
What is the best way to send the model?

Both sets of command flags look ok to me.

If you just run COLLADA2GLTF does the glTF look correct?

You can send the model to me at

Inputting the retail.dae,
the output from COLLADA2GLTF contains the following:

-rwx------ 1 root root 48M Dec 14 15:29 retail.dae*

-rw-r--r-- 1 root staff 19M Dec 18 15:18 retail1.bin
-rw-r--r-- 1 root staff 2.3M Dec 18 15:18 retail1.gltf
-rw-r--r-- 1 root staff 366B Dec 18 15:18 retail10FS.glsl
-rw-r--r-- 1 root staff 343B Dec 18 15:18 retail10VS.glsl
-rw-r--r-- 1 root staff 413B Dec 18 15:18 retail11FS.glsl
-rw-r--r-- 1 root staff 343B Dec 18 15:18 retail11VS.glsl
-rw-r--r-- 1 root staff 211B Dec 18 15:18 retail12FS.glsl
-rw-r--r-- 1 root staff 228B Dec 18 15:18 retail12VS.glsl

I will send the .dae to your email. Thanks!

Thanks I got your files.

I’m having issues with the master branch of COLLADA2GLTF. The file seems to export correctly but I can’t load it in Cesium. I then tried converting with the 2.0 branch and it actually converts correctly. You may want to use that instead. The only difference is to use -i instead of -f to specify the input file.

gltf-pipeline still only works on glTF 1.0 models, so for the time being I would recommend checking out some of the tools listed here for doing the gltf to glb conversion.

Thanks Sean,

I was able to create a gltf with v2.0 but I can't get it to show up in ol-cesium, and I couldn't create the glb (I tried to just load the gltf). Can you send me your gltf model you created? I can send you my dae again if needed.

Oh I forgot that COLLADA2GLTF (2.0) can export to binary as well. So the full command to get a glb is: COLLADA2GLTF-bin.exe -i model.dae -b

I loaded both the gltf and glb in Cesium successfully. You might have to open an issue in the ol-cesium project.

I’ll email you a link to the converted model.