- 已编辑
Spine on 3d Mesh Projection.
I really hope i don’t ask something that has been asked here plenty of times before. Honestly, i've searched a lot!
Currently I'm trying to use 2d face emotions on a 3d sphere sphere had in Unity. And I'm looking for the way to avoid sprite animation as it to costly to control and correct and also it's completely unflexible.
So i wonder is any way to bend spine animation around this sphere or to project/mask animation on 3d mesh some how?
No worries, thanks for searching! I don't think this has been asked before either! :nerd:
spine-unity, as any 2d framework, creates textured meshes, so I know of no direct way to map one mesh onto another at runtime. If it's a "mathematically perfect" object like a sphere, you could write a custom copy of a Spine shader with a custom vertex shader that maps each vertex position onto the sphere's hull. This will however cause some distortion and you might not like the actual result.
Another much more practical way would be to use a RenderTexture. You would then render your Spine skeleton into the RenderTexture
, and then project the texture onto your object. This is rather costly however, so you might want to keep it to a minimum.
Harald :No worries, thanks for searching! I don't think this has been asked before either! :nerd:
Another much more practical way would be to use a RenderTexture. You would then render your Spine skeleton into theRenderTexture
, and then project the texture onto your object. This is rather costly however, so you might want to keep it to a minimum.
Oh man! Thnx a lot! It sounds like this render texture could be the very my salvation. I need just only one such character on a scene so that costly in my case seems to be acceptable. The only thing in this situation is the alpha. But we'll see.
You're welcome, glad it helped! Alpha in the projection texture should be no problem, this is pretty standard when projecting, just be sure to set the RenderTexture
's clear color to have alpha = 0.