Can't get collada files to convert to glTF properly

I need some help, nothing I've tried seems to work.

First I tried exporting from 3ds Max (the source files are .max), I tried dragging the .dae file exported from 3ds Max to the online glTF converter. It gives me a resulting .glTF file that is 1kb and has no mesh data.

2nd I tried exporting to collada with Blender. Unfortunately Blender seems to drop my textures, but dragging the .dae to the online glTF converter resulted in what appeared to be a valid glTF file (without textures). The model even showed up in the little window. However, when I tried to load the model into my cesium app I get an error saying "RangeError: Invalid array length".

3rd I tried exporting as collada with Open 3D Model Viewer (Uses Open Asset Importer). From here I was able to export what seemed like a valid collada file with textures. I tried dragging it onto the glTF converter, it gave me what appeared to be a valid glTF file, but the model never showed up in the little preview window. When trying to load this glTF file I got the same error as above "RangeError: Invalid array length".

Unfortunately I can't send the models to anyone, but I've even tried just exporting a simple sphere from 3ds Max with the same result, the converter just barfs on the 3ds max exported collada files.

Anyone have any idea how to get these models converted?

Can you share the COLLADA for the exported sphere from 3ds max?

Patrick

Make sure when you export a Collada .dae from Blender, that you check “Include UV Textures” and “Include Material Textures” under Texture Options.

Note: Blender is the only thing I’ve had success with. I’ve even tried the open collada plugin for 3DS Max and Poly Trans.

Thanks Ben. You reminded me that we started “An Artist’s Guide to glTF” but have not published it yet. Here is a draft:

https://github.com/pjcozzi/Articles/blob/master/Cesium/glTFArtistGuide/index.html

I will add the “Include Material Textures” option if you don’t mind.

Patrick

Also, if you create your models in 3DS Max, the following may help:

  1. Texture images need to be web friendly (e.g. jpg or png).
  2. Move your textures to where the .max file is located.
  3. Name your material maps in the material editor to match the texture image they are linking to.
  4. Export your FBX to the same folder as the texture maps.
  5. Import to Blender and export to Collada with the above mentioned texture options checked.

No Problem.

Thanks! We’ll add you to the acknowledgements for the article. Do you have a website we can link to?

Patrick

I dropped my website, but I guess you could use http://3dben.deviantart.com/

We posted the blog on glTF tips: http://cesiumjs.org/2014/12/15/glTF-Tips-for-Artists/

Patrick

The blog post lightly touched on it, but another post or some more tips for getting animations to work well in cesium would be a big help. I had a bear of a time getting animations to work, and went through a lot of permutations figuring out how to bring things all together.

Good idea! I’ll make a note. Do you have any tips you can share with us?

Patrick

Baking seemed to be the key to getting things to come together. You need to carefully build the keyframes necessary to get the animation to work well, then bake them in and they should work in gltf.

Blender seemed to be the best tool to use to export good collada to work well with the converter, as it had the most options for adjusting the collada export.

Hi Denver,

I’m also using Blender to export collada and convert online to gltf. But I often ends up with dark object, or no texture object. (i did check the include UV and material options when I export.) I also tried “shadeless” but looks a bit strange. I guess something trick about the lighting?

It’ll be great if you could share with us some tips of handling textures, animation when converting gltf.

Best,

Narco

在 2015年1月7日星期三UTC+8下午12时31分02秒,Denver Pierce写道:

Nacro … I often ends up with dark object.

One thing that comes to mind is to make sure your faces are not flipped.

Blender includes a lamp and camera in the scene by default. Make sure you delete those.