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)
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?
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.
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.