Hi everyone!
To give a little bit of context, lately I have been playing around with 2d animations for the game that my friends and I are making. It is supposed to be high resolution and high framerate animation, so going with pure frame-by-frame animation (either in a spritesheet or individual sprites) seems to be out of the question due to huge memory consumption. Ex. 1024x1024 character with 60 frames per second would result in roughly 1.4GB loaded for a second of animations (If a single 1024x1024 is roughly 4MB). Please correct my math if I am wrong somewhere, but either way it scales terribly 😃.
The style of animation would really benefit from a mix of cutout animation with some mesh deformations, along with a few different frames for individual parts of an animated entity. So I tried the following approaches (You can skip this if you are not interested 😃):
- Using Godot Animation system. It provide quite difficult and time consuming to create complex animations using the native Godot animation system (which is understandable). On top of that, the IK constraints seem to bug out pretty badly when flipping a character, making it unusable for our use-case.
- Using DragonBones with extension for Godot. This does seem to work, but DragonBones lacks more complex bone control, frame-by-frame for individual parts seems to require a lot of gymnastics to achieve, and the mesh deformation is not the best. So for our use case, it is not the best option.
- Using Blender, as it can be exported directly into Godot. The problem here is, it is interpreted as a 3d scene, which is understandable, given the fact that this is its primary function. There is also the option of using COA Tools in Blender, exporting to DragonBones format, and then importing it into Godot through DragonBones extension. This is fine, as long as one does not need mesh deformation feature, as that seems to be lacking in the export to DragonBones. Also the developer of COA Tools is not updating it consistently, so it is a concern when encountering some specific issue. There's also COA Tools 2, but that didn't really work out as planned.
There's also the paid software which could probably do the job (particularly Spine, as it has extension support for Godot), but I had an idea recently that I wanted to brainstorm with whoever is willing here.
What if I created a Blender python plugin, which exports the created bone rig (bones to sprites connections as well as bones to mesh vertices connections) and all animations (locations of bones in individual frames for each animation) in a JSON/XML format that represented the particular Blender project as if it was in 2D space. After that, a Godot extension could interpret this file and recreate a Godot 2d scene based on that, as well as all the animations (and all that goes along with the animations).
Is this a viable approach? Do you think I am looking over some significant technical hurdle?
It seems like some solution like this would improve the 2d animation options in Godot, since I have not seen much support for any 2d animation software other than Spine, and a little bit for DragonBones.
Anyways, sorry for the long post, hopefully we have a fruitful discussion about this 😃.
TLDR; I wanna make a solution for integrating Blender 2D animations as 2D scenes in Godot. Let's discuss 😃