- Изменено
DanielEgan

- 9 янв 2014
- Регистрация: 11 окт 2013
I have not been in Spine for a few months because I have been working on my game. I needed to tweak an animation and now when I go back to my Spine files, the animations are missing.
I can see them in the tree (The names anyway, walk, stand, run, etc..) but not in the dopesheet
Did something happen in an update that I am not aware of?
Thanks,
Daniel
EDIT : Nevermind... somehow all of them got unchecked (unclicked) in the tree.
Below is what mine looks like. I was looking for the word attachment (sorry) So below, skinName is 'default'. slotName is 'Clyde_L_Foot', and attachmentName is 'Clyde_L_Foot'
"skins": { "default": { "Clyde_L_Foot": { "Clyde_L_Foot": { "x": 34.32, "y": 3.09, "rotation": 2.33, "width": 121, "height": 43 } }, "Clyde_L_Hand": { "Clyde_L_Hand": { "x": 26.68, "y": -10.34, "rotation": 4.34, "width": 68, "height": 58 } },
So #1 Bones.. got it
#2 Attachment (Above.. got it)
#3 Bounding Box.. not using, so ignoring...
#4 Verifying belowSo if I find Translate in the animation like below, I should multiply all the x and y's I find with the scale.
"translate": [ { "time": 0, "x": -23.87, "y": -2.98 }, { "time": 0.1666, "x": -16.41, "y": -10.44 }, { "time": 0.2, "x": -2.88, "y": -13.94 }, { "time": 0.3333, "x": -8.95, "y": -17.9 }, { "time": 0.6666, "x": -23.87, "y": -2.98 }
Thanks for you patience.. Much appreciated.
Daniel
Almost there... Thanks.
My json export doesn't have an X or Y just attachment name. (for attachments)
sorry... That was slots... Let me look again when I get back home.
So following your numbering :
1) OK.. So in the bones... the x y and length
{ "name": "L_Let_Upper", "parent": "Hip", "length": 55.58, "x": 15.56, "y": -26.33, "rotation": -45.72 },2)The only place I see attachment is in the slots.. but I don't see an x, y
{ "name": "Clyde_L_Foot", "bone": "L_Foot", "attachment": "Clyde_L_Foot" },3)I am not sure what you mean here :
bounding box vertices
4)And in Animation I see Translate, but I am not sure what to change.
"translate": [
{ "time": 0, "x": 0, "y": 0, "curve": "stepped" },
{ "time": 0.1666, "x": 0, "y": 0, "curve": "stepped" },
{ "time": 0.3333, "x": 0, "y": 0, "curve": "stepped" },
{ "time": 0.6666, "x": 0, "y": 0 }Thanks again for your help.
Daniel
Sure... that makes sense. Do you have a quick tip as to what I need to modify in the JSON. Like an example of one data node and how to change it. Do I need to Change the bones, slots, or skins section? Or all three. I assume I would not need to change the animations since when I do it manually it works fine.
Looking at the json.. It looks like Slots would not need to be changed.. but maybe bones and skins.
If you had a chance to help with the math to scale them ... IE 1024 x 1024 original to work with in Spine. need 64 x 64 images (pieces of course smaller).
So I would need to scale down 16x .... So do I just need to scale the length? the x and y?
Thanks for you help. I could write the script from there.
Daniel
Hey Nate,
The trouble I am having is this. When the image is too small (64 x 64) then I don't really have room to manipulate the bones for animation.
I have posted a couple of pics to show you what I mean.
http://thesociablegeek.com/uncategorize ... r-sprites/
When the image is too small, I am not able to actually see the bones to manipulate them for animation. In addition, It is really hard to line up the different pieces at that resolution (3rd pic on post)
What I have been doing for now is using a bigger image, creating the animation, and then swapping out for smaller image pieces. When I do this, I then need to of course shorten the bones (Translate).
If I reduce the images after exporting the animation, it creates anomalies around the edges.
Does that make sense?Daniel
I cant imagine that this is an edge case. Am I the only one that needs images at 48 x 48 or 64 x 64 and doesn't use the runtimes.. just wants the pngs to load into my game. If I use bigger in Spine to be able to see to align the images and then try to reduce the size after in photoshop, they of course look like crap.. If I use the image size I need then I cant line them up in spine.
Thanks Nate.. but that's only if you are using json right? If I am just exporting the .png files, then I cant do that right?
As I said above, I am using this to show younger kids how to make games and json is over their head.
Thanks Nate,
That makes it pixelated instead of fuzzy
Am I to assume that is my best bet?
Meaning, is that my only option when exporting pngs? Or is there another option in spine to line things up with larger images (so it is clear) and then use different images later?
I am testing bringing in his parts at 256 and then reducing the results from spine(the png's) to 48 using photoshop. Is that my best bet?
Daniel
- Изменено
I am not sure what forum to put this in. I have looked through the forum to see if I could find and answer to this but most of the posts on this topic refer to the json export.
I am trying to export to PNG to just simply import into GameMaker.
I create my images using Inkscape, and export each piece (body, head, upper leg, etc..) to use in Spine. This works fine if I save them from Inkscape at 800px x 800px. But obviously when I export from Spine the related images are too big for my game. (and shrinking them in photoshop pixelates them)
If I save them from Inkscape in the size I want ( 64 x 64) then try to use them in Spine.. it is too small and increasing the viewing size in Spine makes it fuzzy and hard to line up.
Any help would be appreciated.
I am teaching kids how to build games using gamemaker and want to include Spine so exporting to binary or json doesn't fit into the level of the course.