@Tautvydas We have just added a new sample component
RenderCombinedMesh. With this component you can combine the parts renderer meshes to a single one easily and assign an outline-only material to it.
From the changelog:
Added example component `RenderCombinedMesh` to render a combined mesh of multiple meshes or submeshes. This is required by `OutlineOnly` shaders to render a combined outline when using `SkeletonRenderSeparator` or multiple atlas pages which would normally lead to outlines around individual parts. To add a combined outline to your SkeletenRenderer:
1) Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
2) Add a `RenderCombinedMesh` component, provided in the `Spine Examples/Scripts/Sample Components` directory.
3) Copy the original material, add *_Outline* to its name and set the shader to your outline-only shader like `Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly` or `Spine/Outline/OutlineOnly-ZWrite`.
4) Assign this *_Outline* material at the new child GameObject's `MeshRenderer` component.
If you are using `SkeletonRenderSeparator` and need to enable and disable the `SkeletonRenderSeparator` component at runtime, you can increase the `RenderCombinedMesh` `Reference Renderers` array by one and assign the `SkeletonRenderer` itself at the last entry after the parts renderers. Disabled `MeshRenderer` components will be skipped when combining the final mesh, so the combined mesh is automatically filled from the desired active renderers.
A new spine-unity 4.1 unitypackage is available for download:
Please let us know if this resolves your issue.
Tautvydas Also, did some testing regarding this:
Does the thin outline still occur when you contract the mesh outline by a larger distance?
And it seems that some borders indeed have no outline, yet others still a single pixel outline:
This is strange. Unfortunately I could not reproduce this issue on my end with contracted mesh bounds. I've checked the shader, however it should not introduce any offset in XY direction. Could you perhaps send us a minimal Unity project which still shows this behaviour? You can send it as a zip package to email@example.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at it.