Masking

[Last update: 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 on 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 on the scene.

How to set up a scene

  1. Create a 3D Object -> Quad on 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.

© 2010 - 2022 Live2D Inc.