Import and setup of "Unity" 10.1 type human animations

Source: Internet
Author: User
Tags naming convention mixamo unity 5

Categories: Unity, C #, VS2015

Date Created: 2016-05-02 I. Production or purchase of human-like models

In order to make full use of the Mecanim animation system and the animated repositioning of human-like animations, it is necessary to use other 3D modeling software (e.g. 3DS Max 2015) to create a human-like mesh model with skeleton and skin.

1. What is a human-like model

The human-like model is also called the human-like grid model, which is usually composed of a set of polygons or triangular meshes.

The process of creating a class human model is called modeling.

In the above figure, 1 is a human model that is finished by "modeling, framing, skinning," and 2 is the skeleton for the model, and 3 is the effect of skinning.

2, the basic idea of making human-like model

Here's a quick introduction to how to create a class human mesh model from scratch with 3DS Max 2015, which simply explains the three basic steps of modeling, framing, skinning.

(1) Modeling

Modeling refers to the process of creating a human-like grid in three-dimensional modeling software (3DS Max, Maya, Blender, and so on).

Here are the points you should follow when modeling, which ensures that the model works well with the human model in the Unity engineering animation.

(1) The grid topology should be "reasonable". What is "reasonable" everyone's understanding is different, but usually you should keep in mind that it is important to deform the vertices and triangles of the model when it is animated. In the absence of unsightly mesh distortions, a poor grid topology can cause the model to fail to move.

A quick way to get started with topologies is to learn and understand the meaning of topological structures and the reasons for this arrangement by learning a lot about the three-dimensional character mesh models that others have already created.

(2) Pay attention to the grid scale. Note that the imported model and the size of the "meter cube" are consistent (the side length of the standard Unity Basic cube is one unit, so in most cases it is considered to be a 1m cube). Or, be sure to check whether the units used by the three-dimensional resource pack are "meters", and if not, adjust the export settings to ensure that the model size is proportional to the cube.

This principle seems simple, but it is also very important. Unless you are extremely careful, it is easy to create a model without any scale concept, resulting in a group of objects that are not proportional in size when you import Unity.

(3) When arranging the grid, make sure that the character's feet stand at the origin of the coordinates or the "anchor point" of the model. Since the character usually walks upright on the ground, it is easier to control if its anchor point (i.e. the transformed position) is already on the ground.

(4) If possible, use T-Pose (t-pose) modeling. This helps make room for you to refine the polygon details where you need it (for example, underarm). It also makes it easier to place devices in the grid.

(5) Clean up the model. If possible, cover holes, weld vertices, remove hidden faces, which can help skin, especially the automatic skinning process.

is the skinning mesh (skin mesh), which is the result of modeling, texturing, and triangulation.

(2) Frame

To control the role movement, you must first create a joint hierarchy (joint hierarchy) that defines the skeleton in the mesh and the motion relationship between them, using modeling software such as 3DS Max 2015.

This process of creating a joint level is called a "rigging".

This is the process of creating a joint skeleton to control the movement of the model.

Three-dimensional resource bundles provide a variety of ways to create joints for human-like devices. The range includes a biped skeleton that has been built, scaled into the grid, and a single skeleton creation and parent-child tool to create your own skeleton structure. Although the details are beyond Unity, there are some general guidelines:

Learn the existing class skeleton hierarchy (such as biped) and, if possible, use or mimic the skeletal structure.

Make sure the hips are parent bones at the skeleton level.

At least 15 bones are required in the skeleton.

The joint/bone hierarchy should follow the natural structure of the created role. If the arms and legs appear in pairs, use a consistent name for them (for example, "arm_l" means the left arm, "arm_r" means the right arm, etc.). The possible tiers include:

Hips – Spine – thorax – shoulder – arm – forearm – hand

Hips – spine – thorax – neck – head

Hips – thighs – legs – feet – toes – toe end

For bipedal skeleton (Biped Skeleton), place the T-position (t-pose):

(3) Skin

The class human grid must be associated with the joint hierarchy so that it looks like a "person". In addition, you can control the motion of a particular mesh by specifying the animation of the joint only after the association.

In short, this "process of connecting a skeleton to a grid" is called skinning (skinning). Plainly speaking, is to give the human skeleton (or skeleton) model set a layer of "human skin" or "dressing", of course, called "skin" than called "set a layer of human skin" or "put on clothes" good and tall on the many.

To be precise, skinning is the process of attaching a "mesh" to the "skeleton".

Skinning includes binding the vertices in the mesh to the bones, either directly (called rigid bindings), or by binding on the mixing effects of many bones (called flexible bindings). The skinning methods used by different software may be different, such as assigning unique vertices and drawing impact weights on the mesh. The initial settings are usually automatic, for example by finding the closest effect or using a "heat map".

Skinning often requires a lot of work and testing with animations to ensure a satisfying skin distortion effect.

Some general guidelines for this process are as follows:

(1) Initially use an automated process to set up skins (see tutorials on 3DMax, Maya, etc.).

(2) Create a simple animation for your device, or import some animated data as a skin test. This allows you to quickly assess the effect of the skin in motion.

(3) Gradually editing and perfecting the skinning scheme.

(4) Adhere to the "maximum" use of four effects at flexible binding, which is the maximum number that Unity can handle. If some meshes are affected by more than four kinds of effects, you will lose at least some information when playing animations in Unity.

For interactive skin binding (Interactive skin bind), this is one of the skin methods used by many software.

Second, the production of human role

After you've done the modeling, framing, and skinning process with 3DS Max 2015, you can import it into unity and then use Mecanim to make the class man role.

1. Ways to create or acquire a human-like model

In Mecanim, there are three ways to get the class human model used in Mecanim animation.

(1) Through professional 3D modeling software (such as 3DS Max, Maya, blender, etc.), from scratch to create their own human models needed. This approach needs to be familiar with the use of 3D modeling software, the advantage is what you want to make what you do, the disadvantage is that it takes time.

(2) Purchase the appropriate class human model resources from the Unity resource store. The advantage of this approach is that the model comes fast and the downside is that it may take some money.

(3) Accelerate the process of making a human-like model using procedural personas (called programmatic role systems or role generators such as Poser, Makehuman, or Mixamo). Some of these software can be used to mesh skeletons and skins (such as Mixamo) at the same time, while others do not have this capability. In addition, the number of polygons in the original class grid should be minimized in the process of using the software to make it better suited to Unity. The advantage of this approach is that it may improve some of the production efficiency, the disadvantage is that you have to learn new software usage, if the new software will not be used, may not be "directly with 3DS Max 2015" to come fast.

2. Export the model as a single FBX file

The Unity engine can import a large number of different common and local 3D file formats.

Regardless of which modeling software is used, it is recommended to export it to a file in FBX format. The advantages of this format are:

· The FBX format mesh model can contain both joint levels, normals, textures, and animation information.

• The FBX mesh model can be imported to 3DS Max 2015 to verify the correctness of the animation model.

• Animation information that does not contain a mesh can be exported directly from the FBX file.

For Unity 5.3.4, it is recommended to use 3DS Max 2015 to make or import human models made from other software, and then export them to FBX 2014 format files, and then you can work with this FBX file in unity. The Mecanim animation system is used to animate it.

3. Import the exported FBX file to unity

To use the role model in unity, you must first import it into the Unity project.

Importing the FBX format animations into unity is simple, just drag the model directly into the assets folder in the Project panel.

After importing, you can edit the import settings in the "Import Settings" of the Viewer (Inspector). III. import multiple model animations to unity

In addition to the previous introduction of importing a single animated model into unity, there is also a way to import an animated model that is named after the naming convention used by unity for animation files.

When you use this method, you can name the model file that you created separately by using the "[email protected]" convention. For example, for a model called "Goober", you can import separate idle, walk, jump, and jumps over animations using the 4 files named below:

Idle animation file name: [Email protected]

Walking animation file name: [Email protected]

Jump Animation file name: [Email protected]

Jumps over animation file name: [Email protected] "

This way, although the original file is exported with the grid data, only the animated data of those files is used.

is an example of the 4 animated files used by an animated character (note that the. fbx extension is not displayed by default in Unity, and you click Select a file to see its extension):

When you drag these 4 files into the project's assets folder, Unity automatically imports all 4 files and collects all the animations into a file that does not have an @ tag. For example, in the example shown, the program collects it into the Goober.mb file, which automatically references animations for idle, jumping, walking, and jumps over.

For FBX files, when importing multiple animations, simply export the keyframes needed for each file (activate the animation in the FBX dialog box), and then export the model file (for example, GOOBER.FBX) with no tick animation and 4 clips to [email protected]. Iv. Split Animation

Split animation is to break the animation into animated segments (Animation Clips).

An animated character typically has a series of basic actions that are triggered in different contexts, such as walking, running, jumping, throwing, and dying 、...... such as These basic actions are called animation segments.

According to the specific needs, the above basic actions have two ways of processing:

Mode 1: Import a single animated segment that plays each basic action in a fixed order.

Mode 2: Import several separate animation segments separately. This eliminates the need to split the animation inside unity.

These two methods are explained below separately.

1. Using an animated model containing pre-segmented fragments

Models that contain pre-split animations are the easiest model types to use.

For this type of animation, you'll see a list of available clips in the Animations tab in the Animation Import viewer (Animation Importer Inspector), and click "Play" in the preview window (below the viewer) , you can preview the clips. You can also edit (adjust) The frame range of these fragments, if desired.

2. Use a model that contains an undivided animation

In this case, you must first break the single animation segment into several sub-fragments before using it in unity. After importing the model in FBX format, in the split animation (split animations) in Import settings (Settings), tell which frames in the Unity resource file make up which animation segment (Animation Clip). The name you specify here is used to activate the animation in the game.

For models that provide a fragment as a continuous animation, in the animation (Animation) tab in the Animation Import viewer (Animation Importer Inspector), you can define a frame range that conforms to the independent animation sequence (walk, jump, and so on). You can create a new animation segment by pressing (+) and selecting the range of frames included in the clip.

For models that contain muscle lines (Mecanim), the steps to split the animation are as follows:

(1) Create a new animation controller (Animator controllers)

(2) Open the Animation Controller window (Animator)

(3) Drag the required animation segments into the Motion controller window (Animator controllers Windows)

(4) Drag the model resource into the hierarchy view (Hierarchy).

(5) Add an animation controller to the resource animator (Animator) component.

Unity 10.1 Type Human animation import and Settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.