• Editor
  • Scaling issues when using engine v.3.1.08 and importing json

Here's an example of the animation running in-game using the JavaScript library.

Here's the same animation when re-imported in Spine using Import Data:

As you can see the red jello body is missing although it has been imported as an image:

The reason I think it has to do with scaling is because I have another animation where the elements are not completely gone but have somehow lost their scaling settings. (I'm not the creator of these and just a programmer that wants to use these assets. So I'm not entirely sure what is going on)

Here's another example in-game:

Here's the same animation imported back into Spine:

As you can see the arm, hands, hat, and eyes are way too small compared to the in-game animation.

Here's a better look at the setup in Spine:

Since I'm manually extracting the images from the packed png and getting the rotation, coordinates from the atlas I could potentially do some modifications to the JSON in the process if I knew what and where. I'm thinking there are some scaling settings the player code takes for granted but the Spine app doesn't when importing the JSON?

Any help is greatly appreciated.
Thanks.

Related Discussions
...
  • Đã chỉnh sửa

Hello,

Just to clarify, are you attempting to reconstruct a Spine project from the exported files used by the game engine?
If that is the case, two common things that may make your day slightly more difficult are these:

  • "Nonessential data" may have been unchecked. This is great for export at runtime cause it makes the file lighter and only has what is actually necessary at runtime and nothing more. So things like mesh complete dimensions may have gotten lost, along other editor-only information. This is not a huge problem if the game used assets already trimmed e.g. with the PhotoshopToSpine script in Spine itself.
    Export - Spine User Guide: JSON

I'm mentioning this because it might be affecting the jello body, although I cannot be sure from just the screenshot.

  • When exporting for runtimes, it is common to export an atlas+png file at half the size, or similar smaller sizes. This seems to be the case that produced that arm problem: the skeleton may be at the right size, but the images are actually at a fraction of it.

The solution may be to upscale the images manually, (using photoshop for example) or to import a downscaled skeleton so that it matches the art.
To do so choose Import > Data then in the Scale field, type something such as 0.5 and see if the results better meet your expectations. It may also help to see the in-game scale of the skeleton.
Import - Spine User Guide: Data

I hope this helps, but if you require further help, please send us the problematic project at contact@esotericsoftware.com so we can try to reproduce what you're experiencing.