Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Getting Spine Skeleton Animations Imported & Working
  • I import the .skel ,but  show blank.. 
  • 38 Comments sorted by
  • @kikubu, Yes currently Texture Packer sprite sheets are the only external atlas files supported. It keeps things simple.
  • Yes, i have read the tutorials,but sorry, still don't konw how to use. When import , it's blank.
  • Hi @meishijiemeimei
    • Did you export the .skel file with the right file extension?
    • Did you include the atlasFileName property to tell GBs which Texture Packer sprite sheet to use for the body parts of your animation? Or did you at least put the sprite sheet in the same folder with the same name as the .skel file?
    • Did you upgrade to the latest Spine build?

    If you have done these things and still getting an error, send in your .skel file to http://gamebuilder.zendesk.com/anonymous_requests/new and we can take a look at it.


  • Hi Lavon ,i have send the .skel and .json.

  • @meishijiemeimei  You are missing a quote in front of the parameter "skeleton" in the .skel json file. This made the json file invalid.
  • Hi Lavon, I'm having the same problem. When I import the .skel file, the SpriteSheet is empty and there's nothing in the dropDownList. The .skel, .json and .png are named the same and are on the same directory as the .gbx
  • Is it mandatory to use TexturePacker for importing the atlas or is it OK to use Spine as long as the files are named the same?
  • ok, and is there any tutorial on using TexturePacker alongside GameBuilder? because I export the atlas within TexturePacker but GBS keeps on missing it,
    Thank you
  • @kikubu yes here is a tutorial on importing Texture Packer sprite sheets https://gamebuilderstudio.com/tutorial/18/Importing-A-Sprite-Sheet-From-Texture-Packer

    GameBuilder Studio requires a JSON Array export from Texture Packer.

    There is also a tutorial on exporting from Spine: https://gamebuilderstudio.com/tutorial/127/Exporting-Spine-Animations-for-GameBuilder-Studio
  • but, If I understand correctly, I have to export from Spine, and then use TexturePacker for generate an atlas readable by GBS??

    Bacause I'm not able to just load my spine animations into GBS, I've tried a hundred times and nothing. Can you explain it step by step, please? Iv'e red the tutorials but something must be missing or wrong, it never reads the SpriteSheet no matter what.
    Thanks
  • @kikubu yes you export your Spine .skel file. Then you export your sprite sheet from Texture packer with all the body parts packed in it which will generate a .json file and a .png file. Either put all those files in the same folder with the same exact name. Or put the sprite sheet data file and image in the same folder with a different name but make sure that you add the name of the sprite sheet to the .skel file by adding the following to the json string:

    "atlasFileName" : "texturepacker_spine_atlas.json",

    Send over your spine and texture packer sprite sheet so i can look at them if you are still running into issues.

    Are you experiencing an error message or is GBs importing the file and just not attaching a sprite sheet?
  • Also, I don't understand why GBS need an array, since Spine is skeletal animation, it should need only the textures attached to the bones, but an array is for sprite animation, isn't it?
  • Ok, I'll check everything and post again the results, thanks!

  • @kikubu when you import a sprite sheet into GBs it needs to preserve the order of the frames. This is particularly important when you are doing animations using a frame index. If the frames are not in order then your animations will break. We chose to go with a JSON Array data format as the generic format export from Texture Packer to preserve the order based on the individual image names.

    In the future we can add support for additional atlas types, specifically Spine, and Starlings' for example. For now JSON Array is the expected file format. When you pack your sprite sheet in Texture Packer you have to make sure the frames are not rotated and you should sort the frames by name by choosing Basic packing algorithm.
  • I've tried again with your indications and still no luck, there's no error prompt on GBS it imports the .skel, just the texture is missing:

    Here are my files

    My Spine is updated (v1.9.17)

  • Lavon, thats what I didn't understand. I don't want to use SpriteSheets, just Spine skeletal animation. That's my mistake, when I said the spriteSheet is empty, thats OK because I don't have a Sprite Sheet generated and I don't want it, the problem is that the PNG associated to the .skel doesn't show. If I'm not wrong, GBS can use skeletal animation and mesh deformation, right?
  • when I import the skel into GBS, it seems to be fine, except I can't see or select my spine object.
  • @kikubu you can't use a spine animation without a texture. What will it render if there is no texture/sprite sheet?
  • @kikubu Spine .skel files only hold animation data. That animation data is applied to the bones of a Spine Skeleton that has attachments on it. Those attachments are individual textures. Those textures need to be laid out in a sprite sheet. I'm confused on where you are having an issue.

    Did you think Spine bundled everything into one file?
  • No, I know there are three files. One (.skel) for the animation data, other (.png) the texture and the last (.atlas) the texture pack data.

    The confusion comes from the tutorial:

    It made me think that you have to use only sprite sheets (packed animation frames) instead of just textures.

    one single texture is what I have, yet the tutorial shows one texture with multiple frames on it.

    My issue comes from the fact that I export from Spine, and generate an .atlas within it, but when I import it into GBS an drop it to the stage, I see nothing at all, not even a wireframe to select or a bounding box.

    If I generate the atlas from TexturePacker I get the same result.

    So:

    Spine -> export .json (renamed to .skel) with "generate .atlas "on"
    get 3 files file.json, file.skel and file.png
    import from GBS, seems to be OK, I see my asset as a file with an spine icon.
    Drop it to the stage, nothing happens.
    Look into the layers, and the object is there, but is not visible nor selectable on the stage. It has the "render" property but is not visible in the stage, preview or runtime.

  • @kikubu do not export the atlas from Spine. GBs currently can not use it. The tutorial I sent you for exporting from Texture Packer is explaining how to import individual images and generating one single image with a data file for GBs to read.

    • file.json - should be a JSON Array file from Texture Packer
    • file.png - should be the exported image with all the body parts laid out from Texture Packer
    • file.skel - should be the animation data from Spine.

    When you import the .skel file into GBs it should import an asset for each one of those files if done correctly. A spine asset, a sprite sheet asset, and a image asset.

  • @kikubu Let me look at your files, give me a minute.
  • @kikubu can you please send a zip file instead of a rar file?
  • I have import spine correct.
    The right way to import  spine is this:
    1.export your spine .skel
    2.use TexturePacker to packer all images (This is very importent) export two file: image.png image.json.
    3.Change the same name of three files , import the .skel to gamebuilerstudio.

  • @meishijiemeimei yes. I thought this was clear in the tutorial but it doesn't seem to be communicated effectively. I will edit the tutorial to make it clear not to use the Spine atlas but to pack your textures using Texture Packer.
  • Ok, I've tried what you proposed, meishijiemeimei  and something improved, now whem I import the .skel, it imports the .Json and the .png too (before it wasn't happening) but when I drop the .skel into the stage, I see nothing nor at runtime. Twice I was able to se the goblin's face at runtime, but suddenly it stopped apearing, very weird.

  • @kikubu that may be a bug. I will look at your files and let you know.

    I know that in the next release there is an additional flag added called "Render Skinned Meshes" The Spine runtime we are using is very performance intensive when rendering animations that have skinned meshes because it does not do any optimizations such as batching. So there is a new flag to turn off render meshes to optimize the Spine renderer. Try importing a Spine animation without any skinned meshes.
  • @kikubu which version of Spine are you running?
  • My Spine version is 1.9.17.
    I'm going to try without skinned meshes.

    Our app is going to use multiple skinned meshes per stage, do you know if there's going to be any kind of optimization or performance boost to meshes in GBS on sight? 
  • It Work with Non-Skinned animations, although my textures are weirdly scaled?!?!?!, but works.

    So meshes still don't work in GBS?
  • @kikubu we are using the official runtime provided by Spine so I don't know if they have plans for any further optimizations. But I am looking into it.

    There seems to be a problem with your Spine data file exported from v1.9.17 which is causing the Spine renderer to break. I will get back to you on this. We tested against v1.9.10. Skinned Meshes were rendering before v.1.9.17 :)

  • So It might be a problem with the new version of spine? because Im having glitches with the un-skinned mesh too, the images are scaled weirdly, although it works.

    I don't mean to bother you, it's just that we choose GBS over Corona (having already payed it) almost exclusively for the Spine integration, wich looked seamless.

    It's comforting that you put so much effort in helping, thats great.
  • Now it works!
    The problem was the Spine version, I dowgraded to 1.9.10 and now it skinned meshes work too.
    The only issue now is the scaling glitch, the atlas seems to be wrong, it scales everything up, but it could be a setting in TexturePacker or somethin I have missed.

    If you want I can contact Nate from Spine to make him aware of the issue .

  • I solved the TexturePacker issue too, now everything is all right.

    Thanks Lavon!!!!
  • @kikubu ok great! It looks like Spine updates their animation editor before updating all the supported runtimes, which is not a good practice.

    I do believe our Spine support is very seamless especially when you have to update animations after import. Live reload will just auto update the renderer once the file on the system hard drive has been overwritten. You don't have to re-import after a small change. It is important to note that when you import an asset and save your project the source files are copied to the resources folder under your project folder, if it is not already there, so a good practice is to copy your resource to that folder to begin with before importing them. Any changes to the source resource files should be made on the files in the resource folder after saving your project for the live reload to work.

    I will look into supporting the latest Spine editor changes for the next release.
  • @kikubu The Skinned Meshes performance issue has been fixed, will be in the next release! :)  http://esotericsoftware.com/forum/viewtopic.php?f=7&t=3193&p=15968#p15968

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion