I get the hero.json and here body picture from latest (http://www.esotericsoftware.com) software.
And follow the guide. But I think I met error now. Which my here was not ture.(And when the app run it don’t show up too)
What does your spinescene and hero atlas look like?
Ok, it looks all right. Check that the Atlas names are the same as the names used in Spine. If you have images in a subfolder that is part of the name you need to name the atlas entries the same. See http://www.defold.com/doc/spine#_atlas_caveats
Not figure out what’s meaning of “name the atlas entries the same”
In my case whether is “/main/hero/hero.atlas” ? I put hero dir in the main dir. and hero images dir was in hero dir.
Does this mean the json don’t know where to refer the png?
I copy the json, After install the tiral software from the path “D:\Program Files (x86)\Spine Trial\examples\hero\export”
It’s the names of the body part images. What are their names in Spine? Full name, including any directory (i.e. “head/eyes.png” etc). These names are saved into the json and the atlas that you use must have matching names.
I am confused now. In “D:\Program Files (x86)\Spine Trial\examples\hero” there is a file hero.spine and hero-mesh.spine. But in the guild it don’t mention the file has “spine” as suffix.
The hero json don’t have file path like head/eye.png. in here.json. The json looks like:(no place put some png into )
{
"skeleton": { "hash": "Zohq+efSyp8M0TPlT0tWlc2aowM", "spine": "Dev", "width": 318.74, "height": 333.7 },
"bones": [
{ "name": "root" },
{ "name": "Hip", "parent": "root", "y": 94.88 },
{ "name": "L_Ground", "parent": "root", "x": -31.28, "y": 0.26, "color": "00ff00ff" },
{ "name": "LookTarget", "parent": "root", "x": 112.83, "y": 218.2, "color": "8a009bff" },
{ "name": "R_Ground", "parent": "root", "x": 28.11, "y": 0.26, "color": "ff0000ff" },
{ "name": "L_Ankle", "parent": "L_Ground", "x": 0.26, "y": 33.05, "color": "ff3f00ff" },
{ "name": "LookConstraintGoal", "parent": "LookTarget", "y": -43.82, "color": "ff3f00ff" },
{ "name": "R_Ankle", "parent": "R_Ground", "y": 31.79, "color": "ff3f00ff" },
{ "name": "body", "parent": "Hip", "length": 60.79, "x": 4.09, "y": 3.17, "rotation": 96.39 },
{ "name": "thigh1", "parent": "Hip", "length": 23.94, "x": -17.51, "y": -5.22, "rotation": -107.07 },
{ "name": "thigh2", "parent": "Hip", "length": 23.65, "x": 21.85, "y": -5.86, "rotation": -85.46 },
{ "name": "head", "parent": "body", "length": 24.35, "x": 74.55, "y": -4.84, "rotation": -92.69 },
{ "name": "mantles", "parent": "body", "x": 48.47, "y": -9, "rotation": -2.25 },
{ "name": "shin1", "parent": "thigh1", "length": 28.23, "x": 29.76, "y": -0.91, "rotation": 10.26 },
{ "name": "shin2", "parent": "thigh2", "length": 25.35, "x": 31.99, "y": 2.96, "rotation": -2.25 },
{ "name": "upperarm1", "parent": "body", "length": 19.35, "x": 52.49, "y": 41.84, "rotation": 130.11 },
{ "name": "upperarm2", "parent": "body", "length": 25.98, "x": 57.94, "y": -38.93, "rotation": -178.95 },
{ "name": "bone2", "parent": "head", "x": 12.91, "y": 110.65 },
{ "name": "capeRoot", "parent": "mantles", "x": 19.61, "y": 14.01, "rotation": -90.45 },
{ "name": "foot1", "parent": "shin1", "length": 27.07, "x": 28.17, "y": -0.48, "rotation": -90.96, "inheritRotation": false },
{ "name": "foot2", "parent": "shin2", "length": 22.28, "x": 25.54, "y": 0.27, "rotation": -90.42, "inheritRotation": false },
{ "name": "forearm1", "parent": "upperarm1", "length": 22.06, "x": 23.97, "y": 5.16, "rotation": 30.56 },
{ "name": "forearm2", "parent": "upperarm2", "length": 15.3, "x": 28.74, "y": -0.9, "rotation": 6.79 },
{ "name": "hair01", "parent": "head", "x": 60.52, "y": 86.71 },
{ "name": "cape1", "parent": "capeRoot", "length": 29.18, "x": -2.88, "y": -14.83, "rotation": -102.96 },
{ "name": "hand1", "parent": "forearm1", "length": 28.01, "x": 27.54, "y": 0.44, "rotation": 16.24 },
{ "name": "hand2", "parent": "forearm2", "length": 23.76, "x": 22.8, "y": -0.21, "rotation": 1.35 },
{ "name": "cape2", "parent": "cape1", "length": 30.14, "x": 29.18, "y": -0.06, "rotation": 2.27 },
{ "name": "weapon", "parent": "hand2", "length": 157.4, "x": 15.97, "y": 1.43, "rotation": 77.9 },
{ "name": "cape3", "parent": "cape2", "length": 32.51, "x": 30.14, "y": 0.22, "rotation": 1.8 },
{ "name": "cape4", "parent": "cape3", "length": 33.02, "x": 32.51, "y": 0.06, "rotation": 4.95 }
],
"ik": [
{
"name": "L_Leg",
"bones": [ "thigh1", "shin1" ],
"target": "L_Ankle",
"bendPositive": false
},
{
"name": "R_Leg",
"bones": [ "thigh2", "shin2" ],
"target": "R_Ankle",
"bendPositive": false
},
{
"name": "LookConstraint",
"bones": [ "head" ],
"target": "LookConstraintGoal",
"mix": 0
}
],
"slots": [
{ "name": "cape", "bone": "capeRoot", "attachment": "cape" },
{ "name": "upperarm2", "bone": "upperarm2", "attachment": "upperarm2" },
{ "name": "sword", "bone": "root" },
{ "name": "hand2", "bone": "hand2", "attachment": "hand2" },
{ "name": "weapon", "bone": "weapon", "attachment": "Sword" },
{ "name": "fingers", "bone": "hand2", "attachment": "fingers" },
{ "name": "forearm2", "bone": "forearm2", "attachment": "forearm2" },
{ "name": "thigh2", "bone": "thigh2", "attachment": "thigh2" },
{ "name": "foot2", "bone": "foot2", "attachment": "foot2" },
{ "name": "shin2", "bone": "shin2", "attachment": "shin2" },
{ "name": "thigh1", "bone": "thigh1", "attachment": "thigh1" },
{ "name": "foot1", "bone": "foot1", "attachment": "foot1" },
{ "name": "body", "bone": "body", "attachment": "body" },
{ "name": "shin1", "bone": "shin1", "attachment": "shin1" },
{ "name": "upperarm1", "bone": "upperarm1", "attachment": "upperarm1" },
{ "name": "mantles", "bone": "mantles", "attachment": "mantles" },
{ "name": "head", "bone": "head", "attachment": "head" },
{ "name": "mouth", "bone": "head", "attachment": "mouth" },
{ "name": "eyes", "bone": "head", "attachment": "eyes" },
{ "name": "forearm1", "bone": "forearm1", "attachment": "forearm1" },
{ "name": "hand1", "bone": "hand1", "attachment": "hand1" }
],
"skins": {
"default": {},
"White": {
"body": {
"body": {
"type": "mesh",
"uvs": [ 1, 0.11883, 1, 0.46367, 0.9431, 0.58541, 0.89885, 0.70683, 0.94215, 0.82619, 0.75813, 1, 0.59793, 1, 0.15411, 0.85493, 0, 0.8704, 0.06102, 0.65598, 0.03757, 0.48936, 0, 0.32662, 0, 0, 0.23422, 0, 0.72782, 0, 0.90102, 0, 0.68019, 0.75104, 0.74731, 0.56314, 0.23, 0.54172, 0.31432, 0.27356, 0.19509, 0.68582, 0.73752, 0.28039 ],
"triangles": [ 19, 13, 14, 21, 14, 15, 21, 15, 0, 19, 14, 21, 11, 12, 13, 11, 13, 19, 21, 0, 1, 10, 11, 19, 18, 10, 19, 17, 21, 1, 19, 21, 17, 18, 19, 17, 2, 17, 1, 9, 10, 18, 20, 9, 18, 3, 17, 2, 16, 18, 17, 16, 17, 3, 20, 18, 16, 7, 9, 20, 8, 9, 7, 6, 20, 16, 7, 20, 6, 4, 5, 16, 4, 16, 3, 6, 16, 5 ],
"vertices": [ 63.56, -47.37, 30.83, -45.83, 19.54, -39.77, 8.22, -34.94, -3.29, -38.61, -18.95, -20, -18.22, -4.48, -2.43, 37.87, -3.2, 52.87, 16.86, 46, 32.78, 47.53, 48.39, 50.44, 79.39, 48.99, 78.32, 26.29, 76.07, -21.53, 75.29, -38.31, 5.02, -13.56, 22.55, -20.9, 26.93, 29.12, 52, 19.75, 13.42, 33.14, 49.42, -21.22 ],
"hull": 16,
"edges": [ 12, 32, 32, 34, 36, 38, 16, 14, 14, 12, 10, 12, 10, 8, 8, 6, 4, 34, 6, 4, 4, 2, 2, 0, 28, 30, 0, 30, 14, 40, 40, 36, 20, 36, 20, 18, 18, 16, 22, 24, 20, 22, 24, 26, 26, 28, 38, 26, 28, 42, 42, 34, 38, 42, 42, 0, 40, 18, 40, 32, 36, 34 ],
"width": 97,
"height": 95
}
},
I don’t know what the difference between hero.spine and hero-mesh.spine are but both are Spine specific files. Defold only works with json files exported from Spine.
My guess is that hero-mesh.spine contains mesh animated data. Defold supports mesh animation but only with bones. If the file uses vertex animations it won’t work.