Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Unity Character Animation with Mecanim
Unity Character Animation with Mecanim

Unity Character Animation with Mecanim: A detailed guide to the complex new animation tools in Unity, packed with clear instructions and illustrated with original content in the context of a next generation zombie apocalypse adventure game

eBook
S$53.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Unity Character Animation with Mecanim

Chapter 1. The Zombie Attacks!

In this chapter, we will demonstrate the process of importing and animating a rigged character in Unity. After making sure the character is being imported correctly, we will work through the necessary steps to get the character animated in the game view using the Mecanim toolset and a little code.

In this chapter we will cover:

  • Starting a blank Unity project and importing the necessary packages
  • Importing a rigged character model in the FBX format and adjusting import settings
  • Organizing materials and textures within the project hierarchy
  • Setting up the Avatar using the Avatar Definition Mapping panel
  • Creating a simple state machine in the animator controller panel
  • The basics of scripting for Mecanim

Typically, an enemy character such as this will have a series of different animation sequences, which will be imported separately or together from a 3D package. In this case, our animation sequences are included in separate files.

We will begin, by creating the Unity project.

Setting up the project

Before we start exploring the animation workflow with Mecanim's tools, we need to set up the Unity project:

  1. Create a new project within Unity by navigating to File | New Project....
  2. When prompted, choose an appropriate name and location for the project.
  3. In the Unity - Project Wizard dialog that appears, check the relevant boxes for the Character Controller.unityPackage and Scripts.unityPackage packages.
  4. Click on the Create button. It may take a few minutes for Unity to initialize.
  5. Download the project ZIP file for this book from the Packt website. The file contains a Unity assets package with the content necessary for the projects in this book.

    Tip

    Downloading the example code

    You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

  6. When the Unity interface appears, import the PACKT_CAWM package by navigating to Assets | Import Package | Custom Package....
  7. The Import package... window will appear.
  8. Navigate to the location where you unzipped the project files, select the unity package, and click on Open.

    The assets package will take a little time to decompress.

  9. When the Importing Package checklist appears, click on the Import button in the bottom-right of the window.

Once the assets have finished importing, you will start with a default blank scene.

Importing our enemy

Now, it is time to import our character model:

  1. Minimize Unity.
  2. Navigate to the location where you unzipped the project files.
  3. Double-click on the Models folder to view its contents.
  4. Double-click on the zombie_m subfolder to view its contents.

    The folder contains an FBX file containing the rigged male zombie model and a separate subfolder containing the associated textures.

  5. Open Unity and resize the window so that both Unity and the zombie_m folder contents are visible.
  6. In Unity, click on the Assets folder in the Project panel.
  7. Drag the zombie_m FBX asset into the Assets panel to import it.

    Because the FBX file contains a normal map, a window will pop up asking if you want to set this file's import settings to read it correctly.

  8. Click on the Fix Now button.

    Note

    FBX files can contain embedded bitmap textures, which can be imported with the model. This will create subfolders containing the materials and textures within the folder where the model has been imported. Leaving the materials and textures as subfolders of the model will make them difficult to find within the project.

The zombie model and two folders should now be visible in the FBX_Imports folder in the Assets panel.

In the next step, we will move the imported material and texture assets into the appropriate folders in the Unity project.

Organizing the material and textures

The material and textures associated with the zombie_m model are currently located within the FBX_Imports folder. We will move these into different folders to organize them within the hierarchy of our project:

  1. Double-click on the Materials folder and drag the material asset contained within it into the PACKT_Materials folder in the Project panel.
  2. Return to the FBX_Imports folder by clicking on its title at the top of the Assets panel interface.
  3. Double-click on the textures folder. This will be named to be consistent with the model.
  4. Drag the two bitmap textures into the PACKT_Textures folder in the Project panel.
  5. Return to the FBX_Imports folder and delete the two empty subfolders.

    The moved material and textures will still be linked to the model. We will make sure of this by instancing it in the current empty scene.

  6. Drag the zombie_m asset into the Hierarchy panel.

It may not be immediately visible within the Scene view due to the default import scale settings.

We will take care of this in the next step.

Adjusting the import scale

Unity's import settings can be adjusted to account for the different tools commonly used to create 2D and 3D assets. Import settings are adjusted in the Inspector panel, which will appear on the right of the unity interface by default:

  1. Click on the zombie_m game object within the Hierarchy panel.

    This will bring up the file's import settings in the Inspector panel.

  2. Click on the Model tab.
  3. In the Scale Factor field, highlight the current number and type 1.

    Note

    The character model has been modeled to scale in meters to make it compatible with Unity's units. All 3D software applications have their own native scale. Unity does a pretty good job at accommodating all of them, but it often helps to know which software was used to create them.

  4. Scroll down until the Materials settings are visible.
  5. Uncheck the Import Materials checkbox.

    Now that we have got our textures and materials organized within the project, we want to make sure they are not continuously imported into the same folder as the model.

  6. Leave the remaining Model Import settings at their default values.

    We will be discussing these later on in the book, when we demonstrate the animation import.

  7. Click on the Apply button. You may need to scroll down within the Inspector panel to see this:
    Adjusting the import scale

The zombie_m character should now be visible in the Scene view:

Adjusting the import scale

This character model is a medium resolution model—4410 triangles and has a single 1024 x 1024 albedo texture and separate 1024 x 1024 specular and normal maps.

The character has been rigged with a basic skeleton. Creating a skeletal rig will be discussed in detail in the next chapter. The rigging process is essential if the model is to be animated.

We need to save our progress, before we get any further:

  1. Save the scene by navigating to File | Save Scene as....
  2. Choose an appropriate filename for the scene, such as Chapter1_1.
  3. Click on the Apply button.

Despite the fact that we have only added a single game object to the default scene, there are more steps that we will need to take to set up the character and it will be convenient for us to save the current set up in case anything goes wrong.

In the character animation, there are looping and single-shot animation sequences. Some animation sequences such as walk, run, idle are usually seamless loops designed to play back-to-back without the player being aware of where they start and end.

Other sequences, typically, shooting, hitting, being injured or dying are often single-shot animations, which do not need to loop. We will start with this kind, and discuss looping animation sequences later in the book.

In order to use Mecanim's animation tools, we need to set up the character's Avatar so that the character's hierarchy of bones is recognized and can be used correctly within Unity.

Adjusting the rig import settings and creating the Avatar

Now that we have imported the model, we will need to adjust the import settings so that the character functions correctly within our scene:

  1. Select zombie_m in the Assets panel.
  2. The asset's import settings should become visible within the Inspector panel.
  3. This settings rollout contains three tabs: Model, Rig, and Animations.
  4. Since we have already adjusted the Scale Factor within the Model Import settings, we will move on to the Rig import settings where we can define what kind of skeleton our character has.

Choosing the appropriate rig import settings

Mecanim has three options for importing rigged models: Legacy, Generic, and Humanoid. It also has a none option that should be applied to models that are not intended to be animated.

Legacy format was previously the only option for importing skeletal animation in Unity. It is not possible to retarget animation sequences between models using Legacy, and setting up functioning state machines requires quite a bit of scripting. It is still a useful tool for importing models with fewer animation sequences and for simple mechanical animations. Legacy format animations are not compatible with Mecanim.

Generic is one of the new animation formats that are compatible with Mecanim's animator controllers. It does not have the full functionality of Mecanim's character animation tools. Animations sequences imported with the generic format cannot be retargeted and are best used for quadrupeds, mechanical devices, pretty much anything except a character with two arms and two legs.

The Humanoid animation type allows the full use of Mecanim's powerful toolset. It requires a minimum of 15 bones, and assumes that your rig is roughly human shaped with a pair of arms and legs. It can accommodate many more intermediary joints and some basic facial animation.

One of the greatest benefits of using the Humanoid type is that it allows animation sequences to be retargeted or adapted to work with different rigs. For instance, you may have a detailed player character model with a full skeletal rig (including fingers and toes joints), maybe you want to reuse this character's idle sequence with a background character that is much less detailed, and has a simpler arrangement of bones.

Mecanim makes it possible reuse purpose built motion sequences and even create useable sequences from motion capture data.

Now that we have introduced these three rig types, we need to choose the appropriate setting for our imported zombie character, which in this case is Humanoid:

  1. In the Inspector panel, click on the Rig tab.
  2. Set the Animation Type field to Humanoid to suit our character skeleton type.
  3. Leave Avatar Definition set to Create From This Model.
  4. Optimize Game Objects can be left checked.
  5. Click on the Apply button to save the settings and transfer all of the changes that you have made to the instance in the scene.

This is how the screenshot will look like:

Choosing the appropriate rig import settings

Tip

The Humanoid animation type is the only one that supports retargeting. So if you are importing animations that are not unique and will be used for multiple characters, it is a good idea to use this setting.

In the next step, we will define the hierarchy of the joints in the Avatar.

Creating the Avatar

The Avatar Mapping settings allow you to specify how the bones relate to the model. You can think of the Avatar as an intermediary device that translates between the character model and the animations. It will dictate how motion will be transferred to the model, so it is important that all of the models bones are correctly identified within the hierarchy.

  1. In the Inspector panel, click on the Configure... button to bring up the Avatar Mapping settings.

    Unity will prompt you to save your scene, which is necessary because the Avatar definition is actually done in a separate, temporary scene.

  2. Click on the Save Scene button.

    The Avatar Definition panel will become active in the Inspector panel.

    The Mapping tab should be active by default. This shows a simplified diagram of a humanoid bone hierarchy. Beneath the diagram is a list where bones are selected.

  3. Choose the Mapping rollout in the bottom left of the panel.
  4. Click on Automap, Unity will attempt to assign the bones to the slots in the Avatar based on their names and position within the hierarchy.

Because our character's skeleton uses recognized naming conventions, Unity should have automatically put each bone into the right slot within the mapping definition. Any unidentified positions will show up in red, and any non-essential or optional bones that have not been identified will be displayed in gray.

Above the actual bone definition slots, there are alternate tabs for the body, head, left hand, and right hand, where more joints can be defined for more detailed rigs. With the exception of the head and neck, the bones covered under the Head tab are not that important right now. Facial animation will be covered later, in Chapter 6, Talking Heads.

The rest of the bones in the list for body, left hand, and right hand will need to be allocated. You can scroll down in the panel to see the names of the bones from your hierarchy and which position they have been placed in within the Avatar.

Tip

Note that the Avatar mapping definition only has two positions available for spine bones, if the character you are mapping has more than two bones in its spine (like this example), you can decide which of them to use.

I usually leave out the upper-spine bone, as it typically contains very little data in animation sequences, and because of its proximity to the neck and shoulders, which usually have more influence on the vertices of the model.

Creating the Avatar

A common occurrence at this point of the process is a red warning display in your Scene view notifying you that the character is not in T-pose:

Creating the Avatar

This is a simple fix, as we will demonstrate in the next step.

Adjusting the character's pose

Mecanim requires character models to be in a T-pose for them to be properly processed. The true T-pose is not a universal default pose for character models, and luckily Mecanim has a way to accommodate this:

  1. Click on the Pose rollout at the bottom of the Avatar Mapping tab within the Inspector panel.
  2. Choose Enforce T-pose. This will force your characters arms into a true T-pose so that they are Mecanim compatible.

    Note

    You may wonder why we don't just model a character in a T-pose rather than something more like an M. The main reason is that, while it is on the screen, the character's arms will usually be down by its side, modeling the arms at 45 degrees rather than 90 will minimize the amount of stretching of the mesh and textures.

Dedicated motion editing packages, such as Autodesk MotionBuilder, also require a true T-pose, so the Enforce T-Pose option within Mecanim is a good compromise and a nice touch, which saves us having to remodel or rerig a character in order to use these tools.

Adjusting the character's pose
Checking the bone hierarchy in the Avatar

Mecanim's Avatar definition tools are responsive to bone hierarchy and naming conventions. If you are working with several character rigs that have the same bone names, it is likely you will only need to tweak the settings the first time.

The tool sometimes goes wrong. When this is the case, make sure you follow these steps:

  1. Once you initiate the mapping process, the skeleton in your Hierarchy panel is expanded to make it easy to drag and drop. All you have to do is drag the bones from the Hierarchy panel into the appropriate slot in the list.
  2. Take the time to check the bones in the list to make sure that there are no mistakes.
  3. Optional bones, such as the neck and toes, are quite often left out by the automatic mapping, so it is a good idea to add them (in the appropriate definition slots), at this stage, before you apply the settings.

    Note

    If you make a mistake, just drag the correct bone onto the field in the list to replace it.

  4. When you are finished, click on Done. This will save the settings of the Avatar and apply them to the instance of the model in the scene.

The Avatar asset will now be referenced in the Animator component of the character game object, which can be viewed in the Inspector panel:

Checking the bone hierarchy in the Avatar

At this point, our Avatar is configured, creating a link to our character's skeleton hierarchy that Unity can use.

Next, we will lay the ground work to add a simple animation that will run in the game.

Setting up the animator controller

Mecanim requires an animator controller to connect compatible animation clips with the character model. This is displayed as a node-based interface, which shows the relationships between different animation clips and the parameters that trigger them.

We can continue with the scene, or if you have closed Unity since working on the last section, re-open the scene that you saved. You can open the scene by navigating to File | Open Scene | PACKT_Scenes | Chapter1_1.

Assets imported with animation will have space for an animator controller to be added to them. Follow these steps to create the controller:

  1. Click on the PACKT_Controllers folder in the Project panel.
  2. Navigate to Create | Animator Controller.
  3. The Animator Controller icon will appear in the Assets panel in the lower-center of the interface.
  4. Rename this zombieControl.
  5. Click on the Animator tab to open the Animator panel. If this is not visible, add it in the menu bar by navigating to Window | Animator.
  6. Drag the Animator tab above its current position to undock it as a window.

    Note

    Undocking the Animator panel is not strictly necessary, especially if you are working with on a large monitor, but it will give you more space to view the whole state machine as it is created.

In the newly created animator controller, there are two visible states, labeled Entry and Any State:

Setting up the animator controller

The Entry state will usually be the starting point when the game starts or when the character is instantiated. We can use Any State to override states, which are currently running if we want something else to take priority.

Setting up a number of states for animation clips will enable greater control over the implementation of the animated sequences. We will add more states in the next step.

Creating states

States are the building blocks of the animator controller. Each state includes one or more motion clip. States are linked using Transitions, visually presenting the order in which states will become active:

  1. Create a new state by right-clicking on the empty part of the animator graph.
  2. Navigate to Create State | Empty.
  3. Select the state by clicking on it. Rename it Idle in the Inspector panel.
  4. Create a second state in the same way. Name this Hit in the Inspector panel.

Next, we will add the appropriate animation clips to the states:

  1. Click on the PACKT_Animations folder within the Project panel.
  2. In the Assets panel, expand both the zombie_idle and zombie_attack animation assets by clicking on the small arrow on the right side of their icons.
  3. Select the Idle state in the Animator window.
  4. Drag the zombie_idle animation to the Motion slot in the Inspector panel:
    Creating states
  5. Select the Hit state and drag the hit animation from the expanded zombie_attack asset into the Motion slot in the Inspector panel:
    Creating states

These animations are now tied to the states that we have set up.

At the moment, the states are unconnected. To connect them, you need to create a parameter that will define the conditions that cause the character to switch to another state.

Creating a parameter

In the Animator interface, parameters are used to specify when states will run. They are similar to variables in Unity scripts and can take the form of integers, floats, and booleans. To create a parameter follow these steps:

  1. In the upper-left of the Animator window, click on the Parameters tab and the + symbol to create a new parameter.
  2. Choose Trigger from the list.

    In Mecanim, a trigger parameter allows you to allow a quick action. It is ideal for attack states because it is reset each time it is fired off.

  3. Name the parameter Hits

This trigger parameter will determine when the zombie's attack animation will play.

Adding transitions

The next stage is to create transitions between your two states. Transitions show how states are connected in the Animator window:

  1. Right click on the Idle state in the Animator window.
  2. Select Make Transition.
  3. Click once on the Hit state.

The transition is displayed as a white line with an arrow indicating its direction:

Adding transitions

We also need to create a transition from Hit back to Idle, so the character will stop playing this animation:

  1. Right click on Hit and click once on Idle to create the return transition.

    In the animator controller, it is the transitions that contain the parameters.

  2. Click once on the transition pointing from Idle to Hit. Its setting will appear in the Inspector panel.

    The only change that needs to be made to the default settings, at this stage, is to change the drop down in the Conditions box at the bottom of the panel.

  3. Click on the arrow and select the Hits parameter from the list.

As we want the full attack animation to play out, we will leave the Conditions box in the return transition with its default setting Exit Time. This will set the state to transition out once the animation has played through:

Adding transitions

The Animation controller is now complete. We will add it to the male zombie character in the next step:

Adding transitions
  1. Select the zombie_m game object in the Hierarchy panel.
  2. Drag the zombie_control animator controller onto the Controller slot in the character's Animator component.

At this stage, when we test the game, the zombie will run its idle animation, as its Idle state is currently specified as the default state (marked in orange in the Animator window).

In order to enable the Hit state to take over, we will need to do a little scripting.

Writing the script

The character requires a small amount of code to enable it to switch to its Hit state and play the zombie_hit animation:

  1. Select the PACKT_Scripts folder in the Project panel.
  2. Create a new Javascript file by navigating to Create | Javascript.
  3. Rename the file zombie_attack.
  4. Double-click on the file to open it in MonoDevelop.
  5. At the top of the script, add the following code:
    var thisAnimator : Animator;

    This is a variable, which is used to keep track of the character's animator controller that is attached as a component to the same game object that we will attach this script to.

    Note

    If you are coding in C#, rather than Javascript, the syntax is a little different. Functions are defined with the prefix void rather than function and variables are defined without the var prefix and with their type before their name, without the separating colon, such as this:

    Animator thisAnimator;
    

    You will find the completed code (in both languages), in the project files.

    By default, unity-created Javascript files contain two functions: Start and Update. We will initialize the connection to the zombie's animator controller in the Start function.

  6. Within the curly brackets of the Start function, add the following line of code:
    thisAnimator = GetComponent(Animator);

    Because this code is in Start, as soon as the script runs, it will gain access to the animator component and store this in the thisAnimator variable for future use.

    Next, we will add some code to the Update function. Unlike Start, which runs only once, when the script is first activated, Update runs every frame, so it is usually the best place to check for input.

  7. Add the following code within the curly brackets of the Update function:
    if(Input.GetButton("Fire1"))
    {
        thisAnimator.SetTrigger("Hits");
    }

    In the first line of code, we check for input from the Fire1 button (set up by default for the left-mouse button). When this condition is met, we trigger the Hits parameter inside the animator controller, enabling the transition to the Hit state and playing the zombie_hit animation.

  8. Save the script in MonoDevelop by navigating to File | Save.

If any errors appear in the console, be careful that you have not left out any semicolons (that should end all operations and variables) or curly brackets (that should start and end all functions and statements).

Tip

If you are including any comments for your own references, make sure that single-line comments are preceded with two forward slashes // and block comments are encapsulated by /* and */.

This is a pretty short, simple script. We will be elaborating on this later in the book.

We need to add the script to the zombie character. This can be done by dragging the script from the Project panel onto the zombie_m game object in the Hierarchy panel to attach it as a component.

Next, we will make a few small adjustments to the scene, to make it easier to view our animation.

Adjusting the scene elements to preview the animation

Changing the position and orientation of the camera will make it easier to view the zombie's animation:

  1. In the Hierarchy panel, select the default Main Camera and move it to a position where it is pointing at the zombie.

    Note

    A quick way to set the position of the camera in the scene is by performing the following steps:

    1. Navigate the Scene view so that a chosen object is framed.
    2. Select the Main Camera game object by clicking on it in the Hierarchy panel.
    3. In the menu bar, navigate to GameObject | Align with View.

    Note

    The camera will be repositioned to match the current Scene view navigation.

  2. Add a plane to represent the ground in the scene by navigating to GameObject | Create Other | Plane.

    The plane should be centered to the scene by default.

    The directional light that is already in the scene should be sufficient to light the character.

  3. If necessary rotate the light so that the character is clearly lit.

The light should clearly illuminate the character's face in the scene.

Previewing the hit animation in the game view

Now that we can clearly see the character within the view, we can test the animation:

  1. Press the Play button in the top-center of the Unity interface.

    The zombie will cycle through its idle animation.

  2. Click on the left-mouse button.

This will cause the hit animation to play once before transitioning back to the Idle state.

Previewing the hit animation in the game view

Summary

In this chapter, we covered the major steps involved in animating a premade character using the Mecanim system in Unity.

We started with FBX import settings for the model and the rig.

Then we covered the creation of the Avatar by defining the bones in the Avatar Definition settings.

After that we created a simple example of an animator controller, added it to the character, and added some prepared motion clips.

Finally, we got our male zombie character up and attacking, by writing and implementing a simple control script.

In the next chapter, we will demonstrate the process of rigging a character in 3ds Max and Maya for use in Unity and Mecanim. This time we will start with the male zombie's female counterpart.

Left arrow icon Right arrow icon

Description

Game animation for independent developers has taken a giant leap forward with Unity 5's Mecanim toolset, which streamlines the import/export, retargeting, and many other aspects of the character animation workflow. Unity Character Animation with Mecanim is a great primer for getting to know the nuts and bolts of Mecanim and other character animation related tools in Unity 5. It offers you step-by-step instructions for preparing and exporting rigged models and animation sequences from commonly used 3D packages, such as Maya, 3ds Max and Blender. This book explores the new set of animation tools introduced with Mecanim in Unity 5. Approaching its subject matter through a typical genre–a zombie action game, character animation techniques are explored using real examples of player input and interaction, enemy behavior, and other aspects of game dynamics. As the book progresses, the reader will understand how these elements fit together in a small game development workflow. We will begin with a demonstration of the process of getting a rigged character into Unity 5 and setting it up to use provided animation sequences. We will also consider a few industry standard 3D packages and how these can be used to rig a humanoid character for use in Unity 5. We will demonstrate the retargeting capabilities of Mecanim’s Humanoid Animation type by adjusting motion sequences to fit disparate character types in our game. After this, we will look at Ragdoll physics and the implementation of this commonly used technique in a Mecanim workflow. The book culminates with a thorough dissection of the enemy character AI script incorporating the Mecanim elements detailed in the previous chapters. Unity Character Animation with Mecanim will provide you with a detailed exploration of the interaction between game development and character animation, and will broaden your understanding of the rich animation toolset within Unity 5

Who is this book for?

If you are a Unity developer looking to get to grips with the character animation specific tools, a 3D software user who is new to Unity, or a beginner game developer who is interested in character animation and interaction, this book is ideal for you. Some experience with either the Unity interface or basic 3D coordinates is recommended, but not required.

What you will learn

  • Learn how to prepare a rigged character model to receive animation within Unity
  • Acquire efficient techniques to refine and optimize motion capture data
  • Retarget animation sequences between different character rigs
  • Discover how to rig a humanoid character and export for use in Unity
  • Script character interaction for a First Person character model
  • Create dynamic animation sequences from scratch using keyframe techniques, in a variety of 3D software packages
  • Learn Project Management in Unity
  • Understand how to set up a complex facial rig for speech
  • Set up Animation Controllers with masked states and blend trees to create seamless and additive animation transitions
  • Construct a ragdoll game object and instantiate it in a game
  • Devise Mecanim animation integration for the player and AI driven animation for enemy characters

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 29, 2015
Length: 290 pages
Edition : 1st
Language : English
ISBN-13 : 9781849696364
Vendor :
Unity Technologies
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 29, 2015
Length: 290 pages
Edition : 1st
Language : English
ISBN-13 : 9781849696364
Vendor :
Unity Technologies
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 224.97
Unity Character Animation with Mecanim
S$74.99
Unity Multiplayer Games
S$66.99
Unity 5.x Cookbook
S$82.99
Total S$ 224.97 Stars icon

Table of Contents

10 Chapters
1. The Zombie Attacks! Chevron down icon Chevron up icon
2. Rigging Characters for Unity in 3ds Max and Maya Chevron down icon Chevron up icon
3. Interacting with the Environment Chevron down icon Chevron up icon
4. Working with Motion Capture Data Chevron down icon Chevron up icon
5. Retargeting Animation Chevron down icon Chevron up icon
6. Talking Heads Chevron down icon Chevron up icon
7. Controlling Player Animation with Blend Trees Chevron down icon Chevron up icon
8. Implementing Ragdoll Physics Chevron down icon Chevron up icon
9. Controlling Enemy Animation with AI and Triggers Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(10 Ratings)
5 star 60%
4 star 10%
3 star 10%
2 star 20%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Nov 24, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Unity Character Animation with Mecanim covers how to use the Mecanim tools to animate characters in a game. The book covers a massive amount of information quickly, yet manages to do so in a clear and easy to understand manner. Each lesson builds on what was covered previously so that by the end of the book, you have learned how to accomplish quite a bit of fun and interesting tasks to make your games more enjoyable and interesting.
Amazon Verified review Amazon
Raja Biswas Nov 17, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
All You need to know about character animation in Unity. This book does a great job explaining different animation techniques. It also shows how to use blend trees to control various animations, how to use ragdoll physics. Moreover in the last chapter it teaches about enemy ai and animation. Overall a good book to learn about animation techniques with mecanim.
Amazon Verified review Amazon
Amazon Customer Dec 18, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A thorough step by step guide to character animation book. Great for learning Unity.
Amazon Verified review Amazon
Francis Oct 28, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I read this book from a developer’s point of view. When developing a game project I tend to use developer art, which usually lacks the polish of assets created by game artists. This book provides the additional guidance I need to add the professional polish to the games I am working on, especially for 3D animated games using Unity.The book uses a game "Zombie Attacks" to demonstrate many 3D animation techniques that as a developer I was not familiar with. The author demonstrates rigging characters for Unity in 3dsMax and Maya which I have never done before but going through the examples provided a good bases for future development.From start to finish the book demonstrates using Unity to build a complete first person shooter game using sophisticated animation techniques and putting it all together into a Unity scene with scripts to control the AI of the gameThe chapter on using motion sequences was interesting since these bring your characters to life with realistic movements. I also enjoyed the chapter on Ragdoll Physics, that demonstrate how to apply physics to the zombie characters.The sample project the comes with this book (downloaded from the Publisher) provides a good basis for starting a first person shooter and the book provides the information on who it is all put together making it easy to make modifications.
Amazon Verified review Amazon
Cristian Gradisteanu Oct 19, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book does a great job of explaining the character creating and animation with Unity engine. Starting with rigging in 3ds Max and Maya, re-targeting and controlling player animation, offering some insights of AI, this is a solid book on creating games with Unity.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.