- Đã chỉnh sửa
Assign a region in a PNG file to a Slot
Hi,
I have multiple images (Head, legs, torso) in a single PNG file created with the TexturePacker application (not an Esoteric app) and I have added this file to the 'Images' folder in my project. I also have an .atlas file for the PNG file but cannot see how to import this data into Spine Essentials.
My steps:
- Added my PNG file to the project (in 'Images')
- Added multiple bones to my skeleton - a human figure with head, torso, arms and legs. Each bone has a slot.
How do I select the head bone slot for example, and assign it the region in the PNG at x = 64, y=64, width=32, height=32 ?
This is basically duplicating the work of the .atlas file.....
Will continue to read the User Manual.
Thanks,
Serge
UPDATE:
Looks like this is not possible. I found this in Images - Spine User Guide
"Each part of the skeleton that will move independently needs to be a separate image file."
The standard workflow for spine is to carve up your character into a whole pile of independent images (usually automatically, for instance by exporting the layers of a photoshop file with the provided script). Then later, when you move to export the file Spine will automatically take all those images and package them into an atlas. That is, you don't need to do it yourself ahead of time.
However, if you really want to do that (maybe you need to be really particular on atlas packing?) then here's a way: assign your atlas to a slot, then turn the sprite into a mesh. You can adjust and add vertices to that mesh so that it carves out only what you want carved out for that slot. Repeat across as many slots as needed, you can reuse the same image in multiple slots!
There's also a texture packer and unpacker tool on the main top left menu that I believe is used for atlas management, though unfortunately I haven't use it or taken a look at the docs for it. It might be relevant to your purposes though, so you may want to look into it!
Ian,
The standard workflow for spine is to carve up your character into a whole pile of independent images (usually automatically, for instance by exporting the layers of a photoshop file with the provided script). Then later, when you move to export the file Spine will automatically take all those images and package them into an atlas
I will just do this as I have no real need to use an atlas as inputs to Spine. An interesting problem I will have later is I will have multiple spine generated atlases, which I may want to amalgamate into a smaller number of larger atlases.
Interesting turnaround, but remember meshes are not available in Spine Essential.
The best workflow would be to use the separate images in Spine and your atlas with the Spine exported json/skel if you don't intend to use the Spine atlas.
Erika đã viếtInteresting turnaround, but remember meshes are not available in Spine Essential.
Ah, whoops! Forgot about that... ^_^;