- تم التحرير
Another sprites from atlas are shown in mesh. How to avoid?
It looks just fine in Spine editor, but after importing in Unity sprites are not shown correctly. The cropped parts of another sprites are shown through mesh area. Theese sprites are obviously just near sprites from sprite Atlas. Can i somehow avoid this?
So how it looks:
Image removed due to the lack of support for HTTPS. | Show Anyway
I have tryed to change packing settings on Polygons and Rectangles and it does not word. Howerver Grid packing works fine, but... it makes 16 2048x2048 atlases in my case (rectangles and polygons 4). So this is not really solution.
1) It this actually bug, or this behaivour is really intended?
2) Can i somehow workaround it, any trick?
3) I know this idea to rig multiple sprites on the same big mesh is pretty messy and "quick and dirty". Animations is not very nice. But so i can rig all 30 characters just via Linked Mesh. Is such rigging supported by Spine? Or this is really not how it is intended to be used and sprites should be always rigged ony the pretty tight mesh. Not as in my case, where a small tail takes lesser then 1/4 of mesh space.
4) Can i somehow pack all sprites via rect/poly, and only tails via grid?
5) Is this somehow related to multiple skins in rig, or this is a generic problem?
So do i have any better options, as rerig everything vis unique meshes?
Spine: 3.8.75
Runtime: spine-unity-3.8-2019-10-22
upd:
Image removed due to the lack of support for HTTPS. | Show Anyway
6) btw: is this bleeding? only happens with rectangle packing, but with poly-packing works fine.
You likely exported with pre-multiplied alpha and didn't enable it in Unity, or vice versa. See spine-unity Runtime Documentation: Advanced Premultiplied vs Straight Alpha Import
Thanks for reporting this problem and sorry for the inconvenience!
This looks as if the Alpha is Transparency
parameter is enabled at your atlas texture (which was most likely exported with the default premultiply alpha
export setting), which should be disabled at premultiply alpha
atlas textures.
I have quickly tested the automatic import settings and have found a bug affecting Unity 2019.1 and 2019.2, where default texture import settings have not been applied on new assets (due to different path backslash vs forward-slash behaviour).
This issue has now been fixed and new unitypackages are available for download here as usual:
Spine Unity Download
Thanks again for reporting.
Thank you. 6 is solved.
But what about 1-5? So basically my sprites are shown through mesh from atlas.
Sorry, I had forgotten to reply to these questions.
In general it is not a good idea to reuse the same mesh via a linked mesh for completely different image size. As you mentioned, deformation of vertices will be bad and you end up using a lot of vertices for empty space (and also unnecessary overdraw). We would recommended using a separate mesh that fits the image.
In case you really want to stick to your workflow:
Does the smaller tail have exactly the same transparent space around it in the original image (before the atlas)? Do you have Strip Whitespace X/Y
enabled at the atlas export settings? If yes, could you have a try disabling whitespace stripping? This should then leave the transparent area around your image as is.
Harald wroteStrip Whitespace X/Y
Ah, thank you, that is exactly what i missed.
But anyway, it was rather bad idea from the beginning, i have already redone them on custom meshes. Actually i spent more time trying to make them work on the single mesh, as time it took for rigging them separatly.