Hy
I tried to convert my collada file to the glTF. However I get an unknown error back.
I attached the collada file.
Andy
Glider_v2.dae (385 KB)
Hy
I tried to convert my collada file to the glTF. However I get an unknown error back.
I attached the collada file.
Andy
Glider_v2.dae (385 KB)
Thanks for the sample file. This looks like a bug in the converter. I filed an issue and will let you know when it’s fixed.
I too am having trouble with the Collada to glTF converter. I get the following message, “An error occurred while rendering. Rendering has stopped.” followed by, "RuntimeError: Failed to load image: … "
So I tried to convert a box without a texture and received, “An unknown error occurred.” I also tried to convert a model I have previously converted; but this didn’t work either.
Would it be possible to download a previous version of the converter?
Ben, can you share one of the models you are trying to convert that is failing? Can you successfully convert one of the sample models that is included with Cesium? For example the plane model in Apps\SampleData\models\CesiumAir should convert without any problems. (I just tried it myself to be sure).
How are you creating the models? There’s a troubleshooting section in the 3D models tutorial: http://cesiumjs.org/2014/03/03/Cesium-3D-Models-Tutorial/ that might help you.
I’m getting very inconsistent results. I thought I had solved the problem by changing the name of the model (within 3DS Max) so it was not the same as the material name. By doing so I successfully convert a box. So I tried the same approach with my aircraft without success. There was one change however; instead of getting an unknown error, I received, “RuntimeError: Failed to load image…”. I exported the box a second time and now it’s not working. Everything was done the exact same way, only one works and the other does not.
See attached models.
My process is as follows:
Build or modify a model in 3DS Max 2015.
Apply an Unwrap UVW modifier.
Convert the model to an editable mesh.
Export as Autodesk (*.FBX)
Import fbx model into Blender 2.72 after deleting the default Camera, Cube, and Lamp.
Export as Collada (dae) with default settings except for checking “Include UV Textures” and “Include Material Textures”
My browser is Chrome.
F-4E_nope.zip (297 KB)
F-4E_yep.zip (297 KB)
I conducted some additional tests and did have success by keeping all my development files (i.e. max file, texture image, fbx, and dae) all within the same folder.
Thanks, we’ll make a note to add this to the glTF Tips for Artists. Let me know if you have any other new tips.
Patrick
There seems to be a problem when the Collada file (.dae) uses the same .jpg image multiple times, like
<library_images>
...
<image id="ID2135">
<init_from>untitled/texture_1.jpg</init_from>
</image>
<image id="ID2148">
<init_from>untitled/**texture_2.jpg**</init_from> <== same .jpg
</image>
<image id="ID2256">
<init_from>untitled/**texture_2.jpg**</init_from> <== same .jpg
</image>
</library_images>
The converter gives no errors but when it tries to display the model you get an error: “RuntimeError: Failed to load image: blob:https%3A//cesiumjs.org/untitled/texture_2.jpg”. This only happens with ‘regular’ gltf, conversion to Binary gltf works fine.
In the .gltf there is a reference to the missing file, that was not converted to a “data:image/jpeg;base64…” like the other ones:
“ID2256”: {
"uri": "untitled/texture_2.jpg"
}
I edited the .gltf to replace the uri to fix this. I suspect it is a bug in the converter, the .dae file is shown without problems in Visual Studio.
Thanks, Willem
Andreas, we just posted an update to the ModelConverter that fixes the problem with your Glider_v2.dae file. Basically the model didn’t have a material defined, which is valid according to the Collada specification but lists the behavior as undefined (i.e. an application is free to treat it as an invalid file). Since that is not ideal, we not treat geometry with undefined materials as white, which is similar to other viewers we tried.
With the latest converter, your F-4E_nope.zip converts fine for me. The only problem I encountered was the fact that your texture in the dae and resulting gltf has an absolute path, which causes the absolute path to be maintained in the output file (and also not be embedded). The online converter expects all image paths to be relative to the dae file or it won’t be able to find them in the zip.
wow perfect thx a lot!
Hmm yes no material was defined thats correct!
Thanks. I’ll start making my texture paths relative.
For others using 3DS Max, you can do this via the “Asset Tracking” panel or by using the “Bitmap/Photometric Path Editor” found under the Utilities tab.