[Xiao Mu learns Unity3d] 3ds Max skeletal animation production (skin modifier skin)

1 Introduction

The Skin modifier is a bone deformation tool designed primarily for creating character animation by deforming one object by another. Meshes, patches, and NURBS objects can be deformed using bones, splines, and other objects.

If you apply the Skin modifier to your mesh, and then use the modifier to assign bones, each bone will receive a capsule-shaped "envelope". The modified object's vertices within these envelopes move with the bone. Where envelopes overlap, each vertex's motion is a blend of the bone's motion affecting that vertex. Use weights to do this.

insert image description here
Character Studio provides 3 components: Biped is used for character binding and control, Physique is a skin modifier specially designed for Biped skeleton, and Crowd Animation is used to procedurally generate medium and long-range group animations.

  • (1) Biped
    provides tools for creating bones and animating them. There are four modes of operation: Figure Mode (body shape mode); Footstep Mode (footprint mode); Motion Flow Mode (motion flow mode); Mixer Mode (mixer mode).
  • (2) Physique
    Physique modifier is a special skin modifier for Biped, the highlight is rich deformation effects. The tendons and sheaths and other functions in Physique skinning belong to the category of deformation animation and cannot be correctly imported into the FBX file. Therefore, game characters are rarely used, and Skin modifiers are usually used for skinning.
  • (3) Crowd Animation The Crowd Animation
    system can programmatically generate group animations, and quickly generate crowd animations by setting parameters such as sitting, walking, and standing areas and density.
noun Chinese interpretation key information Other Information
Rig to bind Topological structure information of bones (definition of parent-child relationship) Coordinate system of bone transformation (modifiable); bone name
Skeleton skeleton Relative transformation (position/rotation/scale) information of parent and child bones Topological structure information of bones (definition of parent-child relationship)
Bone skeleton for simulating real bones Information such as bone length, starting position, and orientation
Joint joint Empty nodes at bone connections /
Skin skinned The number and weight information of the polygon mesh controlled by the bone /
Binding Pose bind pose The base pose with the skeleton bound to the mesh without any deformations applied Usually T - Pose / A - Pose
Deform out of shape Make the skinned mesh transform pose by transforming the skeleton Transform The deformation process can be recorded on the skeleton Transform to form an animation clip through keyframes
Animation Sequence animation clip The transformation (position/rotation/scale) information of each frame of the bone Custom properties and curve information

2. Skin Modifier

By default, the Skin modifier creates an envelope for each specified bone, and automatically adjusts the envelope to encompass nearby mesh vertices. Then, when the bone moves, it takes all the vertices inside its envelope with it.

  • (1) Prepare the skin (mesh or patch object) and bones (bones, CAT or Biped bones or other objects). Carefully place bones inside mesh or patch objects so that their components affect their immediate neighbors.
    Tip: The armature may already be animated, or you can animate its components after applying the Skin modifier.
  • (2) Select the mesh or patch object and apply the "Skin" modifier.
  • (3) In the "Parameters" rollout, click "Add", and then select the skeleton object.
  • (4) Enable Edit Envelope and select an envelope to modify the volume within which each bone can affect surrounding geometry.

The two most used in 3dsmax are "Bone" and "Biped".
insert image description here

3.1 Skeleton object test

Demonstration of skinning using a simple cube model.
insert image description here
Alt + X shows the model semi-transparently, then freezes it.
insert image description here
Add two bones, if you add the last tail bone, it should be 3 bone objects.
insert image description here
The two bones must be placed in the model, try to place the bones in the middle of the model. You can also adjust the size of the bone to keep it as consistent as possible with the size of the model. The advantage of this is that it is convenient for later editing of the "envelope".
insert image description here
Unfreeze the box model, select the model, and add the Skin modifier to it.
insert image description here
envelope. The process of skinning is the process of setting the relationship between bones and model vertices. An envelope is a visual set of relationships. Each bone corresponds to a visual envelope, and the impact of the bone on the surrounding model vertices can be controlled by editing the structure of the envelope.
The specific operation process is to "add" the bone object in the skin modifier, and then click "Edit Envelope" to see the influence of the bone on the model vertices. Let's first set the envelope for the first bone (root bone) Bone001, click to add this bone, and then click "Edit Envelope".

To adjust the size of the envelope is to adjust the influence of the bones on the vertices of the model. The envelope is a capsule consisting of two layers, an inner and an outer. The effect on the vertices of the model becomes smaller and smaller from the inside out. Usually, the size of the envelope is consistent with the size of the bone, so that the envelope can reasonably affect the surrounding model vertices. The envelope has attribute parameters that can be set, and can also be manually dragged to change its position and size.
Red indicates the greatest impact, orange indicates moderate impact, and blue has the least impact.

insert image description here
Vertex adjustment: Skinning belongs to the visual adjustment of the weight setting of the bones to the vertices of the model, and the red, orange and blue colors are used to distinguish the degree. We can also directly modify the influence of bones on the vertices of the model numerically. The operation process is, on the basis of editing the envelope, check "vertex":
insert image description here
find a wrench-shaped tool under "weight attribute" in the command panel of skin modification, click it to pop up the "weight tool" window. Set the weight value of the vertex in the "Weight Tool" pop-up window. This weight value is between 0-1, then the sum of the weight values ​​of all bones to vertices is 1. In general, set the weight value to 0.5. That is to say, the two bones have half the influence on the model vertices at the joints.
insert image description here
Weight table: It uses the form of a list to display the weight value of the specified vertex of the model affected by different bones. After selecting a vertex in the model, the weight value list of the selected vertex will be displayed in the weight table.

Paint Weights: Select "Envelope", click "Paint Weights", and check "Paint Blend Weights". This allows you to adjust the weights on top of the model using the brush. This method is used where vertices are dense, especially when the model is deformed after the bone is moved.
insert image description here
After the skinning is complete, the other half can be skinned by "mirror mode", which is suitable for symmetrical model skinning settings.
insert image description here
After the skinning is completed, to check whether the weight distribution is reasonable, you need to move the bones and observe whether the model follows the movement normally.
insert image description here
If it is not correct, you need to adjust the bone's influence weight on the model. That is, the position and size of the envelope, or directly set the weight value through the vertex.
Before moving the bones, we need to set the default pose in order to be able to return to the default pose after the action is done.

  • Select all the bones (the object filter selects the bones in the toolbar), then Alt + right click and select "Set Skin Pose".

insert image description here

  • Return to the default pose. After selecting all the bones, Alt + right click and select "Use Skin Pose" to restore the default pose.
    insert image description here

3.2 Biped object testing

  • Modifying the Biped Skeleton

First, create the biped skeletal system. Then enter the bone editing mode, click on any bone of the Biped, and then click "Motion" -> "Biped" in the command panel to enter the bone editing mode.

Then, in Motion -> Structure, you can modify the bone hierarchy. For example, the spine bones can be changed from 4 to 3, and the number of fingers and toes bones can also be reduced.

Then, in the "figure mode", you can translate, rotate and scale each joint bone in the Biped, place each joint bone of the Biped in the middle of the corresponding body part, and also adjust the size of each joint bone.

When operating the bones, try to use the local coordinate system of the bones, so that it is easier to adjust the position of the bones.
When adjusting the Biped, first start from the root bone (pubic bone), and then adjust the position and size of the child bones.
insert image description here

When moving a certain bone, it will affect the child bones. Click "Only Affect Axis" in the hierarchy to get rid of this constraint. That is, the child bone does not follow the movement. However, when this operation is actually used, it is still not ideal.

Since the mannequin is symmetrical, we can copy/paste to the other half after we have adjusted the bone positions on one half. First, "Create Set", then select the adjusted bone (left arm), then "Copy Pose", and finally "Paste Pose to the opposite side" to complete.
insert image description here

Finally, after adjusting all the bones, turn off Figure Mode.

  • Bone Skin Binding
    Use 3DMAX's built-in skin system to bind Biped (skeleton) and character models together

(1) Add a skin modifier to the model.
(2) Edit the envelope, add bones, and assign vertices and weights to the bones.

  1. Coincide the character model with the biped skeleton.
    You can select the model first, and press the shortcut key Alt+X to make it transparent.
    Then select "Bones" in the object filter, so that only the bones can be selected for operation.
  2. After selecting a bone with the mouse, enter "Motion" - "Body Mode" to edit the details.
  3. First right-click the model to convert it to an editable polygon, select the model→modify panel→find the skin in the modifier list.
  4. Click on the Skin modifier to add.
  5. Click the button "Edit Envelope", find the button "Add", and add bones.
  6. Adjust the weight value. Check the Select vertices, find the weight tool to open.
    Change click selection to circle selection, select any bone name to modify the weight value. The red circle is its area of ​​influence. When modifying the weight, 0 means no control and 1 means full control. If some parts of the skeleton model do not move after dragging, it means that there is a problem with the weight and needs to be modified.
    insert image description here

3. Animation production

  • Set the animation time
    Generally, 30 frames per second is enough. This FPS value can be set in 3ds max. "Time Configuration" in the lower right corner, you can set the FPS value. You can also set "Animation" -> "End Time". The unit of this end time is frame, which is the length of the frame slider in the animation control panel below 3ds max.
    insert image description here

  • Key frame: animation is composed of a group of key frames, and the part between the key frames is automatically calculated by the system according to the linear interpolation method. Keyframe is a slider with red, green and blue colors.

  • There are two ways to set keyframes in 3ds max, one is automatic keyframes, the other is to set keyframes (manual keyframes). The two states can be switched through the two buttons in the red box in the figure below.
    insert image description here
    (1) In the automatic key frame state, when the time frame slider is moved to a certain time frame position, and then the position or movement of the model is adjusted, the system will automatically set this as a key frame.
    (2) In the key frame setting state, after adjusting the position or movement of the model, and then moving the time frame slider to a time frame position, you need to manually click the key shape button to set this as a key frame.

  • Object filter
    In order to select all bones conveniently, we can select "Bone" in the object filter.
    insert image description here

  • Rotation Snapping
    To help us rotate precisely, we can set the rotation angle and turn on rotation snapping at the same time.
    insert image description here
    Then the left mouse button selects the above button "angle capture switching", and then rotates the model object as follows: the
    insert image description here
    above angle changes are all multiples of 5.

4. FBX export

insert image description here

epilogue

如果您觉得该方法或代码有一点点用处,可以给作者点个赞,或打赏杯咖啡;╮( ̄▽ ̄)╭
如果您感觉方法或代码不咋地//(ㄒoㄒ)// ,就在评论处留言,作者继续改进;o_O???
如果您需要相关功能的代码定制化开发,可以留言私信作者;(✿◡‿◡)
感谢各位大佬童鞋们的支持!( ´ ▽´ )ノ ( ´ ▽´)! ! !

Guess you like

Origin blog.csdn.net/hhy321/article/details/132438922