Table of Contents

Unity

Create/Open Project

Save new projects on the Innovationlab Filer or on the ZHdK GIT Server in your project folder.

Import a Character

  1. Drag and Drop FBX into project window
  2. Select Character in project window and go to Inspector > Rig > Animation Type set to Humanoid

Import Advanced Sceleton Charater from Maya into Unity

Install OptiTrack Unity Plugin

A full documentation about using the OptiTrack Unity Plugin can be found the OptiTrack page: https://v20.wiki.optitrack.com/index.php?title=OptiTrack_Unity_Plugin

  1. Download Plugin from Optitrack Website http://optitrack.com/downloads/plugins.html or from the Innovationlab Filer: Path 01_assets/06_plugins/Optitrack/
  2. Install the Plugin in your unity project by doubleclicking the on the Plugin file or go to Asset > Import Pacakge > Import Custom Packageā€¦ and select the Plugin package.

Add OptiTrack Client to Scene

  1. Open Asset Folder OptiTrack/Prefabs/
  2. Drag & Drop Client - OptiTrack to the scene Hierarchy
  3. Select Client - OptiTrack in Hierarchy and open Inspector window
  4. Check oarameters of the Optitrack Streaming Client (Script) Component

Parameters (Motive & Unity on same PC)

Connection Type      Multicast
Local Address        127.0.0.1
Server Address       127.0.0.1
Server Command Port  1510
Server Data Port     1510
Bone Naming Conv.    Motive

Stream the data to Local Interface Loopback Address if Unity is running on same PC as Motive.

Parameters (Motive on Mocap PC & Unity on Beamer PC)

Connection Type      Multicast
Local Address        10.128.96.102
Server Address       10.128.96.103
Server Command Port  1510
Server Data Port     1510
Bone Naming Conv.    Motive

Stream capture data in motive to Local Address if Unity is not running on the same PC as Motive.

Check Network LAN IPs for other configurations.

Add Motion Caputre Stream for a Rigid Body

To add motion capture live data to a rigid body (e.g. camera), you need to add the Optitrack Rigid Body Script as a Component to your object:

  1. Open Asset Folder OptiTrack/Scripts/
  2. Drag & Drop OptitrackRigidBody to an object in Scene Hierarchy to connection object with motion capture data (e.g. Main Camera)
  3. Open Inspector of Object and show Optitrack Rigid Body (Script) Component
  4. Click on circle symbol next to Streaming Client and select Client - OptiTrack client of the scene
  5. Set Rigid Body Id to StreamingID of corresponding Motive Rigid Body
  6. Run Play Mode

Add Motion Caputre Stream for a Character

Make sure you have a rigged character in unity (see Import a Character from Maya or Import a Character from Mixamo)

To add motion capture live data to a Character/Skeleton, you need to add the OptitrackSkeletonAnimator Script as a Component to your character:

  1. Drag & Drop your character into Scene Hierarchy
  2. Open Asset Folder OptiTrack/Scripts/
  3. Drag & Drop OptitrackSkeletonAnimator to an character in Scene Hierarchy to connection skeleton with motion capture data
  4. Open Inspector of character and show Optitrack Skeleton Animator (Script) Component
  5. Click on circle symbol next to Streaming Client and select Client - OptiTrack client of the scene
  6. Click on circle symbol next to Destination Avatar and select Avatar of the character
  7. Set Skeleton Asset Name to Asset Name of corresponding Motive Skeleton
  8. Run Play Mode

Enable Background running

Run in Background in File > Build Settings > Player Settings activate

Useful Shortcuts

Q           Pan
W           Move
E           Rotate
R           Scale
F           Focus on active selection
Ctrl+Alt+F  Move to view

Animation

  1. Open Window > Animation
  2. Add Property to Animate
  3. Press record
  4. Change values to animate > a keyframe will be added
  5. Scrub in Timeline and change values again

Animator

Use to create states. Each state has an animation. So there you can combine animations and connect it to conditions. Window > Animator

Different Layers can be used to make different animations at the same time. The lower the layer the higher priority it has.