Book Image

Unity 5.x Animation Cookbook

By : Maciej Szczesnik
Book Image

Unity 5.x Animation Cookbook

By: Maciej Szczesnik

Overview of this book

This recipe-based practical guide will show you how to unleash the power of animation in Unity 5.x and make your games visually impeccable. Our primary focus is on showing you tools and techniques to animate not only humanoid biped characters, but also other elements. This includes non-humanoid character animation, game world creation, UI element animation, and other key features such as opening doors, changing lights, transitioning to different scenes, using physics, setting up ragdolls, creating destructible objects and more. While discussing these topics, the book will focus on mecanim, the Unity 3D animation tool, and how you can use it to perform all these tasks efficiently and quickly. It contains a downloadable Unity project with interactive examples for all the recipes. By the end of this book, you will be confident and self-sufficient in animating your Unity 3D games efficiently.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Preparing motion capture files for humanoid characters


Using motion capture files is not always easy. In most cases, we can use them directly (after exporting them to an FBX file) for characters using the Generic rig type. But we almost always want to use our motion capture files for humanoid characters. The problem occurs when our motion capture rig is not a standard Unity Humanoid rig (and again, it is almost always the case). We can expect all kinds of errors—bones rotating with an offset, deformations in the mesh, and so on.

This recipe shows how to retarget motion capture files onto a rig suitable for Unity humanoid animations. We are going to use Blender 3D.

 

Getting ready

To follow this recipe, you will need a humanoid character ready to be rigged to a proper Unity Humanoid rig. We also need a motion capture animation. You can find a huge free-to-use library of motion capture data on the Carnegie Mellon University's website at http://mocap.cs.cmu.edu/. We are going to use the 01_01.bvh...