Animations are driving me crazy

Planning and Development

The reality is that the pipeline to use animated models exported from Blender into THREE.js just isn’t really ready yet.  The glTF format is recommended for importing models into THREE.js going forward, but the Blender glTF exporter isn’t complete.  It can only export a single animation per file, which is obviously insufficient for a game.  Someone is working on improving the glTF exporter, but it’s impossible to know when that work will be done.  I saw a thread on the THREE.js Discourse site mentioning the possibility of adding the option to play animations based on a range of frames.  That would work just fine.  I could just put the idle animation in the first 30 frames, the walk animation in the next 30, the run in the next 30, etc.  Unfortunately this improvement isn’t on the roadmap for any particular release, so it may not ever be included.

I think that for now, until the glTF exporter is improved, I’m going to use FBX files.  I don’t like that it’s a proprietary format, but it works in Blender and THREE.js today.  Since the source files are all saved in Blender anyway, so when the glTF exporter is completed I can just re-export everything in that format then modify the game’s code to import glTF files.  This creates more work for me in the long run but it also provides a way to move forward with the development of Lyridia.

Leave a Reply

Your email address will not be published.