I created a textured and animated test model in Cinema 4D. ( A basic cube rotating for 1 second - 25 frames).
Successfully imported the DAE file into three.js.
Model geometry renders perfectly.
Baked textures render perfectly.
Animation… stuck.
I’ve researched multiple resources in an attempt to access and use the animation but was unsuccessful. I’ve found it difficult trying to work off of the three.js docs too. I need help to code the animation part in three.js.
I have the HTML file and the Collada file available for perusal but not sure whether to post here in this window or send files directly somehow, any suggestion?
Pure keyframe animations are not supported by ColladaLoader. Try to convert your file to glTF and load it with GLTFLoader instead. You can use the following tool for the conversion.
COLLADA2GLTF isn’t working for me on this one (I get an error — worth filing a bug, I suspect) but loading the DAE into Blender, setting playback range to 0-20, and exporting does give working animation.
Thanks guys I’m on Mac only at this stage and I notice glTF 2.2 Mac support is still in dev, so failing conversion of my original keyframe based Collada file to glTF, whats the next best option? I noticed Don mentioned the online converter and I did go to that site and spent a fair amount of time trying it, the model would upload and appear correctly in the screen but nothing else would happen, ie no glTF model was returned.
Unless I’ve missed something it may be easier to continue learning Blender and export straight from there for models requiring animation in three.js? Any suggestions?
Do you refer to COLLADA2GLTF? It’s a little bit unfortunate that there are no compiled binaries for Mac. When I try to build the project on macOS, make reports several build errors
Working with Blender might give you more flexibility. You can use the following tool to export your assets from Blender to glTF.
Yes correct COLLADA2GLTF.
Yes I will do a Blender test. If people are getting working animations from the Blender export method it will be a viable solution to the animation problem.
Thank you for the Blender glTF tool suggestion.