Masking

Updated: 01/30/2020

Summary

This sample shows the behavior of a model using clipping in CubismSDK and the state of the texture for the mask used by the model.

What Functions Can Be Checked?

You can check the behavior of a model using clipping in CubismSDK and the state of the textures for the mask that the model is using.

Easy to Use

Of the two objects in the scene, the top one is a Prefab of the model using clipping, and the bottom one draws the state of the texture for the mask used by the model in the scene.

How to Set Up a Scene

  1. Create a 3D Object -> Quad in the Hierarchy.
  2. Add the “MaskTexturePreview” component to the created Quad.
  3. Store “GlobalMaskTexture” in the Mask Texture of “MaskTexturePreview.”
  4. Store MaskPreview in Element 0 of Mesh Renderer -> Materials in Quad.
  5. Now you can draw the state of the texture for the mask used by the model in the scene.
    If you drag and drop the file \Assets\Live2D\Cubism\Samples\Models\Rice\Rice.prefab onto the Scene or Hierarchy, you will see that the mask for the Rice model has been drawn.

Please let us know what you think about this article.