Collada to glTF web converter

Hi all

After spent some time looking in the current threads in the forum and also try some troubleshooting I am here to share my problem.

The web too to convert from COLLADA to glTF in Cesium website is able to convert the ..\SampleData\models\CesiumMilkTruck\CesiumMilkTruck.dae file. And the tool is also able to show the result. But SandCastle can't load the generated gltf file. The error message is 404 (The specified blob does not exist.) in RuntimeError.js line 42 (Cesium 1.8).

Another dae file (see attached) generates the error bellow during the conversion:

An error occurred while rendering. Rendering has stopped.
RuntimeError: Failed to load external image: blob:http%3A//cesiumjs.org/Scania/__auto_7.jpg
Error
    at new t (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:418:6883)
    at http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:441:2889
    at Object.then (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3023)
    at http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3501
    at f (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:4883)
    at m (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3637)
    at n (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3161)
    at Object.then (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3023)
    at http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:3511
    at f (http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js:417:4883)

This dae file was exported from a KMZ file in SketchUp 15.3.331 64 bit.

Can you support me?

I was not able to attach the file. Here is on Dropbox

For your first error, it sounds like you’re code to load the milk struck glTF file is incorrect or pointing to the wrong place.

The second error is the result of uploading a model without all of its associated textures (or having textures but with incorrect paths). The conversion succeeds, but load will fail because we can’t find the required textures. Simply supply the textures and everything should work. We plan on fixing the crash in the future by using a default texture instead when one can’t be found.

Thank you, Matthew! You are quick to answer!

I solved the problem with the texture. In order to make easier to work, I put my new model in the same folder as CesiumMilkTruck:

..\Apps\SampleData\models\CesiumMilkTruck

There I also put the texture folder with the file generated by SketchUp. The conversion works fine and I can see the truck in the web converter tool after the conversion has finished.

Now my new model issues the same first error:

404 (The specified blob does not exist.)

And no, is not pointing to the wrong place. To make sure I just converted CesiumMilkTruck.dae to CesiumMilkTruck2.gltf (we already have the original version CesiumMilkTruck.gltf). Then I tested with SandCastle only adding '2' in the end of the filename in line 40 of 3D model template application. It should work as the original file works. But it didn't work...

I am almost sure I am doing something wrong, but I am not what.

Could you try reproduce the same in your computer, please?

1 - Convert CesiumMilkTruck.dae to CesiumMilkTruck2.gltf in the same folder (we already have the texture file CesiumMilkTruck.png).
2 - Change line 40 in 3D model application in SandCastle adding 2 in the filename.
3 - Try to run.

Thank you very much!

My fault, Matthew.

I was using the web SandCastle. And, of course, it is not able to reach my local folder...

Thank you!

Hi Matthew,

Any idea of when the refactor for default textures will be released? I'm using the collada2gltf command line tool to create my gltf files, and the output doesn't have a .jpg file for texturing. Currently, attempting to load this into Cessium causes an error at lines 107-110 in Cesium.Data.SourcesModelVisualizer.