M
M
MYTY Kit v0.1 Guide
Searchโ€ฆ
7. Rigging in Sprite Editor
Describes the avatar rigging process in Unity. It mainly explains the basic principles, and has captioned video tutorials with captions.

Key Requirements for the MYTY Kit!

โœ… Do not modify the avatar PSB file after rigging.

โœ… Rigging must be completed for every single sprite, including those in the animation groups.

What is Bone?

โ€‹
โ€‹
  • Bones and their joints help the avatar move, like a real human. Bones are attached to an avatar to give a systematic way of creating poses and animations.
  • A Skeleton refers to a group of bones. Skeletons have a hierarchy of bones, and there is always only one root bone. A root bone can have multiple children bones. All bones except the root bone must have at least one parent bone, and can have children bones of their own.

What is Rigging?

โ€‹
โ€‹
  • Rigging is the process of binding bones to modeled data. MYTY Kit currently supports the creation of 2D versions of NFT Avatars. So for us, rigging is defined as binding bones to a 2D sprite.
  • Since it's difficult to manually manipulate the vertices or polygons of an image (mesh), we transform an image through its rigged skeleton.
  • It's important to place joints in the right place so that the skeleton has the intended range of motion.

What is Weight?

โ€‹
โ€‹
  • Weight is a tool that visually indicates how much influence a bone has on a particular vertex. An image vertex is shown in the color(s) of its connected bone(s).
  • If multiple bones are connected to one image, the image will be shown in a gradated combination of the colors of its connected bones. This gradation represents each bone's relative influence.
  • You can use the Weight Brush or Weight Slider to modify the relative weights.
What do Bones, Geometry, and Weights mean? Refer to the following Unity pages.
๐Ÿ‘‰ Skinning Editorโ€‹
๐Ÿ‘‰ Tutorials

Open the Sprite Editor

1. After selecting the PSB file in the Project window, go to the Inspector window, and under the General section, click on the Open Sprite Editor button. This will display which Sprites the avatar is made of.
2. Near the very top of the window, click on Sprite Editor โ–ผ and select Skinning Editor to start rigging.

Show/Hide sprites

  1. 1.
    When you click the Visibility tab in the upper right corner, you will see the PSB file's Bone and Sprite information.
    โ€‹
    โ€‹
  2. 2.
    You can show or hide sprites by clicking the eye icon in front of them.
    โ€‹
    โ€‹

Create Bone

Tutorial Video - Bone Rigging
  1. 1.
    Go to the Bones section of the left tool tab, and click Create Bone.
    1. 1.
      Think of the human skeleton as a standard.
    2. 2.
      Make the skeleton as simple as possible.
    3. 3.
      Bones should be created bottom -> up, starting at the inferior edge of the body. For example: spine (body) > skull (head).
    4. 4.
      Click the start point of the spine (hip-end), drag up, and click the endpoint (neck-end). Next, make the skull bone.
    5. 5.
      You can exit from creating the next bone in a series by right-clicking.
    6. 6.
      You can create a child bone by clicking Create Bone and hovering over the parent bone.
    7. 7.
      Give bones a descriptive name for easy management. Keep in mind the word "bone" must not be deleted. Only the number after โ€˜boneโ€™ can be changed. For example: bone_1 -> bone_body.
  2. 2.
    As a rule of thumb, the body is the main axis, to which the neck, head, and arm bones are attached.

Auto Weight

Tutorial Video - Auto Weight and Edit Weight
  1. 1.
    Show sprite(s) that you want to set weight(s) for.
  2. 2.
    In the Weights section of the left tool tab, click Auto Weights to automatically set weight(s) to the visible sprite(s) based on the positional relationship between the sprite(s) and the bone.
  3. 3.
    In the Pose section of the left tool tab, click Preview Pose and move a bone to confirm that its bound sprite(s) move as you had intended.
  4. 4.
    Repeat steps 2 and 3 for each sprite group.
  5. 5.
    If you have sprites with incorrect weights, see the Edit Weight section below.
Sprites in the Animation folder (sprites to be used for frame animation) must also have bone weights set.

Preview Pose

If you click Preview Pose on the left panel, you can preview the movement of the avatar by moving the bones one by one.
Testing bone rigging using the Preview Pose tool

Edit Weight with Weight Slider or Weight Brush

If you use the Auto Weight function, sprites are automatically bound and weighted to bone(s) close to the sprite. While this will save us a lot of time, unintentional bone binding may sometimes occur. In this case, you change the weights manually by using the Weight Brush or Weight Slider.

Weight Brush

  1. 1.
    Select the Weight Brush from the Weights section of the left tool tab.
  2. 2.
    Select Component > Select Bone to Weight > Color all vertices that should follow the Bone.
  3. 3.
    Check movement using Preview Pose.
How to use the Weight Brush

Weight Slider

  1. 1.
    Select the Weight Slider tool from the left tool tab.
  2. 2.
    Select the applicable sprite and bone. In the Weight Slider window on the right, slide the Amount up to 1.
  3. 3.
    This ensures that all selected vertices are weighted 100% to the bone.
How to use the Weight Slider
For more detailed description of the Skinning Editor, refer to Unity's Official Manual.

Save Sprite Editor

  1. 1.
    Click โ€˜Applyโ€™ in the upper right corner to save the bone setup and rigging information.
    โ€‹
    โ€‹

Apply physics in hair bones

  • If you want to apply gravity and various physics to a specific bone, refer to Unity's Official Manual.
  • The GhostsProject Avatar below used the Rigid Body Component and the Character Joint Component to make its hair bones vibrate along with head movements.
GhostsProject Avatar with physics applied to its hair bones
โ€‹
Have a question or an idea? If you have a question to ask or an idea to share, participate in the MYTY Kit Community. Weโ€™d love to hear from you.
๐Ÿ˜„
โ€‹