Nick

My spine object use TintBlack to create a white flash effect on the whole object when lightning strike on it. At the same time it use additive blend mode because some of the attachments will glow.

When I set the SkeletonGraphic's material to use SkeletonGraphicTintBlack, additive blend mode does not work. The attachments are invisible at all. On the other hand, if I use SkeletonGraphicDefault material, the tint black effect will not work.
How to get both to work at the same time? I can only assign one material to the SkeletonGraphic.

Thanks in advance.

settings.jpg


---

note: I tried the "Multiple CanvasRenderers" check box, it doesn't update any sub rednerer with SkeletonGraphicAdditive so additive blend mode is still not working when parent component is set to use TintBlack material.
You do not have the required permissions to view the files attached to this post.
Nick
  • Posts: 317

Harald

Nick wrote:When I set the SkeletonGraphic's material to use SkeletonGraphicTintBlack, additive blend mode does not work. The attachments are invisible at all.
Which version of the spine-unity runtime are you using?

Please make sure to have Cull Transparent Mesh disabled at the CanvasRenderer component (which is automatically disabled in spine-unity 4.1 and newer). If you have PMA Vertex Colors enabled and all your attachments use additive blend mode, they will be incorrectly culled by the CanvasRenderer.
Nick wrote: I tried the "Multiple CanvasRenderers" check box, it doesn't update any sub rednerer with SkeletonGraphicAdditive so additive blend mode is still not working when parent component is set to use TintBlack material.
Do you see a Blend Mode Materials section in the Inspector right below Multiple CanvasRenderers when enabling Multiple CanvasRenderers? If not, your spine-unity version is likely too old which did not yet support blend modes with multiple CanvasRenderers.
User avatar
Harald

Harri
  • Posts: 4459

Nick

Which version of the spine-unity runtime are you using?
spine-unity-4.0-2022-07-19
Please make sure to have Cull Transparent Mesh disabled at the CanvasRenderer component
OK
Do you see a Blend Mode Materials section in the Inspector right below Multiple CanvasRenderers
Yes

Unity_hekp767tpe.png


The additive material is said to be unused with PMA vertex color as shown in the screenshot.

When enabeld, all the child renderers has unassigned material on the material field.

Unity_FZ9btkbWzz.png


The shader of those renderers are either multiply or tint black.

I tried to change one of the renderer's shader from hint black to additive. It will somehow automatically change all the
tint black shaders to additive shader. I guess maybe the related to the fact that the SkeletonSubmeshGraphic don't have material assigned. They are like synchronized. The additive shader also doesn't work after the change.
You do not have the required permissions to view the files attached to this post.
Nick
  • Posts: 317

Harald

Nick wrote:When enabeld, all the child renderers has unassigned material on the material field.
Thanks for posting the screenshots. The line above is not completely correct, you meant that the child SkeletonSubmeshGraphic components (which are not renderer components) have no Materials assigned. This is always the case, also when you have the default SkeletonGraphicDefault material assigned. The materials are assigned directly at the CanvasRenderer component (which are the actual renderer components).

Can you please send us a minimal Unity project that still demonstrates your issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.
User avatar
Harald

Harri
  • Posts: 4459

Nick

I just test with the SkeletonGraphic again and found the issue. The additive won't work when "Canvas Group Tint Black" is not checked. I only checked the "Tint Black" option so it doesn't work. However, don't have Canvas Group used at all. This option is confusing as it is named like I only need to check it when Canvas Group is involved.
Nick
  • Posts: 317

Harald

Thanks for the additional info. If you have Canvas Group Compatible enabled at the material, Canvas Group Tint Black needs to be enabled at the SkeletonGraphic component as well. We will add a warning that is displayed when these settings don't match, currently there is only a warning shown when the opposite combination is the case (Canvas Group Tint Black enabled at SkeletonGraphic but Canvas Group Compatible disabled at the material). Thanks for reporting!

---

An update has been committed to the 4.1 branch which adds the warning described above (it will be merged to the 4.2-beta branch soon). A new spine-unity 4.1 unitypackage is available for download here as usual:
spine-unity Download
User avatar
Harald

Harri
  • Posts: 4459


Return to Unity