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
- Create a 3D Object -> Quad in the Hierarchy.
- Add the “MaskTexturePreview” component to the created Quad.
- Store “GlobalMaskTexture” in the Mask Texture of “MaskTexturePreview.”
- Store MaskPreview in Element 0 of Mesh Renderer -> Materials in Quad.
- 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.
Was this article helpful?
YesNo