Closed HaraldCsaszar closed 2 years ago
Hey, I've recently made a render to texture for Live2D models to handle a similar issue by rendering each individual mesh with Unity's Graphics API: https://github.com/Elringus/NaninovelLive2D/blob/master/Assets/NaninovelLive2D/Runtime/Live2DCharacter.cs#L207
I wonder if Spine SDK for Unity can do something similar out of the box, so that I can just provide a render texture and it'll render the character to it? If not, the Live2D implementation above could be useful for making this fadeout example.
@HaraldCsaszar Thanks for your hard work. is there ticket finish? where can I get example scene? Best regards.
@havudk Unfortunately we did not yet get to implement this ticket, therefore you can see the status as Open
, when it's finished it's status is Closed
.
In case anyone is interested, I've implemented the same stuff for Spine as well: https://github.com/Naninovel/Spine/blob/main/Assets/NaninovelSpine/Runtime/SpineDrawer.cs It'll draw Spine model to a render texture, which you can then fade or apply other shader effects.
@Elringus Awesome! Thanks a lot for sharing, this is very much appreciated! You rock! 👍 🥇
A new example component SkeletonRenderTexture
has been added to the repository, alongside with a fadeout example scene named 'RenderTexture FadeOut Transparency'. This commit has been pushed to 4.0, it will be merged to 4.1-beta soon.
A new 4.0 spine-unity unitypackage is available for download.
Thanks again @Elringus for sharing your existing code, it really helped me save the time to look up a lot of API reference pages :).
@HaraldCsaszar we're still relying on 3.88 due to all the spine animations that we would need to convert. Is this SkeletonRenderTexture hard to use there?
The 4.0 components should be usable as-is in 3.8, so you can copy over the respective .cs
files and the example scene. See this forum thread:
http://esotericsoftware.com/forum/I-made-an-animation-of-a-character-disappearing-in-Unity-17156?p=75457#p75457
Status: There are multiple questions on the forum regarding how to render a Spine character with proper translucency, without back parts shining through.
Forum postings: http://esotericsoftware.com/forum/Help-plz-How-do-I-make-my-character-translucent-in-Unity-11829 http://esotericsoftware.com/forum/Unity3D-11776
Possible Solutions: a) Cutout shader with depth test / depth write, sacrifices nice border alpha - according to Nate this is not an option. b) Render to texture - render a character to it at 100% opacity, then render the properly composited result to scene at desired opacity. c) Dither-dissolve fade-out - use a dithering pattern to dissolve a character pixel-wise. Might be suitable at some art styles.
This example scene should show at least solution (b), would be nice to show also (c).