- Düzenlendi
Feature suggestions: split atlases
Hey everyone!
I'm putting together some pretty large scenes that for ease of workflow are all inside one project. This results in quite a large atlas.
It would be very useful if spine could output and reference multiple atlas textures. Right now I'm forced to scale down some of my background slices in order for them all to fit into a 4k texture.
Cheers!
Hi, not sure what you mean but our exports from spine into unity contain more textures if texture packer can not fit images on given setting export texture size.
Hello Antidamage, Spine can already pack your images however you prefer them through Texture Packer, you can find lots of options and all the instructions here:
Texture Packing - Spine User Guide
You're right, I wasn't recalling my issue correctly, sorry.
It might help if I write down my workflow:
- Illustrator makes scene as layered photoshop file (it's a kids book).
- I come in and merge the relevant layers and export using the Spine export script
- Import scene into the spine editor and add animations
- Export and import to UE with one scene per page
The issues I run into all the time are:
- As it's targeting mobile I reduce background images down in size. I do this after the images are imported so that they auto-update but keep their perceptual size, but this only works 50% of the time. The rest of the time the image updates but now draws smaller. It seems random which result I get.
- Sometimes the layers were bigger than the document by a few pixels, so a layer might be 4098 pixels wide. My target atlas size is 4096 pixels. It would be fantastic if it could just scale down images like this to fit into the atlas.
- The above process is still a pain, being able to specify that a particular image slot scales down to 50% on export would be much better. I don't want to scale every image slot, just the background ones.
Can #2 and #3 be considered for feature inclusion?
I also hit an unrelated issue that's worth mentioning: if I make ANY changes to the PSD file I have to scrap the spine scene and start over. A reimport function would be VERY MUCH APPRECIATED. This is a HUGE deal and would have saved me a hundred hours over the last two weeks. Any way to retain the spine scene's rigging while importing new image slots and changes to existing images (including dimensions) would be fantastic. Is there a workaround where I can re-export the scene and manually add and import new slots? (Sorry, I'm really short on time and can't experiment)
You can add images and slots to a spine animation at any time. Just export the updated parts from PS manually without the script and over-right the old images. Any size change won't mess anything up unless the image has been made a mesh, just might have to adjust some things a bit. I would also suggest removing the BG images from your spine export and add them in the engine instead. That way your atlas is only for animation and the engine can do the compression of the big BG images it's own way.
3. being able to specify that a particular image slot scales down to 50% on export would be much better. I don't want to scale every image slot, just the background ones.
This suggestion is actually a good one and would also be one of the feature I would suggest if no one else is mentioning. I also do this all the time using different scale for different parts to compose scenes. e.g. background, shadow, sun shine/lights are usually large and could tolerate blurry. After a scene is done, I usually resize those images in the image folder and change the scale to 2x in Spine. (note that Mesh may have issue.)
For an animation, some parts may not needed to be detail but they could be large.It make sense to use a lower resolution image to reduce export size. If spine provide an "export scale" option ( like 25%,50%,100%) on attachment panel to control the local export size, it would definitely save me more time and effort.
I would also suggest removing the BG images from your spine export and add them in the engine instead. That way your atlas is only for animation and the engine can do the compression of the big BG images it's own way.
Only work If the background is one big still image. A background could be composed of multiple animated large parts.
For an instance, I worked on ship scene where the background is animated sea water with a still wood platform and a large floating ship on top. Most parts are dynamic but still need to be scaled down.
madmike yazdıYou can add images and slots to a spine animation at any time. Just export the updated parts from PS manually without the script and over-right the old images. Any size change won't mess anything up unless the image has been made a mesh, just might have to adjust some things a bit. I would also suggest removing the BG images from your spine export and add them in the engine instead. That way your atlas is only for animation and the engine can do the compression of the big BG images it's own way.
Definitely keeping the background images, if only for the reason that it turns out Spine will bleed the alpha and solve a huge and tedious issue I was running into. I have no idea how I was going to fix the edge alpha otherwise and keep my sanity.
Multiple texture files is fine and it packs them well. It's just a case of needing them to be scaled without the editor being loopy.
Thanks for the pointer about meshes guys. I converted everything to mesh, even the stuff that wasn't animated, and those are usually the bits that end up needing to be scaled. I'll try not doing that in the next scene I make.