< Return to Video

Animation Properties - Unity Official Tutorials

  • 0:01 - 0:02
    When you have a model highlighted
  • 0:02 - 0:04
    in the project panel you can define how
  • 0:04 - 0:07
    Unity interprets the mesh, animation,
  • 0:07 - 0:10
    and other properties using the Inspector.
  • 0:11 - 0:13
    These properties come in 3 parts
  • 0:13 - 0:16
    Model, Rig and Animations.
  • 0:16 - 0:18
    In this lesson we'll be looking at the
  • 0:18 - 0:20
    Animations section.
  • 0:21 - 0:23
    The first option under Animations
  • 0:23 - 0:26
    is whether or not to import animations.
  • 0:26 - 0:29
    This must be check to use any of the animations
  • 0:29 - 0:31
    stored within the model file.
  • 0:33 - 0:35
    Bake Animations is used when an animation
  • 0:35 - 0:37
    has been created in a separate modelling
  • 0:37 - 0:41
    or animation program using inverse kinematics,
  • 0:41 - 0:43
    or IK for short.
  • 0:43 - 0:46
    And it has no yet been converted to forward kinematics
  • 0:47 - 0:48
    You can also choose what sort of
  • 0:48 - 0:50
    compression you'd like for your animations.
  • 0:50 - 0:53
    By default there is no compression
  • 0:53 - 0:55
    but you can choose Keyframe Reduction,
  • 0:55 - 0:56
    or Optimal.
  • 0:57 - 1:00
    If you choose to compress the animations
  • 1:00 - 1:01
    you need to decide what error you wish to
  • 1:01 - 1:04
    allow for position, rotation and scale.
  • 1:05 - 1:07
    The smaller the values, the higher the
  • 1:07 - 1:10
    precision, the less compression you get.
  • 1:11 - 1:13
    Below the compression options
  • 1:13 - 1:15
    there's a list of clips that are available
  • 1:15 - 1:17
    from the model.
  • 1:17 - 1:19
    These can be added to or deleted
  • 1:19 - 1:22
    using the + and - icon.
  • 1:23 - 1:25
    Next to each of the names are the
  • 1:25 - 1:28
    start and end frames for the clip.
  • 1:28 - 1:32
    This is what makes each clip in the take different.
  • 1:33 - 1:35
    When one of these clips is selected
  • 1:35 - 1:37
    all of the options are available for that
  • 1:37 - 1:39
    specific animation clip.
  • 1:41 - 1:44
    The first option is the name of the clip.
  • 1:44 - 1:47
    Also, if the file has multiple takes
  • 1:47 - 1:49
    you will see what take that clip is from.
  • 1:51 - 1:53
    Next is the timeline of the animation.
  • 1:54 - 1:56
    Using the handles in the timeline
  • 1:56 - 1:58
    or the Start and End fields
  • 1:58 - 2:00
    you can edit on which frame
  • 2:00 - 2:02
    the clip begins and ends.
  • 2:04 - 2:05
    Below the start and end controls
  • 2:05 - 2:07
    is the loop controls.
  • 2:08 - 2:10
    Loop Time, when checked,
  • 2:10 - 2:12
    means that when the animation is finished
  • 2:12 - 2:14
    playing it will start again.
  • 2:15 - 2:17
    If Loop Pose is checked Unity will
  • 2:17 - 2:20
    try and match up the start and end pose
  • 2:20 - 2:23
    so that the looping clip looks smooth.
  • 2:24 - 2:27
    The Cycle Offset is for adjusting
  • 2:27 - 2:29
    when the clip starts and ends.
  • 2:29 - 2:32
    Use this for mirroring animations.
  • 2:32 - 2:34
    For example, if you want a run clip
  • 2:34 - 2:37
    to be mirrored then you might set the offset
  • 2:37 - 2:41
    to 0.5 so that the other foot is on the floor.
  • 2:42 - 2:44
    The Root Transform Rotation
  • 2:44 - 2:47
    affects how the rotation of an animation
  • 2:47 - 2:49
    affects the avatar.
  • 2:50 - 2:52
    If the root transform rotation is baked
  • 2:52 - 2:55
    in to the pose then the avatar will not
  • 2:55 - 2:58
    rotate with any turning in the animation.
  • 2:59 - 3:01
    Use this option for animations
  • 3:01 - 3:04
    such as running in a straight line
  • 3:04 - 3:06
    so that any slight deviation from a straight
  • 3:06 - 3:08
    line will not affect it.
  • 3:09 - 3:11
    The root transform rotation can either be
  • 3:11 - 3:13
    based on body orientation at the start
  • 3:13 - 3:16
    of the animation or the original source file
  • 3:16 - 3:18
    of the animation.
  • 3:18 - 3:21
    If Body Orientation is chosen
  • 3:21 - 3:23
    then the upper body will point forward.
  • 3:24 - 3:27
    You can use the offset to fine tune
  • 3:27 - 3:29
    the direction of the animation.
  • 3:30 - 3:32
    The next options refer to the root
  • 3:32 - 3:35
    transform position in the Y axis.
  • 3:36 - 3:40
    As with root transform rotation if you check
  • 3:40 - 3:43
    Bake Into Pose the avatar will not
  • 3:43 - 3:46
    move up or down during the animation.
  • 3:47 - 3:49
    There are a few options of what the
  • 3:49 - 3:51
    position can be based on.
  • 3:52 - 3:54
    Original takes the Y position
  • 3:54 - 3:56
    from the source fail.
  • 3:56 - 3:58
    Otherwise it can be based on the avatar's
  • 3:58 - 4:02
    centre of mass or the position of it's feet.
  • 4:03 - 4:06
    Again the offset can be used to
  • 4:06 - 4:08
    fine tune the movement in the Y axis.
  • 4:10 - 4:13
    Root transform position XZ
  • 4:13 - 4:16
    works similarly to the Y axis option
  • 4:16 - 4:18
    except that it affects the horizontal
  • 4:18 - 4:20
    movement of the avatar.
  • 4:21 - 4:24
    Baking in to the pose will restrict movement
  • 4:24 - 4:26
    on the XZ plane.
  • 4:27 - 4:30
    This can be based on either the original file
  • 4:30 - 4:32
    or the centre of mass.
  • 4:33 - 4:35
    When you use the handles on the timeline
  • 4:35 - 4:38
    to adjust the animation you will see a graph
  • 4:38 - 4:40
    for each of the properties below it
  • 4:40 - 4:42
    representing how well it will match
  • 4:42 - 4:44
    when the clip is looped.
  • 4:45 - 4:47
    Based on this matching each option
  • 4:47 - 4:49
    has a traffic light indicating how well
  • 4:49 - 4:51
    it matches.
  • 4:51 - 4:53
    Green for a good loop match,
  • 4:53 - 4:55
    yellow for an okay match
  • 4:55 - 4:57
    and red for a not good match.
  • 4:58 - 4:59
    Depending on what sort of animation clip
  • 4:59 - 5:02
    you are trimming you may or may not
  • 5:02 - 5:04
    want these to loop nicely.
  • 5:04 - 5:07
    For example, with a walking animation
  • 5:07 - 5:10
    you would want the pose to loop nicely
  • 5:10 - 5:12
    but you probably wouldn't want the transform
  • 5:12 - 5:14
    position XZ to loop.
  • 5:16 - 5:18
    If the Mirror box is checked
  • 5:18 - 5:21
    then the animation will be flipped left to right.
  • 5:23 - 5:26
    For information on the avatar mask
  • 5:26 - 5:29
    and animation curves and events options
  • 5:29 - 5:31
    see the lessons linked below.
Title:
Animation Properties - Unity Official Tutorials
Description:

more » « less
Duration:
05:33

English subtitles

Revisions