- Изменено
Retaining image fidelity when scaling down
I notice that when I scale down the spine character animation (around 0.5 of original size ) for exporting to Unity it starts to break pretty hard . Is there any tips on retaining image fidelity instead of having to make a new one with the exact size needed in my game.
I want to use the same spine character for 2 scenes in my game . One is the in-game scene and the other is in the shop menu where he would be twice the size seen in-game . Is there any way I can just import the character with the size of him in the shop and just scale him down to half in-game without him getting pixlated ?
Could you show us a screenshot of the "non-broken" and "broken" version of your character?
You can specify the scale of your through the Scale
parameter on the SkeletonData as outlined here: spine-unity Runtime Documentation: Skeleton Data
You can also change the scale of a Skeleton via C# as outlined here spine-unity Runtime Documentation: Changing Scale and Flipping a Skeleton
The original scale is around 600x1200 , when I scale the character down to be more in line with other character , which is around 300x600 in dimension it gets really pixlated . Here's the Spine view vs in-game build view
This is for mobile btw
Can you show me your settings for the texture atlas export? Can you show us the .png
file of the scaled down tetxure atlas pages? You should use Bicubic
From the screenshot it looks like you 1) scale down the atlas and additionally 2) scale down the game object. It also looks like your texture filtering settings are set to nearest filtering (or point filtering in Unity speak), which results in the pixelated look. See https://docs.unity3d.com/Manual/TextureTypes.html.
Thanks for your reply .
Here's the setting i used for exporting as well as the setting on the png texture imported to Unity.
You were right that I scaled down the game object for my 0.5 in-game version , is there a better way of scaling it down ?
Both the original and down scaled texture atlas pages look OK. The scaling of the game object triggers texture filtering, which according to your screenshot is set to Bilinear
which should result in much less pixelation than in your screenshots. I also see resizing options on the Unity texture dialog. I'm not a Unity expert, but this could be a reason for pixelation as well. I'll forward this to Harri our Unity wizard, maybe he has an idea how to resolve this on the Unity side.
Sorry for the late reply.
The cause of minification looking pixelated is that Generate Mip Maps
is disabled in your texture import settings. You can enable it to receive a smoother, but blurrier result.
I had the same problem. I opted to match the scale in engine within Spine's export settings in the end. So if your final scale is 0.5 in the engine, the Spine export scale should also be 0.5 to ensure no jaggies appear. The export scale only scales the atlas so you still have to scale the skeleton itself in Unity.
Thanks for the hint, Arnissan!