animator animation

=================================================animation= =====================================================

_ =animation==2016.11.06


There are 3 kinds of importing from other art software to unity.
One is to import animation (it can be modified but you need to create an animation control first. Then put it in) (you can change keyframes) === provides modifiable actions
One is to import a prefab with a white box (which can be pulled to the scene, code addition events cannot change keyframes) with a single action and model but no color === provides
a ; the other is to import a prefab with a white box (pullable) Adding events to the scene code cannot change keyframes) Contains all action synthesis and models but has color ==== The main object refers to

the action synthesis can be split into

legacy
with a white box, without avatar, with color, All actions
with white box, no avatar, no color, with single action
One with color and all actions, one with split single action, low utilization The event of

modifying animation will affect all objects that share animation. The
prefab class can View the action directly on the prefab
Open the animation window to modify objects with old animation controls.
Most animations can be used in common. It mainly depends on whether there are corresponding nodes in the animation

If you add a clip (animation) to the animation, the animator and animation will be automatically generated

=================================== ===============animator==================================== ================
Human
can use the new animation human to reduce avatar, can reuse AC, can IK
prefab with white frame, including avatar, including color
n with white frame prefab, without avatar, without color, with action
One with avatar and color, one with action, maximum utilization
========================= ========================Summary============================ =========================
The difference between the new version and the old version. effect. benefit. How to replace the new version with the old version, how to replace the old version with the new version
1 Motion redirection 2 Over-animated preview Modification of the
new version and the old version. No need to change art resources
Redirection and IK functions can only be used for hunman
public animation control, do not share avatar

=============================== ==================Modeling============================== ======================
Bone rigged and skinned humanoid model---
1 Build a model -- generally composed of a set of polygons or triangles
2 Bone binding -- create a bone joint level (defines the bone structure inside the mesh and its relationship with each other)
3 Associated skin -- skin (through joints) animation to control the movement of a specific mesh)

=========================================== =======Summary============================================ ========
Generally speaking,
fbx . After putting them in unity, you can choose the state of animation in rig: none, Legacy, geneic, hunman
After choosing Legacy, you can choose the place where the animation is stored.

 Store in Original Roots are stored in the original root object and animations are stored in the root object of the animation package (this may be different from the root object in Unity).
 Store in Nodes Animations are stored in nodes together with objects. Use this option when you have a complex animation setup and want full script control.
 Store in Root Animations are stored in the scene's transform root object. Use this option when the animation is driven by objects with a hierarchy.

Selecting genius and human can choose which object the animation applies to. Avatar
refers to other avatars or creates avatars by yourself

================================= =================IK================================== =====================
init
 avatar.SetIKPositionWeight(AvatarIKGoal.RightHand,0);//pos weight
 avatar.SetIKRotationWeight(AvatarIKGoal.RightHand,0);//rota weight
 avatar.SetLookAtWeight(0.0f);//lookAt weight
 bodyObj.position = avatar.bodyPosition; //body position
 bodyObj.rotation = avatar.bodyRotation;//body rota
 rightHandObj.position = avatar.GetIKPosition(AvatarIKGoal.RightHand);
 rightHandObj.rotation = avatar.GetIKRotation(AvatarIKGoal.RightHand);
 lookAtObj.position = avatar.bodyPosition + avatar.bodyRotation * new Vector3(0,0.5f,1);



 
== body, eyes, limbs, except for the eyes, all need pos and rota
== main method
SetIKPosition(AvatarIKGoal.RightHand,pos)
SetIKRotation(AvatarIKGoal.RightHand ,rotat)
SetLookAtPosition(pos)

 SetIKPositionWeight(AvatarIKGoal.RightHand,1)
 SetIKRotationWeight(AvatarIKGoal.RightHand,1)
 SetLookAtPositionWeight(1)

For example, right hand, he has pos and rota, the rotation of rota is the rotation of the joint, the movement of pos in the joint
void OnAnimatorIK(int layerIndex)

 == =================================MatchTarget================
for Rotate characters and climb mountains
====================================apply root motion ======== ====

=========
apply root motion false
Then the movement of the movement will not affect the character, controlled by script handled by script
void OnAnimatorMove()
{
controller.Move(avatar.deltaPosition);
transform.rotation = avatar.rootRotation;//setfloat, let the state tree change the direction of the character, and then change the character rotation according to the direction
       }
              or directly set the rotation without action
=========
apply root motion true
then the displacement of the action will affect the character
 ===================================Summary === ===================================

    Update Mode: Update Mode: Normal means use Update to update, Animate Physics Indicates that FixUpdate is used to update (generally used in the case of interacting with objects), and

Unscale Time means to ignore timeScale to update (generally used in UI animation).
    Culling Mode: Culling mode: Always Animate means to update the animation playback even if the camera is invisible, Cull Update Transform means to stop the

animation but the position will continue to update, Cull Completely means to stop all animations when the camera is invisible renew.


    First of all, we found 3 default states, which are automatically created by Unity and cannot be deleted:
        Entry: Indicates the entry when entering the current state machine, and the state connected to this state will become the state after entering the state machine. The first state;
        Any State: Indicates any state, and its role is that the state it points to is a state that can be switched at any time;
        Exit: Indicates to exit the current state machine, if any state points to the exit, it means that it can be Exit the current state machine from the specified state;
   
    there is a tick in the line Has Exit Time
    We have checked this option. When the animation is converted, it will wait for the current animation to finish playing before switching to the next animation. If the current animation is a loop animation, it will wait for the conversion when the playback is completed, so remember when you

need to convert the animation immediately. To uncheck

    the automatic transition to the next state indicated by the arrow when my current animation finishes playing (no other jump conditions), this option must be checked at this time, otherwise the animation will be stuck in the

last Frame, if it is a looping animation, it will always loop.

     Solo is a certain switch to this state,
    mute is not able to switch to this state
    animation contains animationState contains animationClip contains animationEvent
    animator contains animationStateInfo

    Transition is to switch from one animation to another animation. The blending number cannot stay in the middle for
    the superposition of the two animations. You can stay in the middle

     cycle offset for playback offset

layer contains state machine contains state
state machine can contain sub-state machine
========================= Chinese manual
http://www.ceeger.com/Components/FBXImporter-Model.html ;
 
================================= ===============End================================== =================

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326024599&siteId=291194637