Godot: Feature- dragonbones json animation data importer

Created on 13 Apr 2016  Â·  60Comments  Â·  Source: godotengine/godot

This came out as a hot topic on the godot facebook group.

Right now the open source community is looking for an open standard json file format that stores animation data in the form of keyframes.

We have an addon for blender that does that already:
https://github.com/ndee85/coa_tools
It is compatible with Godot too!

What are the technical advantages of having game animation stored as a json file+ an image atlas?

  • Your game uses much less memory - as only one frame is used and the animation (movement of body parts) is being driven by the game engine's runtime. You get better framerate!
  • Your animation can be procedurally altered during runtime - since the runtime is driving it, the programmer can layer ontop or override animations. For example you can have your player character's head turn in the direction of a specific object on the screen.
  • Your game/app uses much less HD space - smaller file size makes it much better for mobile development where file size is important.
  • You can swap body parts of your character, as the animation is running. This makes it very easy to implement an equipment system that actually affects the way your character looks or reuse the same animations an all the enemies you want in the game - while having them look different.

What other software can use this technique and export animation data to a json file?

  • Spine 2d
  • Spriter
  • Creature
  • anime studio
  • toonboom harmony

Popular games that use it:

  • rayman origins, rayman legends, dragon's crown, etc etc

What open source software can do this already?

  • Godot and Blender (via coa tools)

The problem with the json file format, the game runtime and the lack of one open standard:
The three major competing applications for cut out game animation do basically the same things. However as a means to lock their users to their product, the structure of the json files they output is different. That forces game developers to have to rewrite a new run time for each of the three - that parses the data accordingly. What is worse - they put a license on their runtimes that prohibits anyone else - who does not own the license to their software to use their runtimes.

To sum it up:
We need a json file specification that is open - one that can work on all game engines without the need to purchase a license from someone.

Somehow this json specification must be kept compatible in all open source editors or runtimes - so as to not have to duplicate effort to implement new runtimes for each game engine.

Perhaps we need to create a new github/web page for it? One that describes the structure of the specification - and makes it easy for other developers to implement exporters/importers/runtimes.

If we coordinate this between all open source projects that have interest in exporting json animation data - all can benefit from one runtime! In return that runtime will also benefit from them as well - becoming more widely used and supported than it's proprietary counterparts.

archived discussion feature proposal

Most helpful comment

The dragonbone module is comming soon :)

All 60 comments

Ummm... obligatory xkcd

dragonbones seems to be a good fit. it's open source , has the majority of runtimes and they are all under a MIT license that does not require anyone to buy anything to use them.

The new website:
http://dragonbones.com/

I forwarded it to @ndee85

http://dragonbones.com/
The dragonbones json data format
https://github.com/DragonBones/DragonBonesJS/blob/master/docs/DragonBones_4.5_data_format_zh.md

[note: although the comment lines are in Chinese, google chrome's "translate this page" seems to make a good job of turning it into English]

I am pasting it bellow:

{
     // DragonBones data name 
    " name " :  " dragonBonesName " ,

    // Data version 
    " Version " :  " 4.5 of 5 " ,

    // Animation frame rate 
    " The frameRate " :  24 ,

    // Whether to use absolute data [0: use relative data, 1: absolute data] (optional attribute default: 1) 
    " isGlobal " :  1 ,

    // Custom data [any type of] (optional attribute default: null) 
    " userData " :  null ,

    // List skeleton 
    " Armature " : [{

        // Skeleton name (may contain a plurality of matrix data DragonBones) 
        " name " :  " armatureName " ,

        // Animation frame rate (Optional attributes Default: use the global frame rate) 
        " frameRate " :  24 ,

        // Animation type (optional attribute default: "Armature") 
        // [ "Armature": skeletal animation, "MovieClip": basic animation, "Stage": scene animation] 
        " of the type " :  " Armature " ,

        // Custom data [any type of] (optional attribute default: null) 
        " userData " :  null ,

        // Add to the default behavior of the list after the stage (optional attribute default: null) 
        " defaultActions " : [

            // This skeleton play the specified movie 
            [ " gotoAndPlay " , " animationName " ],

            // This player skeletons specify the animation and stop 
            [ " gotoAndStop " , " animationName " ],
        ],

        // This skeleton contains bones list of 
        " Bone " : [{

            // Bone name 
            " name " :  " BoneName " ,

            // The name of the parent bone 
            " parent " :  " parentBoneName " ,

            // Custom data [any type of] (optional attribute default: null) 
            " userData " :  null ,

            // Register to displacement of bone skeleton / miter / zoom (optional attribute default: null) 
            " the Transform " : {
                 " X " :  0.00 , // horizontal displacement (optional attribute default: 0.00) 
                " Y " :  0.00 , // vertical displacement (optional attributes default: 0.00) 
                " SKX " :  0.0000 , // horizontal skew (optional attributes default: 0.0000) 
                " SKY " :  0.0000 , // vertical miter (optional attributes default: 0.0000) 
                " SCX " :  1.0000 , // vertical scaling (optional attribute default: 1.0000) 
                " SCY " :  1.0000 , // vertical scaling (optional attribute default: 1.0000)
            }
        }],

        // This skeleton contains a list of slots 
        " The slot " : [{

            // Slot name 
            " name " :  " slotName " ,

            Bone names // slot belongs to 
            " parent " :  " parentBoneName " ,

            // Index default display object (optional attribute default: 0) 
            " DisplayIndex " :  0 ,

            // Mixed Mode (Optional attributes default: null) 
            " the blendMode " :  null ,

            // Custom data [any type of] (optional attribute default: null) 
            " userData " :  null ,

            // Display object color overlay (optional attribute default: null) 
            " Color " : {
                 " aM " :  100 , // superimposed transparent [0 to 100] (optional attribute default: 100) 
                " rM " :  100 , / / superimposed in red [0 to 100] (optional attribute default: 100) 
                " gM " :  100 , // green superposition [0 to 100] (optional attribute default: 100) 
                " bM " :  100 , // blue superimposed [0 to 100] (optional attribute default: 100) 
                " aO " :  0.00 , // transparent offset [-255 to 255] (optional attribute default: 0) 
                " rO " :  0.00 , // red shift [ -255 to 255] (optional attribute default: 0) 
                " gO " :  0.00 , // green bias [-255 to 255] (optional attribute default: 0) 
                " bO " :  0.00 , // blue offset [-255 to 255] (optional attribute default: 0)
            },

            // Add to the list of behaviors after stage (optional attribute default: null) 
            " Actions " : [

                // Specify the animation sub-frame playback (only displayed when an object is an effective framework) 
                [ " gotoAndPlay " , " animationName " ],

                // Specify the animation and the sub-frame playback stop (only displayed when an object is an effective framework) 
                [ " gotoAndStop " , " animationName " ],
            ]
        }],

        // This skeleton skin contains a list of 
        " Skin " : [{

            // Skin name 
            " name " :  " skinname " ,

            // This skin contains a list of slots 
            " The slot " : [{

                // Slot name 
                " name " :  " slotName " ,

                // Display a list of objects in this slot contains 
                " the display " : [{

                    // Display object name 
                    " name " :  " displayName " ,

                    // Display the object type (optional attribute default: "Image") 
                    // [ "Image": map, "armature": skeleton, "mesh": grid, ... other extended type] 
                    " of the type " :  " Image " ,

                    // Display object relative to the displacement of the bone / miter / zoom (optional attribute default: null) 
                    " the Transform " : {
                         " X " :  0.00 , // horizontal displacement (optional attribute default: 0.00) 
                        " Y " :  0.00 , // vertical displacement Y (optional attributes default: 0.00) 
                        " SKX " :  0.0000 , // horizontal skew (optional attributes default: 0.0000) 
                        " SKY " :  0.0000 , // vertical miter (optional default attribute: 0.0000) 
                        " SCX " :  1.0000 , // vertical scaling (optional attribute default: 1.0000) 
                        " SCY " :  1.0000 , // vertical scaling (optional attribute default: 1.0000)
                    },

                    // Display object's pivot point (Optional attributes Default: null, valid only map or grid) 
                    " Pivot " : {
                         " X " :  0.50 , // horizontal axis point [0.00 to 1.00] (optional default attribute: 0.50) 
                        " Y " :  0.50 , // vertical axis point [0.00 to 1.00] (optional attributes default: 0.50)
                    },

                    // UV vertex coordinate list (Optional Attribute Default: null, valid only for the grid) 
                    // [U0, V0, U1, V1, ...] 
                    " UVs " : [ 0.0000 , 0.0000 , 1.0000 , 0.0000 , 1.0000 , 1.0000 , 0.0000 , 1.0000 ],

                    // Triangle vertex index list (Optional Attribute Default: null, valid only for the grid) 
                    " triangles " : [ 0 , 1 , 2 , 2 , 3 , 0 ],

                    // Vertex coordinates relative to the display list object pivot point (Optional attributes Default: null, valid only for the grid) 
                    // [X0, Y0, X1, Y1, ...] 
                    " in the vertices " : [ - 64.00 , - 64.00 , 64.00 , - 64.00 , 64.00 , 64.00 , - 64.00 , 64.00 ],

                    // Vertex Weight list (Optional Attribute Default: null, valid only for the grid) 
                    // [amount of bone, bone index, weight, ..., ...] 
                    " weights " : [ 1 , 0 , 1.00 , 2 , 0 , 0.50 , 1 , 0.50 ],

                    // Skin slot register matrix transformation (Optional attributes Default: null, valid only for the grid) 
                    // [A, B, C, D, TX, TY] 
                    " slotPose " : [ 1.0000 , 0.0000 , 0.0000 , 1.0000 , 0.00 , 0.00 ],

                    // Matrix transformation skinned mesh registration (optional attribute default: null, valid only for the grid) 
                    // [bone index, A, B, C, D, TX, TY, ...] 
                    " bonePose " : [ 0 , 1.0000 , 0.0000 , 0.0000 , 1.0000 , 0.00 , 0.00 ]
                }]
            }]
        }],

        // Ik This contains a list of constraints skeleton 
        " IK " : [{

            // Ik constraint names 
            " name " :  " ikName " ,

            // Bind the bone name 
            " Bone " :  " BoneName " ,

            // Target bone name 
            " target The " :  " ikBoneName " ,

            // Bending direction (optional default attribute: to true) 
            // [to true: positive direction / clockwise, false: the opposite direction / CCW] 
            " bendPositive " :  to true ,

            // Skeleton chain length (optional attribute default: 0) 
            // [0: only constraint bone, n: n constraints bone and bone up grade parent bone] 
            " catena alberghiera " :  0 ,

            // Weight [0.00: no constraint to 1.00: fully constrained] (optional attribute default: 1.00) 
            " weight " :  1.00
        }],

        // Animation list this skeleton contains 
        " Animation " : [{

            // Animation name 
            " name " :  " animationName " ,

            // Loop count [0: loop unlimited, n: n-th loop] (optional attribute default: 1) 
            " playTimes " :  1 ,

            // Animation frame length (optional attribute default: 1) 
            " DURATION " :  1 ,

            // Keyframe animation included in this list (optional attribute default: null) 
            " Frame " : [{

                // Frame length (optional attribute default: 1) 
                " DURATION " :  1 ,

                // Frame events (optional attribute default: null) 
                " Event " :  " eventName " ,

                // Frame sound (optional attribute default: null) 
                " Sound " :  " soundName " ,

                // Frame behavior list (optional attribute default: null) 
                " Actions " : [

                    // This skeleton play the specified movie 
                    [ " gotoAndPlay " , " animationName " ],

                    // This player skeletons specify the animation and stop 
                    [ " gotoAndStop " , " animationName " ],
                ]
            }],

            // Skeletal animation timeline included in this list (optional attribute default: null) 
            " Bone " : [{

                // Timeline name (with bone names correspond) 
                " name " :  " BoneName " ,

                // Timeline zoom (optional attribute default: 1.00) 
                " Scale " :  1.00 ,

                // Timeline Offset (Optional attributes default: 0.00) 
                " offset " :  0.00 ,

                // Keyframe timeline included in this list (optional attribute default: null) 
                " Frame " : [{

                    // Frame length (optional attribute default: 1) 
                    " DURATION " :  1 ,

                    // Tween easing [0.00: linear, null: no Easing] (optional attribute default: null) 
                    " tweenEasing " :  0.00 ,

                    // Tween easing curve [x1, y1, x2, y2 , ...: Bezier] (optional attribute default: null) 
                    " Curve " : [ 0.00 , 0.00 , 1.00 , 1.00 ],

                    // Frame events (optional attribute default: null) 
                    " Event " :  " eventName " ,

                    // Frame sound (optional attribute default: null) 
                    " Sound " :  " soundName " ,

                    // Bone displacement / miter / zoom (optional attribute default: null) 
                    " the Transform " : {
                         " X " :  0.00 , // horizontal displacement (optional attribute default: 0.00) 
                        " Y " :  0.00 , // vertical displacement (optional attributes default: 0.00) 
                        " SKX " :  0.0000 , // horizontal skew (optional attributes default: 0.0000) 
                        " SKY " :  0.0000 , // vertical miter (optional attributes default: 0.0000) 
                        " SCX " :  1.0000 , // vertical scaling (optional attribute default: 1.0000) 
                        " SCY " :  1.0000  // vertical scaling (optional attribute default: 1.0000)
                    },
                }]
            }],

            // Timeline list Slots This movie contains 
            " The slot " : [{

                // Timeline name (and the name of the corresponding slot) 
                " name " :  " slotName " ,

                // Keyframe timeline included in this list (optional attribute default: null) 
                " Frame " : [{

                    // Frame length (optional attribute default: 1) 
                    " DURATION " :  1 ,

                    // Tween easing [0.00: linear, null: no Easing] (optional attribute default: null) 
                    " tweenEasing " :  0.00 ,

                    // Tween easing curve [x1, y1, x2, y2 , ...: Bezier] (optional attribute default: null) 
                    " Curve " : [ 0.00 , 0.00 , 1.00 , 1.00 ],

                    // Display object index for this frame (skin corresponding slot display a list of objects) (Optional attributes default: 0) 
                    " DisplayIndex " :  0 ,

                    // Display object color overlay (optional attribute default: null) 
                    " Color " : {
                         " aM " :  100 , // superimposed transparent [0 to 100] (optional attribute default: 100) 
                        " rM " :  100 , / / superimposed in red [0 to 100] (optional attribute default: 100) 
                        " gM " :  100 , // green superposition [0 to 100] (optional attribute default: 100) 
                        " bM " :  100 , // blue superimposed [0 to 100] (optional attribute default: 100) 
                        " aO " :  0.00 , // transparent offset [-255 to 255] (optional attribute default: 0) 
                        " rO " :  0.00 , // red shift [ -255 to 255] (optional attribute default: 0) 
                        " gO " :  0.00 , // green bias [-255 to 255] (optional attribute default: 0) 
                        " bO " :  0.00 , // blue offset [-255 to 255] (optional attribute default: 0)
                    },

                    // The player to the current frame, a list of actions performed behavior (Optional attributes default: null) 
                    " Actions " : [

                        // Specify the animation sub-frame playback (only displayed when an object is an effective framework) 
                        [ " gotoAndPlay " , " animationName " ],

                        // Specify the animation and the sub-frame playback stop (only displayed when an object is an effective framework) 
                        [ " gotoAndStop " , " animationName " ],
                    ]
                }],
            }],

            // Freeform animation timeline included in this list (optional attribute default: null) 
            " FFD " : [{

                // Timeline name (and the name of the corresponding skin) 
                " Skin " :  " skinname " ,

                // Timeline name (and the name of the corresponding slot) 
                " name " :  " slotName " ,

                // Timeline name (display object index) 
                " DisplayIndex " :  0 ,

                // Keyframe timeline included in this list (optional attribute default: null) 
                " Frame " : [{

                    // Frame length (optional attribute default: 1) 
                    " DURATION " :  1 ,

                    // Tween easing [0.00: linear, null: no Easing] (optional attribute default: null) 
                    " tweenEasing " :  0.00 ,

                    // Tween easing curve control points list [x1, y1, x2, y2 , ...: Bezier] (optional attribute default: null) 
                    " Curve " : [ 0.00 , 0.00 , 1.00 , 1.00 ],

                    // Vertex coordinate list Index Offset (Optional attributes default: 0) 
                    " offset " :  0 ,

                    // Vertex coordinate list [x0, y0, x1, y1 , ...: relative displacement] (optional attribute default: null) 
                    " in the vertices " : [ 0.01 , 0.01 ]
                }]
            }]
        }]
    }]
}

Dragonbones now also has FFD and mesh binding:
https://www.youtube.com/watch?v=xUfosRr9fY4
https://www.youtube.com/watch?v=XPH_ZBzCtfY

They also released this new feature trailer:
https://www.youtube.com/watch?v=M8QmyDdYjiM

Not interested in such a format, instead I prefer we focus on our internal
animation tools and supporting everything required.

On Sun, Sep 18, 2016 at 6:39 AM, Todor Imreorov [email protected]
wrote:

Dragonbones now also has FFD and mesh binding:
https://www.youtube.com/watch?v=xUfosRr9fY4
https://www.youtube.com/watch?v=XPH_ZBzCtfY

They also released this new feature trailer:
https://www.youtube.com/watch?v=M8QmyDdYjiM

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4312#issuecomment-247837653,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z27Xcg6FrfluCWKYg5NYoDn8v41Bpks5qrQbpgaJpZM4IGs17
.

@reduz
I would be happy when godot gets mesh deformation. I guess the json format is something considering further down the line when godot has those missing features.

I think it would be better to make an importer for Dragonbones files (open source/free) instead of Spine (closed source, 300$, same features).

Dragonbones editor can import spine json animation data and convert it to dragonbones animation data too

@reduz also consider @ndee85 who has a blender animation tool that exports to godot currently.
He wants to add mesh deformation to it's exporter. If godot can use the open json format that dragonbones has, @ndee85 will not have to write several exporters so different game engines can use his tool - animations made with it will work on Unity and all the other 2d game engines that dragonbones currently supports, as well as Godot!

Otherwise you are asking to make an exporter exclusive to godot and if he wants to support the other game engines that can use dragonbones data, he will have to do another exporter for dragonbones

@blurymind Mesh deformation will happen for Godot 3.0, not planned for upcoming 2.2

@reduz Looking forward to it.

The dragonbones editor can convert spine2d animation to dragonbones animation anyways.
http://dragonbones.effecthub.com/features.html

The benefit here is that dragonbones editor is free, the spec is open source and their runtimes are not locking users to any license
https://www.youtube.com/watch?v=YO7JzI-f7sc

The problem with it right now is the sparse english documentation/tutorials

I think it's not Godot's job to come up with yet another standard. Let the animation-focused software design an open standard together, then we can implement it in Godot.

@akien-mga @ndee85 wrote an exporter for dragonbones for his blender addon
https://github.com/ndee85/coa_tools/issues/26

we only need a way to get the data into godot now. The dragonbones animation data has a runtime for unity3d and other mainstream engines btw

I saw that, but that's kind of out of scope of "let's create a new standard for exporting animations", isn't it? :) So my point is that this issue should probably be closed, as it outlived its scope.

You will need to wait for 3.0, as 2D mesh animation is not done yet

On Oct 31, 2016 10:40, "Todor Imreorov" [email protected] wrote:

we only need a way to get the data into godot now. The dragonbones
animation data has a runtime for unity3d and other mainstream engines btw

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4312#issuecomment-257293015,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z21zneyqM03zbidkzjR7CJ7ZDADVvks5q5ey_gaJpZM4IGs17
.

We are using an established open standart instead of creating a new one. My
point is to stop creating new standarts and focus on one!

On 31 Oct 2016 13:27, "Rémi Verschelde" [email protected] wrote:

I saw that, but that's kind of out of scope of "let's create a new
standard for exporting animations", isn't it? :) So might point is that
this issue should probably be closed, as it outlived its scope.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4312#issuecomment-257293058,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGMbVS7fyTuQV8CyZ0TXTDCSqeYGCqBqks5q5ezUgaJpZM4IGs17
.

If everyone uses the same json data structure to store animations, it will be less work for everyone to write new runtimes/exporters/importers.
It will also motivate more animation software devs to support it. The reason I am pushing for Dragonbones, is that it already has good support/community, it's open source and is documented :)

@reduz I know mesh deformation is not done yet, I guess my issue ticket here is for the future, when godot supports it- to make an importer (for Godot) for json dragonbones animation data file type.

The advantage of having it in a file is that other software such as dragonbones editor and even blender can edit it/overwrite it/etc - not just godot.

Blender is much better suited for animation authoring- it has a much better graph editor and dopesheet, much more advanced rigging tools

We just need a DragonBones importer, which can be done in 3.0. This request is much simpler and has nothing to do with the title nor the original post. I don't think Godot has power to enforce an animation format standard anyway.

Data in this issue thread can help make an importer. Earlier i posted the Schema/data structure specification of the dragonbones json file type

Dragonbones animation is now officially supported by cocos2d/cocos creator:
http://discuss.cocos2d-x.org/t/cocos-creator-1-3-0-released/33094
no need for addon or runtime- it's built into the game engine/editor

Responding to the call of users, we have added Dragon Bones ( a very popular skeleton animation editing tool) support in this version. DragonBones component and Spine component works similar. You just need to create a node with DragonBones component, and drag exported DragonBones animation data and image data into the component then it's ready to be played in your scene. You can also customize the properties of the component such as default animation, playback speed and cycle times easily in editor.

Other open source game engines are picking it up as well

@vnen I changed the title. You are correct

+1 for DragonBones support, it's a great tool, in my opinion even better than expensive Spine ($300).
Any chance for DB support in Godot 3.0? :)

Technically we just need the db runtime in godot. The animation can be created in blender now.

But it would be nice to also have the editing capabilities in godot. That would however mean the need to implement skin weights authoring capabilities in godot among other things

@reduz @blurymind
On second thought, it might be a much better idea to just add missing features to internal godot animation tool, instead of trying to handle all different formats (Creature, DragonBones, Spine, Spriter) of 3rd party tools.

Pros:

  • one app less to learn, rely on (or even pay for!)
  • no broken hot new features in the future (when one of the 3rd party tools adds something new and it's not yet supported by Godot)
  • can freely add new features that not exist in the 3rd party tools

Cons:

  • some really useful features will be missing until they are added to Godot:

    • free-form deformation (meshes),

    • skinning (not sure if it is there at the moment),

    • weights

I am new to Godot so please forgive me if any of these missing features listed are already there and feel free to expand the list as well.

@igorskuhar the features in the pros you list godot already has. The features in the cons missing is what is being requested here. You are pretty much telling @reduz to do nothing xD

Meanwhile Unity3d has purchased one of the assets for skin deformation 2d animation and is making it a part of their editor in january- free for all their users:
http://www.cgchannel.com/2016/12/unity-technologies-to-make-anima2d-available-for-free/

your pros and cons makes no sense.

here are pros and cons on implementing mesh deformation authoring and animation in 2d in godot editor

pros
no need to rely on external tools
no need to catch up to the external tool spec
quicker to fix bugs
no need to import assets

cons
need to write new tools such as editing weights in godot editor instead of just using blender and coa tools for that
need to create an atlas packing
optionally need to later on create importers for people who make their assets with spine and dragonbones

also dragonbones is free and coa tools and blender are open source so the no need to buy app argument is fir spine users only

@blurymind

the features in the pros you list godot already has

Points listed as pros are not features...

The features in the cons missing is what is being requested here. You are pretty much telling @reduz to do nothing xD

No, I listed missing features under the single con which means "the need to add everything in the list by ourselves instead of relying on existing 3rd party solutions".

your pros and cons makes no sense.

For people as annoying as you are, maybe.
You basically rephrased most of my pros as your own, claiming that they make no sense? ;)

quicker to fix bugs
no need to import assets

I like the pros that you added, though.

Your cons are just additional missing features, but I agree with the list.

also dragonbones is free and coa tools and blender are open source so the no need to buy app argument is fir spine users only

So? Did I say that they are all paid or something?

@igorskuhar no need to get personal, I have not said you are dumb or annoying and focused only on the information in your post.
It made no sense to me because you were comparing having skinning to not having it. Everyone is requesting to get it - in this and other issues, it's already on the roadmap. It has been pushed 2 or 3 times already. To me it would make more sense to compare whether to have it's authoring built into godot editor vs relying on external tools to author the animation.

Basically what Is missing is the ability to have free form deformation of sprites, turning them into a mesh that is bind to an armature.
Your pros and cons list is pretty much how it is at the moment. I think @reduz is going to keep all the pros, but get rid of the cons.

The question is should Godot rely on external tools to create the assets and get only the ability to integrate them (for example use dragonbones editor or coa tools in blender to create the assets, have only the runtime in godot to load the dragonbones files)

Or should godot have it's own editor for this type of assets - being able to turn a sprite into a mesh, apply skin weights to it and animate it - all in godot.

I think that there is no point in even discussing it, as @reduz already said that godot will be going with the integrated approach and later on perhaps will get ability to import spine2d assets.

This issue is to advocate support for one open format for cutout animation- Dragonbones - to rival spine2d and all the other proprietary ones that are locking users to licenses. Whether godot has an importer for it, uses it internally as the way to store the animation, can author it or not author it - it all depends on godot devs and how they decide to go with the design.

I personally think that if godot and other open source game engines unite, we will have a bigger community supporting the open standard and that will make it stronger. Thus why I am advocating to use it as a way to store the animations or at least have an importer for it in godot.
If you use Dragonbones as the file format for cutout animations in godot, you will be able to have users make their animations in blender or dragonbones editor - before godot gets freeform animation editing tools integrated.
The dragonbones json text file is basically just a collection of dictionaries and arrays with the animation data- it's pretty straightforward

@blurymind Sorry, I didn't want to get personal but I just don't like unconstructive criticism like: "It doesn't make sense".

I really like the idea of integrated approach and looking forward to 3.0 release in February, but I am just concerned about the amount of work (and time) needed to add all these missing features listed above.

Thanks for the discussion ;)

@igorskuhar @reduz
I am looking at this from the perspective of an animator.
What I am suggesting is to have Godot use the Dragonbones json file format to store free form animation data. Because it is open - you can add features to it that suit godot. You are free to fork it to suit godot

Using it would bring a number of advantages to existing users and godot developers:

  • Animators will not be locked to only use godot's editor in order to create freeform deformation 2d animation for godot- they will be able to also use professional animation tools such as Blender3d and Dragonbones editor - tools solely designed for animation in mind! Tools with better rigging capabilities, better skinning and most of all - a highly polished graph editor and dope sheet.
  • Godot developers will be able to deliver this feature gradually - in a way that makes it immediately useful to the users - in the first stage you could have a runtime support for the dragonbones animation data and the animators will be able to use blender+coa tools to make animation for godot. Then at a later stage Godot will acquire the authoring tools for the animation data as well - and people won't have to learn blender or dragonbones editor - but will still continue to have the option and godot devs won't have to waste time writing importers.
  • Godot developers can look at the open source c++ runtime for dragonbones
    https://github.com/DragonBones/DragonBonesCPP
    So its not like completely starting from scratch

Regardless- every new feature has a learning curve. Even if the authoring is completely done in Godot exclusively -the animator will need to learn how to do skinning and meshing in godot. I can bet that a lot of freelance professional animators already know how to use blender and it will be way easier for them than learning it in godot.

Dragonbones animation is just a json file + an image atlas of the character's body parts. Coa tools for blender can already export that information in a click.

Some small apart regarding dragon bones. Yes it is open source, but it is written in actionScript (adobe air) which means it doesn't run on gnu/linux (no, winehq does not count). I think if we are going to support external tools, we should look for truly cross-platform tools. So we can keep all platforms first class citizens.

@ni-code The editor is, and the editor is something you need not use in order to produce dragonbones animation. As stated before, now blender can be used to create the animation files via coa tools:
https://github.com/ndee85/coa_tools

25a94e00-9628-11e6-9ee7-047486a74411

Coa-tools plugin for blender allows you to export it in a single click! It also adds tools for creating the mesh from the body parts and also uses blender's already excellent tools for skinning and animation.

as an added bonus, it can now also produce the character atlas as well - at export
43be5c96-a2b7-11e6-9873-b5fcff03f013

So the pipeline can be brought down to doing the animation in blender, exporting a json file containing the animation data and a character atlas containing the body parts.
Then loading that into a game engine.
That is how spine2d, creature and the others do it too. But their json file has a different structure, so you have to write an importer for each one if you want to support them too.

The dragonbones editor,while actively developed and free - is not open source and has not been ported to linux. But blender is both open source and runs on linux.

@blurymind @ni-code @reduz
while the idea of an open standard format is great, I realize more and more that dragonbones is not ideal for that. While at first glance it offers everything we need, but when diving deeper into the format you realize it suffers of functions or has some limitations which are weird. And when using blender as content editor, users will run into such problems.

Here are some things I discovered while writing the dragonbones exporter for coa tools.

  • Dragonbones has only one channel for rotation, location and scale. None can be animated separately, which also results in having only one interpolation curve for all. (this should be standard for modern animation tools), Same goes for other properties such as color and alpha. All are animated together in one key (Godot is much better in that sense. Each Property has its own channel making it much more flexible)

    • IK Chains do only support the length of 2. So tails with more chains cannot be created and animated easily

    • Meshes cannot contain holes, this will result in invalid meshes

    • only one mesh per object allowed

    • Bones can have a maximum length of 500 (and this one is really stupid somhow)

On top of that I still have some problems getting stretched bones export properly to db.

While all this limitations are more or less no problem within dragonbones, because you just don't have access to them, they are a problem when you export from blender. Blender offers a wide range of animation tools/features that db doesn't have. This means I have to bake animations and the user has to know which functionality of blender doesn't work or does. I know now, that this will run into confusions in the future.
My Idea was to write this db exporter and once godot supports all that features I thought of writing a db json importer. But I don't think I will do it. My Idea is to directly write a .tscn exporter which will generate godot scene format.

I for myself am still uncertain if dragonbones was a good choice. I will still try to improve the exporter. But I don't know if it should be the route we should take for godot.

I think it would definately make sense to also improve godots build in tools. It makes sense since you have it directly in godot, and nevermind how good an export/import workflow is, having tools build in is always better. Since there cannot be so much errors on the route from one tool to the other.

@ndee85 @reduz @vnen @bojidar-bg There is an interesting new development with spine2d json filetype:

The Defold engine developers, who have been supporting it for a while now just made an announcement about dragonbones:
http://forum.defold.com/t/dragon-bones-4-9-5-supports-spine-3-3/3630/6

Dragon Bones now exports to spine 3.3 as of 4.9.5 update.
Everything works perfectly fine, all animation imports including mesh deformations. Just export images separately and create atlas in Defold and you're good to go.

a1e7c1d23665a21414b8137d7405ac3cd61b6b2b_1_592x500

More over, because they have implemented their own runtime for spine files, they don't have a clause in their runtime to enforce users to own the 300$ spine license!.

-Does the spine runtime in Defold require the user to still spend 300$ for a spine license?
-We have implemented our own Spine runtime. We use no code from Esoteric software.

The way this affects us right now:
Since coa_tools now exports to dragonbones and dragonbones can convert the files to spine - coa tools can now be used to create spine2d animation for the Defold engine - without need to own or purchase the 300$ license by esoteric games!

This is also possibly true for other game engines with built in support for spine files and their own runtime - yoyo games Game maker for example - but needs to be confirmed!

@ndee85 does the spine runtime also have the export limitations you list about dragonbones?

@blurymind Thanks for spamming _and_ at-mentioning me, it was very nice and probably slightly unrelated to know.

What are the license terms Activision/King have with regards to the use of their Defold-related tools/modules - or if their licenses/EULA would even allow them to be used with GM/Godot/etc. Or if it's even possible to use outside of Defold anyway - because of it's closed source nature (i.e. no source code available).

In short - that is very likely of limited use to non-Defold users.

@Sslaxx King does not require you to buy spine2d in order to use the runtime.
Defold is a free closed source game engine- not an animation editor. I am noting it here because it is an interesting example of a game engine that supports and even promotes creating spine2d animation data without owning esoteric games official spine2d editor and instead using dragonbones to export spine files

I do believe that godot is way better as a game engine and support @reduz in his decision to go with an integrated approach with possibility of importing later on

The dragonbone module is comming soon :)

And the spine module is avaliable with both godot 2.1 and 3.0 alpha

@Geequlim That is amazing news!
I would love to help you test it! :D
I have some projects that can be used as a playground

Do you have a git for it?

I am not interested in the spine module, because it requires a 300$ spine pro license.
Dragonbones is free and has almost all of the same features minus the price tag. I can not afford it for my hobby projects.

@Geequlim
which version of the dragonbones json data is the module supporting? 4.5 or 5.5? I started looking into the dragonbones exporter issues for my coa addon for blender these days.

I opened an issue at the dragonbonesCpp runtime tracker just in case. Perhaps dragonbones developers would like to get involved too?
@Geequlim is it a godot 2 module (requires the engine and the export templates to be re-compiled) or is it a gdnative binding (runs on godot3's master branch version without need to recompile the editor and export templates)?

@blurymind That is for godot 2.
ping @rotonlin who is the author of the dragonbones module.

@rotonlin we would love to see your progress on the Dragonbones runtime :)
Do you have it uploaded anywhere on github or other website?

I opened a bountysource page for a gdnative binding of the dragonbones runtime here:
https://github.com/godotengine/godot/issues/12504

Should we close this issue here and continue there?

It looks like somebody has created a dragonbones runtime via a Godot module for Godot 2:
https://github.com/sanja-sa/gddragonbones

The goal now would be to get it ported to Godot 3 or even better to create a gdnative addon that would elliminate the need to recompile godot and it's export templates

Many thanks to sanja-sa!!

@ndee85 we can finally export 2d mesh with deformations from your coa-tools addon to Godot - but unfortunately not Godot 3 yet. Will test this later at home

closing this now

Hey, 2020 here. What is an update? Can someone make tutorial about importing DragonBone's JSON file to import directly? Do I have to compile Godot myself?

@PixsaOJ There are forks of the DragonBones module available here: https://github.com/sanja-sa/gddragonbones/issues/33

You'll need to recompile the Godot editor and all export templates you plan to use with the module enabled.

BTW the dragon bones editor is still vastly better than what godot has atm, the runtime outperforms godots built in skeletal animation.

There is a reason people use it even though godot has the feature. The truth is that it may now have the feature, but there is a lot to be done to catch up with db. Simple things take bazillion clicks to do in godot, its not fun to use for rigging or animation

Poking around to find _something_ that could replace Live2D + Unity for me, I found this. This aforementioned fork seems still pretty active https://github.com/mauville-technologies/godot_dragonbones even having an official website with prebuilds: https://www.godotdragonbones.com/
He uploaded several tutorials on this here: https://www.youtube.com/watch?v=kAXESvYiI6s

Adendum: He even supports control of the whole armature within Godot now as well as inverse kinematics

Is there any reason why this can't be integrated into the main Godot built or at least as an officially supported module? I feel like this is an immensely useful tool and Godot's 2D animation tools are very crude and very cumbersome and for many tasks downright unusable. It really does not compare well.

Is there any reason why this can't be integrated into the main Godot built or at least as an officially supported module?

It requires significant maintenance for something none of the core developers have experience with. You'd have to open a proposal if you want this to be considered again, but I doubt anyone will be able to implement it anytime soon.

and Godot's 2D animation tools are very crude and very cumbersome and for many tasks downright unusable. It really does not compare well.

I think it would be better to focus on improving those 2D animation tools instead. There are many low-hanging fruits for improving their UX (feel free to open proposals as you go). DragonBones is kind of infamous for its sketchy practices after all.

I think it would be better to focus on improving those 2D animation tools instead. There are _many_ low-hanging fruits for improving their UX (feel free to open proposals as you go). DragonBones is kind of infamous for its sketchy practices after all.

Since I have never heard of that, may I ask what sketchy practices you are referring to, for example?

Since I have never heard of that, may I ask what sketchy practices you are referring to, for example?

Maybe that changed since I last checked, but I remember DragonBones requiring a login even though it's not a cloud-based application. On top of being a proprietary application, of course :slightly_smiling_face:

Hm.. Reinstalled it (DragonBonesPro-v5.6.3). No login/mandatory registration to be found. I noticed some dodgy stuff though.. "I have read and agreed Terms and Privacy Policy" is hidden in "Custom" installation dropdown and checked by default. When you click on it the Terms and Conditions they seem to be in Chinese only.

The login comes up when you try to export the animation. Does it still do
that?

On Fri, 16 Oct 2020, 14:36 no-trick-pony, notifications@github.com wrote:

Hm.. Reinstalled it (DragonBonesPro-v5.6.3). No login/mandatory
registration to be found. I noticed some dodgy stuff though.. "I have read
and agreed Terms and Privacy Policy" is hidden in "Custom" installation
dropdown and checked by default. When you click on it the Terms and
Conditions they seem to be in Chinese only.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4312#issuecomment-710051376,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRRWVMJQUVPPTRVMM7A7BDSLBD47ANCNFSM4CA2ZV5Q
.

The login comes up when you try to export the animation. Does it still do that?

No, I sucessfully exported something without any dialogue or required login.

guess they realized its spooking their user base and disabled it?

In any case you can now use blender to produce dragonbones animation. The coa-tools addon is pretty complete

I am not sure what your suggestion is - to use Blender + coa_tools to export Dragonbones animation/armature and then use godotdragonbones to import them into Godot and have the programmatical control over IK and bones? (see https://youtu.be/qUPBceXtIDM?t=651 ) Or do you mean that coa_tools can replace both, also the importer? (Note that the Github page of coa_tools states, that: "Notice, this importer will only run with current godot 2.1 dev builds").
Also, is coa_tools still maintained and is there any documentation? I can't seem to find any, especially none mention Dragonbones export.
Anyway, thanks for the hint, I will play around with both ^^

If the official dragonbones editor imposes a login limitation, just use
coa-tools instead to create/export the animation.
Then in godot, use the godot dragonbones runtime instead of godot's limited
and less performant implementation of the same feature.

Of course it would be great if godot devs adopted the dragonbones runtime
and support it similar to other open source game engines, but that is not
favorable as it already has an implementation that also requires some love
and maintenance - its just not what animators would prefer to use
considering the available options.

Naturally everyone would prefer dragonbones over godot's at this point of time. It's just not practical however we look at it. In order to make sense to go with godot's built in feature you would need it to be on par with dragonbones in terms of both features and performance.

On Mon, Oct 19, 2020 at 1:52 PM no-trick-pony notifications@github.com
wrote:

I am not sure what your suggestion is - to use Blender + coa_tools to
export Dragonbones animation/armature and then use godotdragonbones to
import them into Godot and have the programmatical control over IK and
bones? (see https://youtu.be/qUPBceXtIDM?t=651 ) Or do you mean that
coa_tools can replace both, also the importer? (Note that the Github page
of coa_tools states, that: "Notice, this importer will only run with
current godot 2.1 dev builds").
Also, is coa_tools still maintained and is there any documentation? I
can't seem to find any, especially none mention Dragonbones export.
Anyway, thanks for the hint, I will play around with both ^^

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4312#issuecomment-712134687,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRRWVIRTCULHQTYASYQ3QLSLQY7HANCNFSM4CA2ZV5Q
.

Was this page helpful?
0 / 5 - 0 ratings