Thanks for the reply.
I'm sorry but I still don't understand some concepts. I apologize since I know these things a pretty basic:
Well, I use scale and suffix to create two different atlas, for retina and non retina. Since scaling on the app was creating some aliasing. But the problem I see is that, let's say my skeleton name is : boy. When I export the animation, I export boy.atlas and the atlas image. boy.png, and here is the problem. boy.png size is: 2048x2048 but if I open the boy.atlas as txt, it says
"boy.png
size: 2044,2024
format: RGBA4444"
And unless I change the size to match 2048x2048, then the animation won't run in cocos2d-x
Nate написалYes, you can create your atlas using Texture Packer Pro. Choose the libgdx atlas format. I think newer versions actually have a "Spine" export format, which is the same.
Ok, I think I got it, but not sure 100%: Is this the way?
- edit files in photoshop and use LayerstoPNG.
- Import json data into spine.
- animate
- file/export/->json (unclick atlas, so I don't create the atlas from Spine.
- Open texture packer pro. Load all the images used for animation.
- (we are using cocos2d-x) Use output "data format" LibGDX and texture format "zlib compr, PVR(.ccz)
- ?? I am using meshes, but I don't see any option to unclick strip white in Texture packer pro, but there is an option "clean transparent pixels" is this the shame as "strip white?" . Can I activate it with meshes?
One question regarding this workflow. I have two skeletons. One for character animation and one for background animations.
When I export the atlas from spine, it creates two atlases and two json files. Can I combine all the images in texture package pro and export just one atlas for efficiency? and end up with just one atlas and two json files?
If not, is there an easy way to combine two skeletons into one in spine setup mode? so I could use just one global atlas instead of several png or pvr files for each skeleton?
muffunny написалNo idea. Please post the problematic JSON.
This is the problematic json. I see that in this json after "bones" it has an x,y coordinate, that in another json I have exported, it doesn't. Maybe I move the root with translation by mistake instead of moving the bones.
Thanks
{
"skeleton": { "spine": "1.9.17", "hash": "WaOUaZC5tx7vdQOjMteK9A22aAM", "width": 184.13, "height": 391.06 },
"bones": [
{ "name": "root", "x": 1041.62, "y": 272.61 },
{ "name": "arm animate", "parent": "root", "length": 48.29, "x": 67.55, "y": 257.9, "rotation": -115.74 },
{ "name": "arm tshirt animate", "parent": "root", "length": 35.69, "x": 73.67, "y": 259.61, "rotation": -114.91 },
{ "name": "p4_Cloth1", "parent": "root", "length": 40.55, "x": 44.28, "y": 171.21, "rotation": -75.66 },
{ "name": "p4_Cloth2", "parent": "root", "length": 41.79, "x": 37.2, "y": 169.93, "rotation": -75.74 },
{ "name": "p4_Cloth3", "parent": "root", "length": 33.93, "x": 36.04, "y": 169.92, "rotation": -80.61 },
{ "name": "p4_Glass", "parent": "root", "length": 32.53, "x": 150.37, "y": 296.6, "rotation": 142.34 },
{ "name": "p4_H_0", "parent": "root", "length": 62.11, "x": 122.72, "y": 367.33, "rotation": -115.65 },
{ "name": "p4_H_1", "parent": "root", "length": 58.94, "x": 129.79, "y": 360.9, "rotation": -116.38 },
{ "name": "p4_H_2", "parent": "root", "length": 46.75, "x": 142.65, "y": 362.18, "rotation": -121.22 },
{ "name": "p4_H_3", "parent": "root", "length": 56, "x": 110.5, "y": 369.9, "rotation": -111.48 },
{ "name": "p4_H_4", "parent": "root", "length": 45.14, "x": 150.37, "y": 364.11, "rotation": -115.99 },
{ "name": "p4_H_5", "parent": "root", "length": 60.81, "x": 130.44, "y": 370.54, "rotation": -109.51 },
{ "name": "p4_H_6", "parent": "root", "length": 58.68, "x": 156.8, "y": 359.61, "rotation": -124.71 },
{ "name": "p4_H_7", "parent": "root", "length": 58.17, "x": 117.58, "y": 384.69, "rotation": -103.29 },
{ "name": "p4_H_8", "parent": "root", "length": 93.88, "x": 109.86, "y": 355.75, "rotation": -90 },
{ "name": "p4_Shirt", "parent": "root", "length": 52.33, "x": 84.78, "y": 262.52, "rotation": -95.39 },
{ "name": "p4_Shirt_top", "parent": "root", "length": 30.81, "x": 68.71, "y": 259.95, "rotation": -113.03 },
{ "name": "p4_bananas", "parent": "root", "length": 17.27, "x": 105.36, "y": 219.44, "rotation": 135 },
{ "name": "p4_body", "parent": "root", "length": 311.21, "x": 48.15, "y": 55.88, "rotation": 73.64 },
{ "name": "p4_shoes", "parent": "root", "length": 38.96, "x": 70.64, "y": 10.46, "rotation": 128.19 },
{ "name": "p4_top_arm", "parent": "root", "length": 57.1, "x": 50.71, "y": 237.44, "rotation": -82.37 },
{ "name": "bone2", "parent": "arm animate", "length": 36.25, "x": 50.48, "y": -0.88, "rotation": 42.88 },
{ "name": "bone3", "parent": "bone2", "length": 16.43, "x": 36.96, "y": 0.17, "rotation": 0.26 }