Unity中外轮廓描边突然不融合了,之前在Unity中使用RenderExistingMesh设置了外轮廓描边都正常,但最近不知道改了什么,立绘中的翅膀描边把任务身体挡住的部分也描出来了的。不知道该如何修改,没有头绪。
Unity中外轮廓描边突然不融合了
CLXiao 很遗憾听到你遇到困难。请告诉我们您使用的是哪个版本的 Unity 和 spine-unity,并向我们展示您的材质设置。spine-unity 运行时的确切版本可在 "version.txt "中找到:
This Spine-Unity runtime works with data exported from Spine Editor version: 4.1.xx
Package version: spine-unity-4.1-2023-09-21.unitypackage
I'm sorry to hear you're having trouble. Could you please tell us what version of Unity and spine-unity you are using and also show us your material settings? The exact version of the spine-unity runtime can be found in "version.txt":
This Spine-Unity runtime works with data exported from Spine Editor version: 4.1.xx
Package version: spine-unity-4.1-2023-09-21.unitypackage
@CLXiao 得知您遇到麻烦,我们深感抱歉。 问题可能在于您的骨架不是在单个绘制调用中渲染的,而是需要多个子网格体。 这在游戏对象的底部显示为多个材质。 您能否分享一下有问题的游戏对象的材质屏幕截图?
此论坛帖子中列出了一些解决方案:
https://esotericsoftware.com/forum/d/24307-multiple-materials-outline/5
最近在这个论坛上发帖:
https://esotericsoftware.com/forum/d/24755-how-to-make-an-outer-outline-when-using-sculpturerenderseparator/3
后一篇文章还提到了最近添加的“RenderCombinedMesh”组件,该组件可用于单独渲染轮廓,这可能是最简单的解决方案,您无需更改皮肤设置或骨架网格物体。 您需要更新 spine-unity 4.1 运行时,因为该组件是最近添加的。
Sorry to hear you're having troubles. Likely the problem is that your skeleton is not rendered in a single draw call but requires multiple submeshes. This is displayed as more than one Materials at the bottom of the GameObject. Could you please share a screenshot of the Materials at your problematic GameObject?
There are some solutions listed in this forum posting:
https://esotericsoftware.com/forum/d/24307-multiple-materials-outline/5
And recently in this forum posting:
https://esotericsoftware.com/forum/d/24755-how-to-make-an-outer-outline-when-using-skeletonrenderseparator/3
The latter posting also mentions the recently added RenderCombinedMesh
component which can be used to render the outline separately, which would likely be the easiest solution where you don't need to change your skin setup or your skeleton meshes. You need to update your spine-unity 4.1 runtime as the component has been added very recently.
好的,我试着更新一下支持库。目前我已经在使用示例中的RenderExistingMesh脚本来实现外轮廓描边。
也可能是我在工程中使用urp导致的。我将描边Shader改成urp模式的就没有问题。虽然问题解决了,但不太明白之前在urp下正常的描边Shader,为何突然不正常了。
@CLXiao 请注意,使用 URP 时不能使用内置渲染管线着色器,需要使用 URP 着色器。
文档页面上也提到了这一点:
https://zh.esotericsoftware.com/spine-unity#%E7%9D%80%E8%89%B2%E5%99%A8
Please note that you can't use Built-In Render Pipeline Shaders when using URP, you need to use URP shaders.
This is also mentioned here on the documentation page:
https://zh.esotericsoftware.com/spine-unity#%E7%9D%80%E8%89%B2%E5%99%A8