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.
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
When you click the
Visibility tab
in the upper right corner, you will see the PSB file's Bone and Sprite information.You can show or hide sprites by clicking the eye icon in front of them.
Create Bone
Go to the
Bones
section of the left tool tab, and clickCreate Bone.
Think of the human skeleton as a standard.
Make the skeleton as simple as possible.
Bones should be created bottom -> up, starting at the inferior edge of the body. For example: spine (body) > skull (head).
Click the start point of the spine (hip-end), drag up, and click the endpoint (neck-end). Next, make the skull bone.
You can exit from creating the next bone in a series by right-clicking.
You can create a child bone by clicking
Create Bone
and hovering over the parent bone.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.
As a rule of thumb, the body is the main axis, to which the neck, head, and arm bones are attached.
Auto Weight
Show sprite(s) that you want to set weight(s) for.
In the
Weights section
of the left tool tab, clickAuto Weights
to automatically set weight(s) to the visible sprite(s) based on the positional relationship between the sprite(s) and the bone.In the
Pose section
of the left tool tab, clickPreview Pose
and move a bone to confirm that its bound sprite(s) move as you had intended.Repeat steps 2 and 3 for each sprite group.
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
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
Select the
Weight Brush
from theWeights section
of the left tool tab.Select Component > Select Bone to Weight > Color all vertices that should follow the Bone.
Check movement using Preview Pose.
Weight Slider
Select the
Weight Slider
tool from the left tool tab.Select the applicable sprite and bone. In the
Weight Slider window
on the right, slide theAmount
up to 1.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
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 theCharacter Joint Component
to make its hair bones vibrate along with head movements.
Last updated