MooCap

Unity plugin for motion capture with the HTC Vive.
Work in progress
Tool
Virtual Reality
C#
Unity Engine

This is my graduation work for my bachelor Digital Arts and Entertainment.

In this research I looked for the possibility to use the HTC Vive for motion capture and the problems coming with it.
I also made a working plugin for Unity to do motion capture with the HTC Vive and save these as animations.
The main focus lies on an plugin which a single person can operate to create simple animations in a short timespan.

Special thanks to my supervisor Thomas Goussaert, my coach Regis Le Roy and Marianne Peeters for the logo.

Conclusion

Virtual reality is not accurate enough for motion capture.
It can however easily be used as rough reference material.

Avatar Matching

The first step to achieve motion capture is humanoid avatar matching.
If we match the avatar of a skinned mesh to an avatar generated from our input, our character will move accordingly.
Before that we do need to create an avatar from our HTC Vive Input, this is done by a calibration.
After the calibration we add constraints and inverse kinematics to complete the avatar.

We can match the local orientation of the corresponding bones to match the pose.

Orientation Matching

A problem that arises when trying to match avatars is that the local orientations don't match even if you take the offset in account.
This is because not every character is rigged using the same axises, so the axis of most bones differ.
To fix this we need an additional two matrix multiplications to reach the right result.
In Unity this can be done easily by adding additional GameObjects so these matrix multiplications are done automatically.

Between the bone and his parent we add two new transforms.
A zero transform with the inverse rotation of the parent in T-pose as local rotation.
A control transform which contains the rotational value we will use to do avatar matching.
The bone transform contains the final rotational offset to complete the orientation.

Recording

Every update the current rotation of each bone is saved as a frame to a clip.
This clip can be exporter to collada for further editing or edit locally in the timeline-editor.
Clips can be added to a playback device on which avatars can be linked so they play that animation.

Export

From the beginning of the project I wanted to add an exporter to export your animations to other programs for further editing.
There are so many great animation programs with countless functions out there.
There are however a few smoothing functions available such as removing peaks and smoothing out the animation.

Export can be done using Assimp to Collada but there are a few export problems with it.
I also wrote my own exporter through XML Serialization to Collada, this one is standard included.

Dependencies

Unity SteamVR plugin, available from the Unity Asset Store.

HTC Vive Stereo render plugin, available from the Unity Asset Store.

Assimp, Optional export method.

AssimpNET, Optional export method.

⇽ Back