Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

If you have any questions, reports, suggestions, or requests about Live2D, please send them to this community.
※We cannot guarantee statements or answers from Live2D staff. Thank you for your understanding in advance.
 
Live2D Cubism
Cubism Products and Downloads
Cubism product manuals and tutorials
Cubism Editor Manual    Cubism Editor Tutorial    Cubism SDK Manual    Cubism SDK Tutorial
[About macOS Ventura 13.0] (12/20/2022)
The currently released Live2D Cubism SDK is not guaranteed to work with macOS Ventura.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details
[NOTICE]
About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to System Requirements for details.
We will not respond to any related inquiries with this message.

Reset the mask

Hello,

I have several Live2D prefabs using the same mask texture (actually all models are using the same mask texture, the default one) but I usually have active only 1-3 prefabs at the same time.
I happens that after I destroy a prefab that is using a mask, other models are missing parts (usually eyes) and is seem related to masks because the missing parts reappear after I manually change the mask texture in inspector (I put it to none that put's it back to the default one).

So, my question is, is there anyway to reset the mask content, or I'm doing something wrong when deleting a prefab instance that is leaving the texture mask in a wrong state?

Thank you!
Tagged:

Comments

  • Actually there are a couple of objects that are not deleted, just disabled, and all share the same masktexture. I suspect those disabled objects somehow affect the masking for other objects, any ideas?
  • Hello, @c0mas .

    Thank you for your contact.
    This is Live2D Support.

    Perhaps this is due to the fact that the maximum number of masks that can be held by the texture for masks has been exceeded.

    In Cubism SDK for Unity, by default, mask textures are shared by all models.
    The timing when the process to register a model to the mask texture is called is when the model is initialized, and the timing to delete the texture is when the model is destroyed.

    Therefore, even if the model is hidden, the model is still registered in the texture for masking, and depending on the model placed in the Hierarchy, the upper limit of the texture for masking may be exceeded, and the display of the mesh using clipping will be corrupted.

    To resolve this issue, change Start() to OnEnable() and OnDestroy() to OnDisable() in the CubismMaskController class.

    This modification will cause the model to be registered in the texture for the mask when it is displayed and removed when it is hidden.
    Therefore, no matter how many models are placed in the Hierarchy, only the models in the visible state will be registered in the mask texture, and the limit will not be exceeded.
  • Hi Yasu,

    Thank you for the response, I have tested and I can confirm the fix worked on my side :-)

    Best,
    /COsmin
Sign In or Register to comment.