roomyrooms

Hey! I'm currently messing around with spine-unity and thinking about shifting from my existing spine runtime (pixi.js). In pixi.js, I don't have the following issue:

https://i.gyazo.com/3a1b818e6d58527c7752d1ba925d8815.mp4

And I can't seem to figure out how to fix it. I'm using the pixel perfect camera for this. I don't have pixel snap on in either spot, and I have the material set as Spine/Sprite/Unlit.

Is there a way to get it to look like the scene view on the left? Obviously it'll get distorted when zooming in and out, but the distortions in the game view are consistent no matter the zoom level.

As long as it looks correct @ 100%, 200%, etc., I don't mind.

PS: My PPU is set to 32 and I have the spine skeleton scale set to (1/32). Not sure why 1x scale is huge, actually, since my base atlas image is 1:1 pixel size, and my scales in spine are all 1x (this is unique to spine-unity- 1x scale in pixi's runtime is accurate to the atlas image).

This is v3.8.
roomyrooms
  • Postovi: 6

Harald

Sorry to head you're experiencing troubles! In general there is no known incompatibility of the spine-unity runtime with Pixel Perfect Camera rendering, at least none that we could reproduce so far.

Did you check whether a normal Sprite (a non-Spine Sprite, a normal image dragged into the scene resulting in a Sprite Renderer GameObject) renders correctly when moved around? If this is not the case, then the problem lies outside of your skeleton asset.
roomyrooms je napisao/la:PS: My PPU is set to 32 and I have the spine skeleton scale set to (1/32). Not sure why 1x scale is huge, actually, since my base atlas image is 1:1 pixel size, and my scales in spine are all 1x (this is unique to spine-unity- 1x scale in pixi's runtime is accurate to the atlas image).
The actual displayed size depends on your camera settings as well (mostly the Pixel Perfect Camera component Inspector settings, especially whether Run in Edit Mode is enabled) and also a bit on your Game View settings (the aspect ratio / resolution). Unfortunately there are many settings that can lead to incorrect preview or rendering with Pixel Perfect Camera, some can be seen e.g. at the start of this tutorial video.

Other problems could be having an exported atlas texture not being a power of two and having the Texture import settings Advanced - Non-Power of two set to anything but none, attachments not being of scale 1 (which you said is the case) or having them located at fractional positions or rotated.

If your problems still persist after checking the potential causes listed above, could you please send us a minimal Unity project that still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum URL so that we know the context. Then we can have a look at what's going wrong.
Avatar
Harald

Harri
  • Postovi: 3589

roomyrooms

Alright, I managed to figure out a lot of what was going wrong here. Thanks for the reply and the help! It was actually a few things like you said:

1. Changing the pack settings to use a power-of-two size (4096 in this case) seems to have stopped the weird warbling effect with the pixels as they move.

2. I upgraded to URP- not sure how much it helped, but URP has its own pixel perfect camera component which seems to have resolved a remaining issue after the ^ first.

2a. URP's PPC also makes needing to manually set camera size irrelevant, which is nice (it seems to do what that tutorial does, just by itself)

There are still a few "weird" things, like if the camera is at exactly 0,0 the model will glitch slightly on whole integer positions (??? very odd), but that's so out there that it doesn't bother me at all. Everything else seems to be working as intended. To be honest, using power-of-two sizes for the textures will probably help my existing implementation quite a bit as well.

Thanks for the help! I'm always happy to be a spine user with support like this :)
roomyrooms
  • Postovi: 6

Harald

Very glad to hear you've figured it out, and thanks for your kind words. :)
Avatar
Harald

Harri
  • Postovi: 3589


Natrag na Unity