Spine getting started
by Dan McLaughlin · in Torque 2D Beginner · 08/17/2014 (10:49 am) · 5 replies
Hi Fine folks,
I got a copy of Spine and am trying it out. Overall a nice process that works well.
Looking at the getting started documents ...
github.com/GarageGames/Torque2D/wiki/Animation-Guide
github.com/GarageGames/Torque2D/wiki/SkeletonObject-Guide
Here's the recommended steps I pieced together, with a problem I'll note at the end
Now the problem, I've done all that, but I get a run time assert() (which only shows up in debug compiled bits - buyer beware, it crashes in release bits)that the atlas hasn't been loaded. I'm mucking around with it but aren't sure what the problem is. Thoughts?
Edit: Here's the assert
AssertFatal(mAtlas != NULL, "SkeletonAsset::buildAtlasData() - Atlas was not loaded.");
in
void SkeletonAsset::buildAtlasData( void )
I also went into the taml file for the Assets module and changed it too
so that it's reading everything in there - I think. But still the atlas isn't being loaded
I got a copy of Spine and am trying it out. Overall a nice process that works well.
Looking at the getting started documents ...
github.com/GarageGames/Torque2D/wiki/Animation-Guide
github.com/GarageGames/Torque2D/wiki/SkeletonObject-Guide
Here's the recommended steps I pieced together, with a problem I'll note at the end
- Do your graphic in Photoshop or Fire Alpaca (ideally PS). Make each movable part a different layer
- Use the PS script "scripts/photoshop/LayersToPNG.jsx" to export to to Spine (this script comes with the Spine installation, it's in the install directory of either platform). Create a atlas, png and json file
- Create a "animations" subdirectory in your assets module
- Create a CHANGEME.asset.taml file describing what you have in the same directory as the spine files, per the Animation-Guide above
- Create your skeleton sprite via "%spritey= new SkeletonObject();" per the guide, and forth as shown above
Now the problem, I've done all that, but I get a run time assert() (which only shows up in debug compiled bits - buyer beware, it crashes in release bits)that the atlas hasn't been loaded. I'm mucking around with it but aren't sure what the problem is. Thoughts?
Edit: Here's the assert
AssertFatal(mAtlas != NULL, "SkeletonAsset::buildAtlasData() - Atlas was not loaded.");
in
void SkeletonAsset::buildAtlasData( void )
I also went into the taml file for the Assets module and changed it too
<ModuleDefinition ModuleId="Assets" VersionId="1" Description="A nice mix of assets used by all the toys." ToyCategoryIndex="0"> <DeclaredAssets Path="assets" Extension="asset.taml" Recurse="true"/> <DeclaredAssets Path="assets" Extension="asset.json" Recurse="true"/> <DeclaredAssets Path="assets" Extension="atlas" Recurse="true"/> </ModuleDefinition>
so that it's reading everything in there - I think. But still the atlas isn't being loaded
About the author
#2
Yes the SpineToy works fine and I've compared my stuff to that, it all looks the same. Just the basic getting started, most puzzling.
Here's a link to my (crappy!) first example
drive.google.com/file/d/0B6loGN35GlgKX01EdWRyYkdEd1E/edit?usp=sharing
One thing is that I used the "Pretty Print" option on the Spine output, just so I could look at the files. Shouldn't make a difference but possibly the T2D parser is having trouble with it.
08/18/2014 (3:44 am)
Thanks Mike,Yes the SpineToy works fine and I've compared my stuff to that, it all looks the same. Just the basic getting started, most puzzling.
Here's a link to my (crappy!) first example
drive.google.com/file/d/0B6loGN35GlgKX01EdWRyYkdEd1E/edit?usp=sharing
One thing is that I used the "Pretty Print" option on the Spine output, just so I could look at the files. Shouldn't make a difference but possibly the T2D parser is having trouble with it.
#3
from your Atlas file.
T2D doesn't parse it as of yet.
08/18/2014 (11:31 am)
Try removing the line size: 994,117
from your Atlas file.
T2D doesn't parse it as of yet.
#4
It's the default output from Spine so we'll want to add that parsing.
08/18/2014 (5:29 pm)
Thanks Simon, yup, that works. It's the default output from Spine so we'll want to add that parsing.
#5
Spine has advanced a lot since then but the new techniques it supports (mesh deformation, IK) would require a relatively major rewrite of T2D's rendering system.
08/18/2014 (5:50 pm)
@Dan : Yup, they've added that after T2D's Spine implementation was revamped.Spine has advanced a lot since then but the new techniques it supports (mesh deformation, IK) would require a relatively major rewrite of T2D's rendering system.
Associate Mike Lilligreen
Retired T2Der
Do you have an example png, json, and atlas file from Spine that we can download to see if we can replicate the crash?
Have you tested out the SpineToy in the Sandbox? Do you have the same issue? I just ran a fresh copy of T2D 3.1 and the SpineToy works for me.