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 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.

โœ… All bone names must start with 'bone'. ex) bone_root, bone_head, bone_eyes...

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 is Mesh?

  • Mesh is a polygon that the Unity makes the image deformation. Read more details on the below page.

pageMesh in Unity

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. When you click the Visibility tab in the upper right corner, you will see the PSB file's Bone and Sprite information.

  2. You can show or hide sprites by clicking the eye icon in front of them.

Create Bone

  1. Go to the Bones section of the left tool tab, and click Create Bone.

    1. Think of the human skeleton as a standard.

    2. Make the skeleton as simple as possible.

    3. Bones should be created bottom -> up, starting at the inferior edge of the body. For example: spine (body) > skull (head).

    4. Click the start point of the spine (hip-end), drag up, and click the endpoint (neck-end). Next, make the skull bone.

    5. You can exit from creating the next bone in a series by right-clicking.

    6. You can create a child bone by clicking Create Bone and hovering over the parent bone.

    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. As a rule of thumb, the body is the main axis, to which the neck, head, and arm bones are attached.

Auto Weight

  1. Show sprite(s) that you want to set weight(s) for.

  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. 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. Repeat steps 2 and 3 for each sprite group.

  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.

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. Select the Weight Brush from the Weights section of the left tool tab.

  2. Select Component > Select Bone to Weight > Color all vertices that should follow the Bone.

  3. Check movement using Preview Pose.

Weight Slider

  1. Select the Weight Slider tool from the left tool tab.

  2. Select the applicable sprite and bone. In the Weight Slider window on the right, slide the Amount up to 1.

  3. This ensures that all selected vertices are weighted 100% to the bone.

For more detailed description of the Skinning Editor, refer to Unity's Official Manual.

Save Sprite Editor

  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.

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.๐Ÿ˜„

Last updated