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.
✅ 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...
- 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.
- 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.
- 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.
- Mesh is a polygon that the Unity makes the image deformation. Read more details on the below page.
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 Editorbutton. 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 Editorto start rigging.
- 1.When you click the
Visibility tabin 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.
Tutorial Video - Bone Rigging
- 1.Go to the
Bonessection of the left tool tab, and click
- 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 Boneand 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.
Tutorial Video - Auto Weight and Edit Weight
- 1.Show sprite(s) that you want to set weight(s) for.
- 2.In the
Weights sectionof the left tool tab, click
Auto Weightsto 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 sectionof the left tool tab, click
Preview Poseand 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.
Sprites in the Animation folder (sprites to be used for frame animation) must also have bone weights set.
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
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
- 1.Select the
Weight Brushfrom the
Weights sectionof 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.
How to use the Weight Brush
- 1.Select the
Weight Slidertool from the left tool tab.
- 2.Select the applicable sprite and bone. In the
Weight Slider windowon the right, slide the
Amountup to 1.
- 3.This ensures that all selected vertices are weighted 100% to the bone.
How to use the Weight Slider
- 1.Click ‘Apply’ in the upper right corner to save the bone setup and rigging information.
- The GhostsProject Avatar below used the
Rigid Body Componentand the
Character Joint Componentto make its hair bones vibrate along with head movements.
GhostsProject Avatar with physics applied to its hair bones