How do I import a Spine animation project into DragonBones when DB cannot read the atlas file?

I found 2 interesting Spine projects that I would like to import into DragonBones, but their texture atlas is in .atlas format, which cannot be read by DragonBones. I don't know how to convert .atlas files to .json files that DragonBones understands.

How should I proceed?

So, after hours of hit and trials, here are my OBSERVATIONS when importing spine project in DragonBones.

(1) You cannot import .atlas file and its sprite sheet from the assets option. It takes only .json and .xml is general So, if you have multiple .atlas sprite sheets of spine animation, do it at the time of Creating a new project from spine, otherwise, it won't give option to read .atlas file later.

(2) Even after importing Spine animation, it didn't put images in respective slots for me and in one case, the scale of some images were not correct. However, it shows the correct name of images in the slot but no sprite was actually present even if the assets are correct available in DragonBones library. The author of dragonbones told that DragonBones doesn't support some features of spine.

(3) If multiple .atlas files are in the same folder then it picks the first .atlas file. Ideally, it should pick the one with the same name. So, you have to manually browse the correct file. However, .png, it picks automatically corresponding to the name of .atlas

(4) There is some meta in the starting of animation file of spine(you can easily find it). If that meta is not correct or missing then it won't be read by DragonBones. So, if correct file is not working for you, find if that's missing.

(5) Don't use random texture data file, example, don't generate it by script which converts json to atlas, or vice versa, etc. Because that might not always work. DragonBones reads atlas file and converts into correct .json texture data file which is readable to DragonBones itself. So, you must see that if the texture data finally matches with what is given in the default examples of DragonBones software.

FINALLY, simple steps to import are if your .atlas .json and .png files are correct are:

1) Click on import(not import assets), form the toolbar

2) It opens the popup and asks you to select "Animation" data file which is your spine animation file. When you select that .json animation file, DragonBones automatically selects "Spine Animation Data" in the next window popup.

3) So, now, you just select the corresponding texture .atlas data and .png texture. (In my case it was png. I am not sure if Spine exports other format as well. So, whatever it exported from spine should work, I guess)

I've given a little pause to animation. So, above steps can look vague to you but assured, they are correct observations.

I Hope some of it is helpful as there is probably nothing out there which could seriously help, AFAIK.

I think it's not possible at the moment.

If you select Spine's JSON export option with Create atlas, it exports the following files:

• .json files describing skeletons and their animations,
• .png or .jpg files containing the images used, and
• .atlas files describing what images belong to which parts of the skeleton.

If DragonBones cannot read .atlas files, it cannot put the images where they should be, and so cannot import the project.

Some options for you:

• Hi, thanks for the links. DragonBones developers really don't care to reply. Interestingly, after long time of error and trials. Just 10 min back, I got the success. If the .json animation file is correct, then it automatically selects "Spine plugin" and also automatically picks the .atlas and corresponding .png file. But if .json animation data is not correct then DragonBones gets confused and doesn't read atlas file. <Read below comment> Dec 17 '16 at 23:08
• There are 3 main problems with DragonBones in importing.(1) You cannot import .atlas file and its sprite sheet from the assets option. So, if you have multiple sprite sheets, do it at the time of Creating a new project from spine, otherwise, it won't give option to read .atlas file later. (2) Even after importing Spine animation, it didn't put images in respective slots for me and in one case, the scale of some images were not correct. However, it shows the correct name of images in the slot but no sprite was actually present even if the assets are correct available in DragonBones library Dec 17 '16 at 23:20
• (3) If multiple .atlas files are in the same folder then it picks the first .atlas file. Ideally, it should pick the one with the same name. So, you have to manually browse the correct file. However, .png, it picks automatically corresponding to the name of .atlas Dec 17 '16 at 23:20
• @user3241111 it sounds like it would be helpful if you documented these findings in an answer and mark it Accepted. That will help other users with similar problems find your solution and save the trial-and-error you had to go through. Jan 2 '17 at 17:20
• @DMGregory You're correct.I'll do it whenever possible at the earliest. Jan 6 '17 at 20:14

DragonBones offical tools for converting to and from popular formats

Installation: npm install dragonbones-tools --global

Convert Spine json format files to DragonBones json format files in current path.

\$ 2db -t spine


After running above command, you will get three files of Dragon Bones, e.g.:

• xxx_ske.json (the skeleton file)
• xxx_tex.png (the texture image)
• xxx_tex.json (the atlas file).
• This is currently a link-only answer. Can you edit your question to elaborate on how you would use this link to solve OP's problem? Aug 26 '20 at 11:45