Woohoo!
Spine object outline
Addition of the outline shader helps us a lot thank you for adding it! I can't seem to get it working correctly at the moment. Enabling outline causes a spiky outline effect even at 8 outline. Any advice for getting it working? Using Skeleton Lit ZWrite but the effect is the same on all shaders.
Export settings if thats where im going wrong, tried a bunch of settings to no effect:
Unity 2019.2.14f1
Doesn't seem to make a difference if I use straight alpha or PMA
The outline is only drawn within the mesh borders. When you see parts of the outline being cut, your mesh borders are too tightly wrapped around the opaque pixels of your images. Bild entfernt wegen fehlender Unterstützung für HTTPS. | Trotzdem zeigen
To fix this problem, move the mesh vertices further out to provide enough space. You may need to add more whitespace around the borders of your images so you can move the mesh vertices.
Also, if you see outline color appearing at borders of attachments, it is likely the outlines of nearby atlas image regions growing into your mesh: Bild entfernt wegen fehlender Unterstützung für HTTPS. | Trotzdem zeigen
You can add more padding via the atlas export settings to leave enough space for the neighbor outline. You may also consider disabling whitespace stripping instead of increasing the padding.
- Bearbeitet
I thought I might add this for someone who's just looking for a quick and simple outlining implementation via script!
Renderer renderer = mySkeletonAnimation.transform.GetComponent<Renderer>();
Shader newShader = Shader.Find("Spine/Outline/Skeleton Fill");
foreach (Material material in renderer.materials) material.shader = newShader;
If you want to change it back, simply replace the second line with
Shader newShader = Shader.Find("Spine/Skeleton Fill");
Thanks buddhamon!
Note the blog post mentioned above, before the blog post was posted, is here:
Blog: Outline shaders for spine-unity
Thanks for sharing buddhamon! Please note that the spine-unity runtime also comes with an additional Outline Shaders
example scene as described at the bottom of the blog post here:
Blog: Outline shaders for spine-unity: Outline shaders example scene