• Unity
  • Outline shaders for spine-unity

Related Discussions
...

I'm trying to modify the shader to have a much more pronounced thickness as well as some soft alpha falloff but I'm running into a lot of issues mostly a result of my poor knowledge of shaders. From what I understand the outline would be thicker if the sprite assets that were used in spine had more padding originally? Is there any way that I can tell spine to export with some extra padding? otherwise, anyone have any advice on modifying the shader? It's a bit out of my skillset tbh and I'm lost

Please check out the blog post here:
Blog: Outline shaders for spine-unity
Exporting with more padding allows you to increase the outline width and not clash with nearby regions of the atlas.
If you are using Mesh Attachments as well, you need to make sure that they provide enough space so that the outline fits.

8 个月 后

Hello,
So I know this is an old post but I thought It is worth a try.
I am building a character creator for a game I am working on and I am trying to make it so only specific skin parts have an outline.
I tried splitting the skeleton into 3 separate ones and have each one of them outline independently but the outline is also outlining parts inside of my skin and lot only around lt.

Does anyone here know how I might be able to fix this?

I'm afraid we need a bit more information about what you want to achieve and what your project configuration is.

Are you using Universal Render Pipeline? If so, are you using a URP 2D or 3D renderer setup?

Do you want to have an outline-only effect and nothing of the original attachments showing? I'm asking because the screenshot shows only the outline and no non-transparent attachment images.

First of all, thanks so much for the quick response!

I am using the default Unity Pipeline, for models, I am using the MixMatch example skeleton if it helps.

I am looking to have only the outline showing while having the rest of the skin transperent so I can use it to make an outline only around a specific body part by laying it on top of it. The goal is for the player to be able to click a body part to show the Char customization menu for that body part and have the clocked body part glow(or outlined) as a result.

EladFlaish :

I am using the default Unity Pipeline

That's good news in this regard, as there are more spine-unity outline shader variants available for it.

EladFlaish :

I am looking to have only the outline showing while having the rest of the skin transperent so I can use it to make an outline only around a specific body part by laying it on top of it.

Having the outline on top of your hightlighted body parts will make your life harder than it needs to be. While you could do this, you would need to use the provided outline-only shader for it (with enabled Z-Write) as shown in the Spine Examples/Other Examples/Outline Shaders example scene. Requiring enabled Z-Write of the outline shader however will result in a more jagged outline where overlapping parts cut the outline (harsh transition to fully transparent), due to the nature of how the z buffer works. You can see this in the Outline Shaders example scene as well.

As a result, we would rather recommend to use the normal workflow of having the outline behind the highlighted body parts. Is there a reason why you haven't chosen this way, did you run into any problems with this workflow?

Thanks!
I looked all over for spine-unity outline shader variants all over. Do you know where I can find them? I am already using the Zwrite shader.

Are you perhaps using a pretty old version of the spine-unity runtime? Almost all spine-unity shaders provide an Outline toggle property which switches automatically to the outline shader variant. They are located in Spine/Runtime/spine-unity/Shaders/Outline. Also did you check out the example scene I mentioned? The shaders are used in this scene.

1 年 后

Wrong section I know but is it possible to apply this to Phaser 3?

Let's please continue the discussion at this thread over here:
[Phaser 3] Outline shader
Please note that there is not need to post questions on multiple subforums, as we will find the respective question, regardless where it has been posted.

7 个月 后

Hello. Could you help me - I have this bug.In Unity 2022.3.7f1 URP - research don't help.

@Brossinger Thanks for providing the version information and used render pipeline information up front, this helps a lot!

You're using Universal Render Pipeline but your skeleton uses a Standard Render Pipeline shader Spine/Outline/Skeleton, this will not work and likely render incorrectly. Please use shaders from the Spine URP Shaders UPM package instead (see the documentation here). Please check out the com.esotericsoftware.spine.urp-shaders/Examples/Outline Shaders URP example scene included in the UPM package for how to use the single-pass outline URP shader.

I will add this question to the FAQ section as well.