Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: One open standard Json animation file specification to rule them all #26

Open
blurymind opened this issue Apr 13, 2016 · 73 comments

Comments

@blurymind
Copy link

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.

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.

@blurymind
Copy link
Author

also posted this at godot tracker:
godotengine/godot#4312

Lets see if it gets some attention.

@blurymind
Copy link
Author

Dragon bones json file format seems to be a good start. They are open source, have runtimes for:

java- https://github.com/DragonBones/DragonBonesJS/blob/master/LICENSE
C++ - https://github.com/DragonBones/DragonBonesCPP/blob/refactoring/LICENSE
Unity (c#) - https://github.com/DragonBones/DragonBonesUnity/blob/3.0/LICENSE
AS- https://github.com/DragonBones/DragonBonesAS/blob/4.5/LICENSE
They are all under MIT license that does not require you to buy the dragonbones license to use them.

dragonbones also supports mesh deformation.

So if you make coa_tools export a dragonbones type json file, you will be able to use coa tools with all these game engines and coa tools adoption will be much faster!

@ndee85 this is a much better solution than using spine, because the runtimes dont require you to buy a spine license.

Here are some example dragonbones files:
https://github.com/DragonBones/DragonBonesUnity/tree/3.0/BirdAndCentaurDemo/Assets/Resources

Here is the dragonbones skeleton data format specification:
http://dragonbones.github.io/help.html

@IBwWG
Copy link

IBwWG commented Apr 18, 2016

Now to update Haxe support: SlavaRa/haxelib-dragonbones#11

@IBwWG
Copy link

IBwWG commented Apr 19, 2016

@blurymind I see there is 3.0 and 4.5, with different specs. Apparently not everyone would say 4.5 is best. Which one are you proposing to use here? Also the page you linked to only has a V2.4 for the skeleton, I guess that's separate from the sprite DB format?

@blurymind
Copy link
Author

blurymind commented Apr 19, 2016

the newest one of course. They just added meshes and some very useful other
things.

But you need to notice - the format specification is established and
backwards compatible. They dont change that.
What you are refering to seems to be the editor. We have two versions of the
editor:

  • standalone (free)
  • as an addon for Adobe flash studio (open source and free)

They both export to the same json format, so that does not affect this
proposal at all.
What we are interested in is what it's open source runtimes support and how
well are they documented.

The question confused me.
Are you asking which version of their editor to add to coa tools? If it's just adopting the code that writes to the json file - then of course the newest one that exports mesh data - always the newest one.

On Tue, Apr 19, 2016 at 7:46 PM, IBwWG notifications@github.com wrote:

@blurymind https://github.com/blurymind I see there is 3.0 and 4.5,
with different specs. Apparently not everyone
http://forum.starling-framework.org/topic/dragonbones-45-is-released#post-91163
would say 4.5 is best. Which one are you proposing to use here?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#26 (comment)

@IBwWG
Copy link

IBwWG commented Apr 20, 2016

Ah, thanks for clearing that up. So they already had meshes in the format spec, planning ahead, and then the engine implemented them?

It's just that the docs around the DB site and their GitHub readmes and wikis seem variously out of date, so it's hard to follow what's what.

I was asking which format to use. In the forum thread I linked to, it sounded like there was a 3.0 format and a 4.x format, and that at least one person was arguing the 3.0 format worked better (in the sense that the runtime was more performant, so it's a bit hard to separate the format from the runtime in that dialog?) In addition, the format spec linked to is 2.x. So, is it true the 4.5 editor uses the 2.4 format? I.e. my question doesn't make sense, because there is only the one format spec, v2.4?

@blurymind
Copy link
Author

Their standalone editor can even import spine animation json files and
export to a dragonbones json file. They support a lot of features that
spriter doesnt. The runtimes could be investigated individually. Its
possible that they are constantly catching up with the format and some
might get up to date at different pace. Seeing as to how often they are
updated makes them look very promising. Its all on github so you can check
them out if you want to.

As a whole this seems to be much more mature than spriter's format and its
goals much more inline with an open source approach.
On 20 Apr 2016 13:31, "IBwWG" notifications@github.com wrote:

Ah, thanks for clearing that up. So they already had meshes in the format
spec, planning ahead, and then the engine implemented them?

It's just that the docs around the DB site and their GitHub readmes and
wikis seem variously out of date, so it's hard to follow what's what.

I was asking which format to use. In the forum thread I linked to, it
sounded like there was a 3.0 format and a 4.x format, and that at least one
person was arguing the 3.0 format worked better (in the sense that the
runtime was more performant, so it's a bit hard to separate the format from
the runtime in that dialog?) In addition, the format spec linked to is 2.x.
So, is it true the 4.5 editor uses the 2.2 format? I.e. my question doesn't
make sense, because there is only the one format spec, v2.2?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#26 (comment)

@IBwWG
Copy link

IBwWG commented Apr 24, 2016

Maybe so, but I'm still a bit confused on formats. If 2.4 is the latest format, which version of the format was DB 3.0 putting out? SlavaRa/haxelib-dragonbones#12

@blurymind
Copy link
Author

blurymind commented Jul 22, 2016

They recently added mesh binding to bones and free form deformation. That makes their json file spec fit perfect with coa tools and what it can do but can not export atm.

Please download the unity runtime in order to try the latest features of dragonbones. There are now example files for ffd and skinned mesh binding. Since there is no license like spine2d - we can use the dragonbones json file structure in coa tools export and thus use coa tools to produce animation that can be loaded by the dragonbones runtime- on unity and the other game engines that it has a runtime for

@IBwWG
Copy link

IBwWG commented Aug 9, 2016

There's also this for OpenFL, only in beta and for DB 2.2, but still: https://github.com/jalbanesi/openfl-dragonbones

@ndee85
Copy link
Owner

ndee85 commented Aug 18, 2016

Just taking a look at Dragonbones. Wow.. that looks pretty advanced!! Maybe this could really be an alternative in the future!

@blurymind
Copy link
Author

blurymind commented Aug 18, 2016

@ndee85 I can only hope to see Godot pick it up as a standard json/runtime.
It is very good!

https://www.youtube.com/watch?v=xUfosRr9fY4
Now it has proper smooth bind skinning to sprites - which is the prime feature that I want!
Blender can do that - so does your addon - turn sprites into meshes that can be deformed by an armature!

The advantage of picking up the dragonbones json specification over making a new one from scratch is:

  • its mature/tested/has a community and developers
  • Supports ALL features of Spine2d - it's the most advanced specification that is open
  • It's open source
  • Already has multiple other game engine runtimes - Unity/C# being the most mature one
  • The runtimes are not locking the user to a license and do not require a fee
  • Animation data can already be edited in their free editor or in adobe flash - multiple applications can author it.

Do you think we should advocate the bragonbones json data structure to godot devs or let them make a new one?

@ndee85
Copy link
Owner

ndee85 commented Aug 18, 2016

@blurymind
do you know if it supports spritesheets within? So no spritesheet export, but spritesheets that can be used within the character in the software?

@ndee85
Copy link
Owner

ndee85 commented Aug 18, 2016

@blurymind
Also, do you know if there is a json specification somewhere? I took a look at the exported json file. Not easy to read, because it is all in one line and absolutely no formatting.

@blurymind
Copy link
Author

blurymind commented Sep 7, 2016

@ndee85 sorry for the delay, I will provide good example files soon. :)
I have good ones that are easy to read and have the mesh data in, just didnt have much time these days

The lack of formatting on the ones you saw is the missing new line. This is not the case for all the ones that are available - they are just scattered in the different runtime repositories along with the good ones

And yes it supports spritesheets - I assume you mean a character atlas that contains multiple frames of a body part

@blurymind
Copy link
Author

they updated their website to reflect the features
http://dragonbones.com/en/animation.html#.V8_VCfkrK9I

@radishdalek
Copy link

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]

@blurymind
Copy link
Author

blurymind commented Sep 17, 2016

@radishdalek thank you - the translation is very good actually, I hope it allows @ndee85 to make an exporter 👍

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 ]
                }]
            }]
        }]
    }]
}

@blurymind
Copy link
Author

Dragonbones 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

@ndee85
Copy link
Owner

ndee85 commented Sep 22, 2016

I am currently diving into the dragonbones json file format. This will take me some time to fully understand it. But I am making little progress. I get proper mesh export working. So this means, generated meshes in blender now perfectly match the meshes in dragonbones. Next up, I'll create a simple dragonbones project and examine the exported json format to understand all dependencies and see what I need to add to blender to export it.

I don't want to promise anything yet. But I would love to write a fully functional exporter to dragonbones json format. But this may take some time.

@blurymind
Copy link
Author

blurymind commented Sep 27, 2016

@ndee85 this is awesome news!! 👍

It will make it possible to export the coa tools animation data to Unity3d and cocos2d, among other major game engines. Not just Godot.
http://dragonbones.com/en/download.html#runLibrary
There are javascript, C++ and C# runtimes that are open source - could potentially be ported to other engines.

It will also allow coa tools in blender to replace the DragonBones editor for some users who like using blender more.

@ndee85
Copy link
Owner

ndee85 commented Sep 27, 2016

@blurymind
I am making good progress.. Armature is now fully exported. Next will be to properly import meshes. My test on mesh data worked. Now I need to put it properly into the json structure. Here is a little screenshot.

db_export

@ndee85
Copy link
Owner

ndee85 commented Sep 27, 2016

@radishdalek @blurymind
I have working mesh and armature export. Draworder, vertex weights and ik will be next on the todo.
db_export_02

@blurymind
Copy link
Author

blurymind commented Sep 27, 2016

@ndee85 you are making an incredibly fast progress with this!
Maybe Godot devs might make an importer for the dragonbones json file instead of spine's -it would save the effort of having to make a separate exporter for godot - when it gets mesh deformation features that is.
Juan seems to be very set on the task of getting Godot to have it's own animation editor that supports all the Dragonbones features instead of porting the C++ animation runtime that is already available for coccos2d.
I doubt that godot will ever get to the level of Blender+coa tools as far as animation workflow goes. It's just not as specialized, b3d+coa will always be a better tool to do rigging and animation. I believe that it will even beat the official Dragonbones editor in terms of workflow.

Once this works, Mike from Gamesfromscratch might be interested in making a video. So far he has covered spine2d and only mentioned dragonbones. Seeing dragonbones export in blender would get his attention

@cesarpachon
Copy link

hi! I develop html5 games with cocos2d (javascript) and I am trying to implement the whole art pipeline in opensource and linux (ubuntu, gimp, inkscape, vim) I really really love the idea of following a opensource json standard so we can export from blender and take advantage of all the existing runtimes of different game engines. adopting dragonbones format instead of creating a new one is a wise decision, IMHO. I hope I would like help someway to this project!

@blurymind
Copy link
Author

blurymind commented Oct 6, 2016

The more software that supports one open file standard, the better it is for the open source community and the file standard.
:)
Unlike the proprietary tools, we don't need to fragment file types and runtimes, limiting the developers/artists
United effort = better runtime support for more game engines out there, bigger community using one standard, better quality tools exporting it

Thank you @ndee85

@ndee85
Copy link
Owner

ndee85 commented Oct 6, 2016

@cesarpachon @blurymind
Ok.. I have some more progress. I think the most important and heavy lifting stuff is done.
I have now support working for:

  • Meshes
  • Armatures (Bone Matrices and Posing)
  • Weighting
  • IK Constraints
  • Slots Support (easily swapping meshes)
  • Color and Alpha

Maybe I will make a push with all the changes tonight so you guys can try it out already.

So the next big task will be Animation support.
Here is a current screenshot. It matches perfectly dragonbones. The cool thing. Blender with coatools combined offers even a much faster workflow. And blenders Editor has a better performance. So this could really be a great alternative for Linux users.
blender_dragonbones

@ndee85
Copy link
Owner

ndee85 commented Oct 6, 2016

@cesarpachon
You can help by testing the format. It would be really cool if you try to implement the dragonbones runtime into cocos2d and see if the files that are generated with coatools do work. I will write again once I have pushed everything.

@blurymind
Copy link
Author

blurymind commented Oct 14, 2016

@ndee85 This is great, because unlike the dragonbones editor or ANY other competitive software of this type (like spine2d) - blender has nice sculpting tools that can be used to create/tweak the shape keys- much quicker than painstakingly moving vertices!! 👍

@ndee85
Copy link
Owner

ndee85 commented Oct 14, 2016

@blurymind
yes, this is one thing. The creation of shapekeys. But the other thing is, that if you want to animate vertex coords in spine or dragonbones. You have to manualy set it for each animation. And adjusting them will be such a pain! With shapekeys you have full control and adjusting them is just changing the bone locations or scale or whatever! I have to say, this feature really sets coa tools apart of the others. At least workflow wise! I wouldn't have thought that I can export the shapekeys in such a good way!

I am a bit excited that it worked out so well!!

@ndee85
Copy link
Owner

ndee85 commented Oct 14, 2016

Ok. Just pushed timeline events and shapekey support for dragonbones with this commit 4a4122a

@blurymind
Copy link
Author

@ndee85 epic win!! Thank you for the awesome updates! :D
Time to make the other editors have a run for their money

@ndee85
Copy link
Owner

ndee85 commented Oct 19, 2016

Here is a small preview how shapekeys are transfered to dragonbones. You can create as many shapekeys as you wish. The all get exported as an animated mesh. Works pretty straight forward.
This enables advanced 3D like animations and facial expressions.

I think the last part on the todo is the texture atlas generation and then we can say it is on paar with dragonbones!? Did I miss something? ^^

dragonbones_shapekey_support

@blurymind
Copy link
Author

blurymind commented Oct 20, 2016

@ndee85 you are rocking it! Yes indeed it is getting on par - and even better than their editor!

Question - on the screenshot above- you don't have a keyframe on each frame - which makes me think that the shapekey animation doesn't get baked on export, but actually preserves the original keyframes.
Is that correct?

Here is a demo on integration of dragonbones files in Untity3d
https://www.youtube.com/watch?v=VnJKU56q708

I couldnt give it a try in the weekend, but will do as soon as i get some free time. I am very eager to play with this, once my freelance client is off my back.

All thats left now is to put up a short video tutorial on exporting the example character to unity. I am saying unity- because it seems to be the most popular game engine supported by the runtime at the moment

@blurymind
Copy link
Author

blurymind commented Nov 1, 2016

@cesarpachon Dragonbones animation data is now officially supported by cocos2d:
http://www.cocos2d-x.org/wiki/Animaiton_Editor_Introduction
You can directly import it in the game engine and should work. No need to install runtimes

The Action Editor supports making and editing the mainstream skeletal animation and the frame animation sequence. It also supports importing Dragon Bones and Flash animations directly.

They just added it to the game engine. Here is the announcement:
http://discuss.cocos2d-x.org/t/cocos-creator-1-3-0-released/33094

http://discuss.cocos2d-x.org/uploads/default/optimized/2X/b/bf93d28f377bdd862d0b7039ccfae0b5c06bb897_1_690x476.jpg

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.

@ndee85
Copy link
Owner

ndee85 commented Nov 4, 2016

@blurymind
Automatic Texture Atlas generation is now commited. Take a look here :)
You currently have to set the size in of the final texture yourself. Going to add automatic size calculation soon too.

stip_atlas

@blurymind
Copy link
Author

blurymind commented Nov 9, 2016

@ndee85 Thank you, you are rapidly improving the entire workflow!
This will save a lot of time and simplify the process

@blurymind
Copy link
Author

blurymind commented Nov 11, 2016

It's good to note that having all body parts of the character in one image file (atlas) - is a great optimization- as it greatly reduces the number of draw calls!

So packing them bodyparts in an Atlas is an incredibly important and useful feature that @ndee85 has now made a part of the addon

@LPsyCongroo
Copy link

LPsyCongroo commented Nov 19, 2016

Hey everyone. I love this plugin, and I'd really like to test it in Unity but every time I export to Dragonbones I keep getting this error message. I'm not tech savvy enough to know what it means =/

capture

EDIT: I figured out the problem, I didn't add the animations using the COA Tools menu. Works awesome! I'm going to test out shapekeys when I get the chance.

Out of curiosity, as anyone gotten their DragonBones files into Unity yet? I don't mean the Demos either, but one of their own characters. I can't even figure out how to get the runtimes into my project folder without errors being thrown all over the place. Plus, a lot of the documentation is in Chinese which is not helpful...

@rosshadden
Copy link

I know you don't want to support every format ever, but I think it would be a good idea to add an export to the spine format, too.

Sure, using the spine runtimes is not free, however they are very well supported and maintained, and people do use them. A lot more people than dragonbones, if only because they support so many more languages and game engines.

If we did so, it would expand the reach of this tool from ~4 game engines to ~40 (the one I use, love2d, being one of them).

@blurymind
Copy link
Author

Spine devs are not very open to the idea and prohibit other tools from
being able to export the spine format. I havent even written on their forum
or to them and they blocked my ip from their website. This i assume is just
because at one point- just like you now- i kept advocating on the request
to have blender export to it too- for free.

If you already have a 300 dollar spine license, then you do not need to use
blender or another tool to export to it in general- as their editor will
have you mostly covered on all operating systems. In contrast the
dragonbones editor does not have a native version for linux.

I know its annoying but its just pure politics. The reason they have 40
runtimes is that they got devs to use their editor and write runtimes. If
we use dragonbones and focus on supporting and promoting it as much as we
already do for spine, it also will get 40 runtimes- because that will
motivate devs to write them!

On 22 Nov 2016 03:43, "Ross Hadden" notifications@github.com wrote:

I know you don't want to support every format ever, but I think it would
be a good idea to add an export to the spine format, too.

Sure, using the spine runtimes is not free, however they are very well
supported and maintained, and people do use them. A lot more people
than dragonbones, if only because they support so many more languages and
game engines.

If we did so, it would expand the reach of this tool from ~4 game engines
to ~40 (the one I use, love2d, being one of them).


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#26 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGMbVa0TG3shYFOPjUfYI-asFp_eIzi2ks5rAmTXgaJpZM4IGsfM
.

@blurymind
Copy link
Author

blurymind commented Nov 28, 2016

Another great opensource engine that would be very cool to have dragonbones runtime is love2d. It has a big community of devs and already has a runtime for spine.
https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-love

Later this week I am going to try and request it on their board

Seems more viable than godot support at the moment

@rosshadden
Copy link

@blurymind Love2d is the game engine I use. I recently asked them via a tweet, but haven't heard anything from them.

I did start a dragonbones love2d runtime, but I realized I needed to break out some of my lua libs before working on it, because they would be useful in th dragonbones runtime as well. So for now it's in the "nothing to see here" stage. I would love some help once I get it far enough along :). Or if you want to lead your own charge, by all means.

The point is I think we're on our own for most dragonbones runtimes. They have 2-4 official ones, and the consensus seems to be if you want another one we are best off making it ourselves.

@blurymind
Copy link
Author

blurymind commented Nov 28, 2016 via email

@rosshadden
Copy link

rosshadden commented Dec 3, 2016

I really don't want to be the guy leading the charge for a love2d dragonbones or coa_tools runtime. Animations are not my forte. I made some posts about it in the love forums and really hope someone else picks up the torch. I'd be happy to help, just don't want to lead it.

@blurymind
Copy link
Author

blurymind commented Dec 4, 2016

Here are some links @rosshadden is mentioning:
https://love2d.org/forums/viewtopic.php?f=3&t=82956

Ross> I would love to join, but I don't event know where to begin.
love2d is particularily interesting to me, but I dont feel confident enough to write an entire runtime. Someone who knows it really well should write it.
I can help with testing it

@blurymind
Copy link
Author

blurymind commented Dec 8, 2016

@ndee85 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 limitation 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 - youo games Game maker for example - but needs to be confirmed!

@cesarpachon
Copy link

cesarpachon commented Dec 8, 2016

wow! that's amazing! if only Dragon Bones run on linux it would solve my particular need.. right now I am tied to Spine as their editor runs on linux and they have cocos2d runtime for javascript (dragonbones runtime is only for C++, as far as I know). I had not figure out a way to create a pipeline from coa_tools to cocos2d-javascript on linux environment. I even started a small experiment with my own set of gimp, blender and javascript modules for cocos2d: it supports position, rotation, visibility but I yet need to work on render-order channels to cover my basic needs: https://github.com/cesarpachon/2d_open_anim_pipeline

@rosshadden
Copy link

Dragonbones not working on Linux is one of the reasons coa_tools can be useful. Also because Blender is incredible and standard. I think this news is a huge motivation for having coa_tools output the spine format, as it now gives us reach to two very different runtime collections.

@blurymind
Copy link
Author

blurymind commented Dec 9, 2016

@cesarpachon The dragonbones editor is written in adobeair, which unfortunatelly is no longer supported for linux. That is why they haven't ported it is my guess.
However it is not very difficult to run the windows version via wine.
Basically install adobeair with wine, then install dragonbones with wine and run it.
dbones-linux-screenshot from 2016-12-08 23-52-30
And voala - dragonbones editor running under linux.

Running it with wine is a bit laggy and not usable for animation , however we might still be able to use it to convert the dragonbones animation data you exported from blender via coa-tools to spine animation data.

Ideally you would have a spine2d exporter for coa-tools as well - that way we won't need the dragonbones editor for converting the data in the middle - but for now this is a nice workaround for Defold users under linux.

No matter the platform - blender+ coa tools outperforms the Dragonbones animation editor - the frame rate we get is way better. So @ndee85 has achieved something very special here imo - regardless of the limitations of the db runtime, exporting to a dragonbones json file has now enabled us to also be able to get spine2d json files for game engines with the spine2d runtime!

@blurymind
Copy link
Author

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants