【Blender action trainee】Skeleton binding learning from scratch vol.1

relative motion of objects

We all know that by default, the created objects are independent of each other, which means that the movement of one object will not affect the other.
insert image description here
To associate motion between objects, our first method is to implement parent-child association.
After selecting two objects, use CTRL P to establish a parent-child relationship (the object selected later is the parent).
In the parent-child relationship, note that the child can move independently without affecting the parent object, and the movement of the parent will drive the child to move to maintain the relative position relationship.
insert image description here
The parent-child relationship is also transitive, forming a chain relationship.
insert image description here
So we can realize a simple robotic arm through the principle of parent-child relationship.
The first-stage arm drives the second-stage and third-stage arms to move, the second-stage arm can also drive the third-stage arm to move, and the third-stage arm can move independently.
as follows:
insert image description here

Introduction of bones

The parent-child relationship can indeed realize the movement of objects, but there are certain problems: the
pure parent-child relationship can only manage the relationship between independent grids .
After some models are completed, the whole is a grid, so how do we realize the action?
The essence of mesh movement is the movement of vertices that make up the mesh, so we manage a series of vertices through bones, that is, vertex groups, and realize the control of vertex groups through bones.
Now there are many brothers who are 3D practitioners, or original painters, or even lead students into the industry with zero foundation. Art students may be more familiar with the set of physical bones. We say that realistic bones have some characteristics:
1. Realistic bones have various entities.
2. Realistic bones correspond to the relationship with muscles in different positions , that is, the bones that control muscle movement
insert image description here
cg, we say that they are similar to physical bones, mainly:
1. There is no entity in the sense of rendering, the bone itself is a conceptual thing, there is no actual point, line and surface data, But we can choose different grid styles to realize different types of bones (will be covered in subsequent chapters)
2. Bones correspond to vertex groups, that is, through the movement of bones, the movement of a series of vertices in the grid is controlled to achieve Differential control over different parts of the full mesh
insert image description here

Blender's vertex group

In general, we have to manually assign vertices to vertex groups, that is, manually divide the vertex groups.
According to blender's logic, no matter whether the vertices are framed or not, the newly created vertex group will have no vertices.
We must assign the corresponding vertices to the vertex group in order to see the vertex data in the corresponding vertex group.
insert image description here
There is no vertex data in "group 001", but there is data of the top two layers of vertices of the cylinder in "group".
insert image description here

Simple bone creation and binding

Then we build bones on the basis of this cylinder, realize the corresponding relationship between bones and vertex groups, and assign different vertex weights. (That is, bone binding)
insert image description here
Select objects and bones, and do automatic binding through CTRL P. Although it seems that there is no change, we can see from the panel that the grid is already a child of the model.
insert image description here
Next, we enter the pose mode, and we can manipulate the cylinder arbitrarily through the bones.
insert image description here
In weight drawing mode we can see the vertex weights corresponding to different bones. Red has the highest weight and blue has the lowest weight.
insert image description here
insert image description here
We can manually adjust vertex weights through different brushes (similar to the principle of painting textures).
insert image description here

building of human skeleton

Taking the bone rigging process of a human model as an example, we import a human model and adjust its scaling factor to make its size similar to the size in reality.
insert image description here
First, we create the root bone. Note that the bone is in a vertically upward state by default. We need to rotate it so that its local coordinates are aligned with the world coordinates. Subsequent root bones are often used to control the overall movement of the character in the world space in skeletal animation. If the coordinates are not aligned, the moving position may be inconsistent with the habitual direction.
Root bone with consistent coordinates
By extruding and severing the connection (but not severing the parent-child relationship), we separately establish a series of bones on the character's central axis. Note that according to the size difference of the corresponding control part of the bone, the size of the bone itself should also be different to facilitate automatic bone binding.
insert image description here
Make the bones of the arm and fingers on the right, and remember to align the bones and the mesh in time by observing from the y-axis and x-axis perspectives.
insert image description here

Efficiently build finger bones through cursors

For example, the observation through the x and y axes is more efficient for alignment for parts with larger structures, but for parts such as fingers that are small in size and have a very high degree of overlap, they are basically unable to move, so we choose here Ring the edge and move the cursor to create the finger bones.
Select ring
insert image description here
shift s to move the cursor to the selected object, then the cursor will be automatically moved to the midpoint of the selected cursor.
insert image description here

The selection moves to the cursor, making sure the bone is in the middle of the finger.
insert image description here
The effect of binding all the finger bones of the right hand.
insert image description here
insert image description here
Rename them all and prepare for symmetrical operations.
insert image description here
Note that there is a problem here:
only the part of the name of all bones ending in R or L will be symmetrically copied to the other side.
The consequence of the naming method like mine above is:
insert image description here
after adjusting the naming, the symmetrical replication is successful.
insert image description here
Complete the skeleton of the right leg
insert image description here
and complete the skeleton construction symmetrically
insert image description here

complete bone binding

We directly perform bone tying with automatic weights.
insert image description here
insert image description here
Twist the bones to see if the bones are functioning properly
insert image description here
Check the weights
insert image description here
Then we have obtained the basic human skeleton that controls the vertex group.
Before proceeding to the next step, we install the bone layer manager plugin. After installation, the bone layers column will appear on the side of the t panel. Compared with blender's built-in layer function, bone layer manager can provide fast bone layering, bone layer naming , and bone layer visible adjustment functions.
In terms of subsequent efficient tgt bone creation, ik creation, controller creation, etc.
insert image description here

TGT skeleton establishment

First, we divide the root bone and deform bone into two layers.
insert image description here
Copy all bones (except root) and move to the target layer.
insert image description here
Note that all the bones in the above picture have a suffix of .001 due to copying. We will replace .001 with .tgt by batch renaming.
insert image description here

ctrl f2 batch rename

insert image description here
In pose mode, we select the tgt bone and deform bone, ctrl shift c to add copy transformation, and realize the correspondence between tgt and deform.
In the deform view, we can see that the corresponding bone turns green. Indicates that the corresponding bone has been copied and transformed.
insert image description here
In the value replacement mode of copy transformation, the original deform bone can no longer directly control the mesh, and the tgt bone is used to control it.
insert image description here
insert image description here

Quickly build TGT skeletons through scripts

Obviously, the one-by-one binding method is too ingenious. Our simple model has 50+ bones, so the number of bones of those characters with hair and clothes and animations fluttering with the wind is not flying.
After all, we are not bone-tying craftsmen. We should try our best to use scripts for the work that can be done with scripts. There will be a special issue of simple script explanations in the future, so let’s briefly introduce them here.
The script is mainly through blender's bpy (blender python library, blender comes with it, basically it can only run in the blender environment, and pip can't be installed). Mainly after copying the deform, select two parts, one part is deform, the other part is tgt copy, then change the name of each bone in the tgt copy, add corresponding constraints, and set the parameter as: copy transformation.
Next, we run the script to directly create the tgt bone and separate the bone layer.
insert image description here
It can be seen that the tgt bone function is normal, and the tgt bone is established.
insert image description here

Guess you like

Origin blog.csdn.net/misaka12807/article/details/129977177