• Unity
  • Apply cutoff texture to spine animation

Related Discussions
...

Hi everyone, I'd like to achieve the effect shown in the following image. Basically I have animated this character in spine, but for characters that have not been unlocked yet I'd like to have a moving texture (the question marks) while the character is still animating.

Below you can see a video from another of our games where we achieved the effect for a non-spine non-animated character

I was trying to get this effect by applying an effect with the All In 1 Sprite Shader by Seaside Studios (https://assetstore.unity.com/packages/vfx/shaders/all-in-1-sprite-shader-156513) but when I apply the texture, well, the result is not what I was expecting because of how the character is built I believe. Is there a way I can achieve this effect? Maybe with another asset since there is a sale right now in the Unity asset store.

Thanks in advance

Xirion11 wrote

I was trying to get this effect by applying an effect with the All In 1 Sprite Shader by Seaside Studios (https://assetstore.unity.com/packages/vfx/shaders/all-in-1-sprite-shader-156513) but when I apply the texture, well, the result is not what I was expecting because of how the character is built I believe.

Please show a screenshot of what result you received instead, otherwise it is difficult to diagnose any problems.

Spine's shaders mostly differ in that the default is to use PMA (premultiplied alpha) blending. You can find more details here in the documentation pages:
spine-unity Runtime Documentation: Advanced Premultiplied vs Straight Alpha Import

So most likely any 3rdparty shader should work by either

  • a) re-exporting the texture from Spine with settings Premultiply alpha disabled and Bleed enabled to export a straight alpha texture.
    or
  • b) keeping the PMA texture as is and adding the PMA shader code to a copy of the 3rd-party shader. This mainly means changing the blend mode to Blend One OneMinusSrcAlpha and multiplying the returned color by it's alpha value resultcolor.rgb *= resultcolor.a.