[About macOS Sequoia] (Updated October 22, 2024)
Live2D Cubism Editor 5.1.02 now supports macOS Sequoia.
Other Live2D Cubism products currently released are not guaranteed to work on macOS Sequoia.
Please refrain from upgrading macOS, as it may not operate properly.
Shadows of Live2D Model - Unity
Hi,
I would like to know if there is any way of getting a shadow projection for a Live2D model in Unity. Ej: a Live2D canvas and a plane behind that receive the shadow of the model (its shape).
I have tried using differents types of shaders without success. Not sure if exists a simple way.
A possible solution could be get the pixels data after live2d.draw() of the associated GameObject call and then paste those pixels to a transparent texture. After that, change the texture color to "black" and use that textue on a plane placed as shadow would be.
I don´t know if that could be a possible solution. Nevertheless, I don´t know how to get pixels data after a draw() call or exactly how to do all operation.
Does anyone know how to implement this functionality? Or any help?
Thanks
Regards
0 ·
Comments
Did you give render textures (http://docs.unity3d.com/Manual/class-RenderTexture.html) a try?
You could draw your live2d model onto a render texture, attach that texture to a quad and first use that quad for rendering the model. After that, you could "project" the render texture onto the background plane to fake the shadow.
This might currently be the "easiest" way to achieve the effect you want. I could try to write up a small example but that would be in a few days.
Thanks a lot for your response. That solution works great.
I have to check the performance of getting more cameras in my scene.
Thanks!