# Missing graphics/sprites in spine animation

**URL:** <https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278>\
**Category:** Questions\
**Created:** [November 8, 2018, 9:11pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278 "2018-11-08T21:11:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [November 8, 2018, 9:11pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/1 "2018-11-08T21:11:38Z")

</div>

Hey there!

Maybe someone of you can help me finding why there are no graphics in my (first) spine animation…

Background:

- Created some png graphics
- Used DragonbonesPro 5.6 to create a simple animation
- Exported like in the docs / forum explained: Spine 2.x, Image-export
- Started a new DEFOLD project for testing
- Created the atlas and inserted the graphics from the texture-folder (dragonbones export)
- Created a spinemodel and spinescene

After all this I just can see the bones (as lines) in the spine-scene. Where are my graphics? It seems the names / urls of the graphics (maybe in the atlas) are not correct - but I cant change them ?!?

Any Ideas? Here are screenshots:

 ![Screen-2018-11-08_22-08-02](https://forum-defold-uploads.b-cdn.net/original/2X/f/f9d7283b0d2f240548cb42125d35898df3696fa4.jpeg) ![Screen-2018-11-08_22-08-21](https://forum-defold-uploads.b-cdn.net/original/2X/0/0af1886ab4f51384a49bc2da4d112e71dc56b110.jpeg) ![Screen-2018-11-08_22-08-32](https://forum-defold-uploads.b-cdn.net/original/2X/7/7e54949857018059f2f574f4c499b3e62b533895.jpeg) ![Screen-2018-11-08_22-08-37](https://forum-defold-uploads.b-cdn.net/original/2X/1/1e1f3a710f3041293ed82991e9bbf8dfe9adf5e9.jpeg)  
 ![Screen-2018-11-08_22-11-03](https://forum-defold-uploads.b-cdn.net/original/2X/2/2f4682c3efc1b9f1709e4399991398c9cd42c967.jpeg)

---

<div class="post-metadata">

**Author:** ![sven](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sven/32/1086_2.png) [@sven](https://forum.defold.com/u/sven)\
**Post date:** [November 9, 2018, 8:11am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/2 "2018-11-09T08:11:24Z")

</div>

Can you share the JSON and images with me so I can investigate a bit? 🙂

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [November 9, 2018, 8:37am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/3 "2018-11-09T08:37:07Z")

</div>

Sure @sven. and thanks for answering!

Here’s a zip containing the Texture-Folder, Dragonbones-Files and json:

[Drophead.zip](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/2X/4/473820ce50cd54b82ff14f459786bc1ee588489d.zip) (7.6 KB)

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [November 9, 2018, 8:39am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/4 "2018-11-09T08:39:42Z")

</div>

It “feels” or looks like the names for the graphics wont fit. But I cant change the IDs in DEFOLD to try or fix it. The fields are write-protected.

In the atlas the graphic-names are “head”, “hand”, “food” etc. In Dragonbones they are “hand-left” etc.

---

<div class="post-metadata">

**Author:** ![stephenkalisch](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stephenkalisch/32/4131_2.png) [@stephenkalisch](https://forum.defold.com/u/stephenkalisch)\
**Post date:** [November 9, 2018, 8:44am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/5 "2018-11-09T08:44:43Z")

</div>

Oh by the way. nearly the same problem with another test… a (ugly) tree…

in this case I just see in defold 2 of 3 branches (the left and right, not the one in the middle) and I dont see the stump…

 ![Screen-2018-11-09_09-42-41](https://forum-defold-uploads.b-cdn.net/original/2X/a/a89ad4178a465de7ebd057317b269e559876f986.jpeg)

Files here:  
[test\_tree\_texture.zip](https://forum-defold-uploads.b-cdn.net/original/2X/3/32aa75dcc8f6b7b07ff003c60f2a8a162e813b4b.zip) (6.6 KB)

---

<div class="post-metadata">

**Author:** ![sven](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sven/32/1086_2.png) [@sven](https://forum.defold.com/u/sven)\
**Post date:** [November 9, 2018, 3:02pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/6 "2018-11-09T15:02:41Z")

</div>

It seems that Dragonbones got the great idea to not output width and height information for each slot/attachment/image in the JSON. 🙂 I got your first JSON working by manually entering width and height for each entry in the `skins->default` table… So something like this:

```lua
...
"skins": {
        "default": {
            "body": {
                "body": {
                    "name": "body",
                    "rotation": -89.57,
                    "x": 18.68,
                    "y": -0.26,
                    "width" : 23,
                    "height" : 21
                }
            },
...

```

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 9, 2018, 3:08pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/7 "2018-11-09T15:08:49Z")

</div>

Wow! Dragonbones seems to be the source of more problems than it solves…

---

<div class="post-metadata">

**Author:** ![sven](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sven/32/1086_2.png) [@sven](https://forum.defold.com/u/sven)\
**Post date:** [November 9, 2018, 3:34pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/8 "2018-11-09T15:34:33Z")

</div>

@Mathias_Westerdahl pointed out some great advice for Dragonbones users; you should be able to verify your JSON output by running it through the [official Spine skeletonViewer](http://esotericsoftware.com/spine-skeleton-viewer) application as a first step in debugging. 👍

When I tried your scene it failed to load and wrote in the log the following:

```lua
com.badlogic.gdx.utils.SerializationException: Error reading attachment: food, skin: default
	at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:268)
	at com.esotericsoftware.spine.SkeletonViewer.loadSkeleton(SkeletonViewer.java:195)
	at com.esotericsoftware.spine.SkeletonViewer$UI$2.changed(SkeletonViewer.java:634)
	at com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(ChangeListener.java:28)
	at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:182)
	at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:147)
	at com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(Button.java:124)
	at com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Button.java:92)
	at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:89)
	at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:59)
	at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:351)
	at com.badlogic.gdx.InputMultiplexer.touchUp(InputMultiplexer.java:96)
	at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:332)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:217)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.IllegalArgumentException: Named value not found: width
	at com.badlogic.gdx.utils.JsonValue.getFloat(JsonValue.java:657)
	at com.esotericsoftware.spine.SkeletonJson.readAttachment(SkeletonJson.java:332)
	at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:265)
	... 14 more

```

The interesting line here is:  
`Caused by: java.lang.IllegalArgumentException: Named value not found: width`, which might give you a hint what could be wrong! 🙂

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 9, 2018, 6:09pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/9 "2018-11-09T18:09:54Z")

</div>

> [@sven](#):
>
> you should be able to verify your JSON output by running it through the [official Spine skeletonViewer](http://esotericsoftware.com/spine-skeleton-viewer) application as a first step in debugging

Ah, this is a good tip. Added it to the docs and submitted a PR: [Added note on Spine Skeleton Viewer by britzl · Pull Request #25 · defold/doc · GitHub](https://github.com/defold/doc/pull/25)  
@sven can you take a look and merge it?

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 10, 2018, 3:21pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/10 "2018-11-10T15:21:01Z")

</div>

> [@sven](#):
>
> `Caused by: java.lang.IllegalArgumentException: Named value not found: width` , which might give you a hint what could be wrong!

Actually there is a workaround for this issue. It is not very easy but better than adding width and height values manually. I’m going to prepare a walkthrough for it.

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 11, 2018, 9:13am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/11 "2018-11-11T09:13:08Z")

</div>

Here is my DragonBones to Defold converting workflow: [https://www.selimanac.com/dragonbones-to-defold-engine-workflow/](https://www.selimanac.com/dragonbones-to-defold-engine-workflow/)  
I test it with various animations from different sources. It works quite well. You can find my test project [here](https://github.com/selimanac/dragonbones-defold-test)

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [November 11, 2018, 10:09am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/12 "2018-11-11T10:09:57Z")

</div>

Nice writeup @selimanac!

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 11, 2018, 10:17am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/13 "2018-11-11T10:17:31Z")

</div>

Thank you master 🙂

---

<div class="post-metadata">

**Author:** ![sven](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sven/32/1086_2.png) [@sven](https://forum.defold.com/u/sven)\
**Post date:** [November 12, 2018, 10:34am UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/14 "2018-11-12T10:34:37Z")

</div>

> [@britzl](#):
>
> @sven can you take a look and merge it?

Nice, reviewed, merged and published new documentation!

---

<div class="post-metadata">

**Author:** ![Klear](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/klear/32/11577_2.png) [@Klear](https://forum.defold.com/u/Klear)\
**Post date:** [November 14, 2018, 5:48pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/15 "2018-11-14T17:48:17Z")

</div>

I’ve tried this, but DragonBones Tools only produced a json without the height/width information.

Adding it manually did the trick.

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 14, 2018, 5:53pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/16 "2018-11-14T17:53:43Z")

</div>

Did you export your json in the “library” folder and convert it there with using same name?  
Because I’m very sure that it works very well.

---

<div class="post-metadata">

**Author:** ![Klear](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/klear/32/11577_2.png) [@Klear](https://forum.defold.com/u/Klear)\
**Post date:** [November 14, 2018, 5:57pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/17 "2018-11-14T17:57:53Z")

</div>

Yeah. I _think_ I followed the instructions correctly.

Attached are the relevant files, if you want to have a look. human\_fetus\_spine\_ske.json is the one exported from DB, the json and atlas are what was produced by using the DB Tools.

[library.zip](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/2X/1/19f9ddd974f811221c807fe13f833bf5030a381f.zip) (12.4 KB)

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 14, 2018, 6:24pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/18 "2018-11-14T18:24:08Z")

</div>

Ah! This is totally my fault, sorry. I should explain the xxx\_tex.json generation. I’m not sure why this file is not generated in first place.  
If you don’t have a xxx\_tex.json in your library folder (which is not available in the zip) you can create it by exporting as “DragonBones Binary” first…

 ![00](https://forum-defold-uploads.b-cdn.net/original/2X/a/a5bbc8c47d4736a83a19c0f8b688111b56c321b3.png)

---

<div class="post-metadata">

**Author:** ![Klear](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/klear/32/11577_2.png) [@Klear](https://forum.defold.com/u/Klear)\
**Post date:** [November 14, 2018, 6:38pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/19 "2018-11-14T18:38:45Z")

</div>

That’s it, works now!

You should add that you need to export twice - once as DB binary and once as DB json.

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [November 14, 2018, 6:47pm UTC](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278/20 "2018-11-14T18:47:31Z")

</div>

> [@Klear](#):
>
> You should add that you need to export twice - once as DB binary and once as DB json.

Just update it and going to add a proper screenshot, thank you.  
I think older version of DB was generating this file… 🙄

[Next page](https://forum.defold.com/t/missing-graphics-sprites-in-spine-animation/34278.md?page=2)
