- Edited
All My 2D Toolkit Spine Noob Questions
So I am still learning Unity, Spine and 2D Toolkit. My first project is from a client that wants a Massive Avatar system! (Of Course) I have been supplied with 1,075 pieces of art. A variety of different arms, legs,hairstyles, ETC....
So here is Every question I have so far, In order to Hopefully solve this issue:
_1 2D Toolkit saves Texture Coordinates when it Dices Atlases, So why doesn't the Spine run-time use this data? From what I have Seen on the forum we are blocked from using this Invaluable Tool.
_2 When I am in Spine Setup do I have to add each image for every Body part? For Example If I have 20 Right Arms, Do I add all 20 to the skeleton and turn off the Visibility on 19?
_3 How do I use Spine and 2D Toolkit and get past the 4096 X 4096 Atlas Size Limit?
_4 If Question 3 has no Solution, Spine has an Atlas export. Can I use this to get past the 4096 X 4096 Atlas Size Limit? (Be Aware I have No Idea how to use this Spine Feature and can Not find any Docs to explain it)
_5 Why can't I just add Multiple Atlases in the Spine 2D Toolkit Run-Time???
Other Notes: I am an artist, Not really a coder. So please explain as simply as possible. I do know that the 1,075 images will be broken up over 6 Skins.
Thanks for Any and all Help!
Sorry I can't answer all your questions. I just have hunches since I use Spine-Unity.
(2) Skins removes the need to turn off visibility. But you do have to add 20 right arms. But if you named your files systematically, Spine has a nice find-and-replace feature. I haven't tried it though, but it supposedly speeds up the multiple skin setup process.
(3-5) Spine-TK2D supports making Spine skeletons (and essentially meshes) that pull textures from more than one atlas. Not sure how it's done in TK2D but people have done it. I recall Unity 4.2 having problems with draw order though. Not sure if they fixed it yet.
So it's more like more than one 4096x4096. I'm not sure if max texture sizes are actually smaller for mobile. It'll probably break batching but that's just how it goes if you need a lot of parts, I think.
I'm sure Nate can help you out. He's probably just out for the holidays.
Well thanks for an Excellent Start. I will need to talk with Nate I'm sure. We are facing a pretty Tight Deadline, So I will need to figure it out.
Apparently Skins only allow one image, Making them Instantly Useless for an Avatar System. If I have 12 color variations of a Pirate Male and a Pirate Female. I can't just Make 2 skins and add the dozen images to each. There has got to be a workaround for this....
You use very strange, arbitrary capitalization.
1) You use a TK2D atlas with spine-tk2d.
2) You can create 20 skins. When you change skins, it uses the alternate attachments. See the skins video.
3, 4, 5) GPUs have a max texture size. 4096x4096 is huge, eg an RGBA texture at that size takes 64MB of memory. A Spine atlas can have multiple pages, not sure about TK2D.
In the Skins Example you have the command to change the weapon. However the weapons are not in a Slot. What would be the Proper Unity command to do this if they were in a Slot called "GoblinWeapons"?
Thanks Again
Nate wroteYou use very strange, arbitrary capitalization.
1) You use a TK2D atlas with spine-tk2d.
2) You can create 20 skins. When you change skins, it uses the alternate attachments. See the skins video.
3, 4, 5) GPUs have a max texture size. 4096x4096 is huge, eg an RGBA texture at that size takes 64MB of memory. A Spine atlas can have multiple pages, not sure about TK2D.
Yes my Typing is Horrible at Best. My concern is that complex Clothing systems wouldn't work with this method. One Character Type may have 14 different colored torsos for a jacket but he could have 50 different colored sleeves. Then another character type could have radically different numbers.
So I would be making 10 of thousands of "Skin Nodes" for all the Possible combinations. After reading the docs again I think it may be possible to Make a Skin Node for each body part for each character type then override the attachment at runtime. But I'm not totally sure on that because I am still a bit lost on your commands in Unity.
See this thread about combining skins at runtime:
viewtopic.php?f=3&t=618
SoloChristian wroteIn the Skins Example you have the command to change the weapon. However the weapons are not in a Slot. What would be the Proper Unity command to do this if they were in a Slot called "GoblinWeapons"?
All attachments are in a slot if they are attached. Attachments not in a skin in Spine are in a skin called "default" at runtime. Skeleton#SetAttachment() looks for an attachment first in the skeleton's skin, then if not found it looks in the default skin.
SoloChristian wroteYes my Typing is Horrible at Best.
Well, you could just not capitalize words unless they actually need it. Most of the time, just capitalize the first word in a sentence and the word "I". Capitalizing words randomly is just wrong. It doesn't add emphasis to what you are trying to convey, it is just poor formatting.