🎨
MYTY
MYTY Kit
MYTY Kit
  • 👋Before you begin
    • GM, MYTY! 👐
    • What is MYTY Kit?
    • MYTY Kit System Requirements
    • Prerequisites
    • MYTY Kit Glossary
  • ✍️Getting started
    • 1. Prepare Illustration PSB
      • Key Requirements
      • Basics of Avatar Animation
      • Recommended PSB file structure for Trait Mapper
    • 2. Trait Mapping
      • Guide to MYTY Kit Trait Mapper
      • New Field: Token ID
    • 3. Install Unity
    • 4. Import MYTY Kit
    • 5. Import 2D Avatar Assets
  • 🔮Make animation
    • 6. Before Rigging
    • 7. Rigging in Sprite Editor
      • Mesh in Unity
    • 8. MYTY Kit Controllers
      • Bone 1D Controller
      • Bone 2D Controller
      • Sprite 1D Range Controller
      • Sprite 2D Nearest Controller
      • Rigged Sprite 2D Nearest Controller
    • 9. Apply Motion Tracking
      • Character Movement
      • Bone Motion Adapters
        • Bone2D
        • BoneTiltOrPosition
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • Pupil & PupilAll
      • Sprite Motion Adapters
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • MouthSprite
      • Advanced documentation
        • Mapper & Reducer
        • Stabilizing method
    • 10. Set up AR Face Mode
    • Advanced Animation
      • Physics 2D
      • Sprite Masking
      • Idle Animation
  • 🤹Connect with MYTY Metaverse
    • 11. Export MYTY Avatar
      • MYTY Avatar Viewer
      • Updates on File Export Format — Zip file
    • 12. Upload to Avatar Manager
  • 🗒️Appendix
    • 😄Mediapipe Extension
    • 🎨MotionAdaptorPalette
  • 🗂️MISC
    • About Us
    • Troubleshooting & FAQ
    • Change Log
    • License
      • License.md
    • Legacy Documentation
      • [v0.1.0] 4. Import MYTY Kit
      • [v0.1.0] 6. Before Rigging
      • [v0.1.0] 9. Apply Motion Tracking
      • [v.0.1.0] 11. Export MYTY Avatar
Powered by GitBook
On this page
  • What is Masking?
  • How to apply the masking effect?
  1. Make animation
  2. Advanced Animation

Sprite Masking

This section describes how to mask sprites.

PreviousPhysics 2DNextIdle Animation

Last updated 2 years ago

What is Masking?

  • In Unity, the mask is a component that automatically crops the target sprite like a window.

  • Technically, you will need two game objects: the target object and the masking object.

  • You can add one of the game objects as a child if you want.

  • If you want to use the masking for your Avatar, you should use the Rigged Mask 2D Component instead of the Sprite Mask.

The Sprite Mask wouldn’t work on rigged sprites in Unity.

How to apply the masking effect?

1. It is pretty straightforward. Make sure to select the GameObject that you want to use as a Mask

2. In the inspector, click the add component button and select the Rigged Mask 2D.

3. Tab the Fit to source sprite button.

4. That’s it. Now you will see the source sprite is cropped.

It is not going to be working if the masking sprite has multiple bones

If you want to animate masking sprites, you might need to add the Sprite Resolver

5. There are several options that you could choose from in the Mask Interaction.

  • None

  • Visible inside Mask

  • Visible outside Mask

🔮