In this tutorial, I am going to help you get started with Vitruvius and Unity3D, step by step.

{ By the way, Vitruvius is featured in the official Microsoft Kinect Website and Channel9 }

Prerequisites

Binaries

The following binaries are included:

LightBuzz.Vitruvius.dll

This is the most important file. Contains all of the magic sauce of Vitruvius.

Windows.Kinect.dll

Since Microsoft does not have an “official” Unity-compatible dll, we created for you. This dll should be always included in your projects.

In case you are already using the old Microsoft’s Unity package, you’ll need to delete the StandardAssets code and keep Windows.Kinect.dll.

Guide

Now, let’s create our first Kinect project using Unity and Vitruvius.

Step 0 – Download Unity & Visual Studio

First things first. To use the full power of Vitruvius, you need the Unity3D and Visual Studio (or MonoGame).

I recommend using the latest version of Unity, even though any version higher than 5.0 would do the job just fine. Unity is a powerful game engine based on DirectX. It gives you the ability to create amazing 3D and 2D applications easily, with performance in mind. Visual Studio is a state-of-the-art Integrated Development Environment that helps you build, debug, and deploy your apps.

Step 1 – Download Vitruvius

Unity binaries and samples are included in the Academic, Premium, and Platinum versions of Vitruvius. So, download the version of your choice and unzip the folder. The folder is named LightBuzz.Vitruvius.x.x.x.

Vitruvius Download Folder

The following files and folders are included:

Assemblies

Contains the .dll files for the supported platforms.

Documentation

Contains MSDN-like documentation files.

Samples

Contains a dozen demo projects to get started.

Changelog.txt

Includes the recent version changes and updates.

License.pdf

A dull, boring, legal agreement. In short: you can use the products you create with Vitruvius as you like. Just don’t re-sell the binaries.

ReadMe.pdf

Some basic information about the hardware and software requirements.

ThankYou.pdf

A personal message from Vangos Pterneas (Microsoft Kinect MVP) to you.

Step 2 – Open the Unity Package

We’ll get started immediately! Let’s open the one of the demos. Vitruvius comes with a handy .unitypackage file. If you are already familiar with Unity, you know that a .unitypackage is a set of code, assets, and dll files that can be integrated into your own projects. To open the .unitypackage file, navigate to the folder:

LightBuzz.Vitruvius.x.x.x ⇒ Samples ⇒ LightBuzz.Vitruvius.Samples.Unity

Vitruvius Download Samples - Unity

Double-click the .unitypackage and Unity Engine will launch automatically.

Step 3 – Create a new Project

When Unity launches, you have to either create a new project or choose an existing one. Vitruvius binaries will be installed automatically.

Vitruvius Unity - Launch

Let’s create a new project. Specify a name and a location for your project. Click “Create Project”.

Vitruvius Unity - New Project

Wait a few seconds while Unity is importing the packages. When finished, you should see a blank screen with all of the imported data.

Step 4 – Open a Sample Demo Scene

To reveal the sample demos, open the following folder:

Assets ⇒ LightBuzz.Vitruvius ⇒ Scenes

Vitruvius Unity - Samples

The following scenes are available:

Angle Sample

Displays angles between some specified human body joints, along with visual arcs.

Avateering Sample

Animates five 3D body models based on the movements of the human body.

Avateering Color Sample

Animates a 3D model on top of the Color stream.

Face Sample

Shows how easy it is to acquire High Definition Face points (eyes, nose, forehead, mouth, chin, jaw, chins, cheeks).

Fitting Room Sample

This is a virtual mirror (fitting room) demo with three clothes. Women will love it!

Frame Effect Sample

Shows the streams of every camera (Color, Depth, Infrared) and a stickman.

Gestures Sample

Demonstrates some common Kinect gestures (wave, swipe, zoom, start).

Green Screen Sample

The classic background removal application.

Green Screen Fitting Room Sample

This is a combination of the background removal demo and the fitting room demo: the app detects the body, removes the background, and puts on some clothes.

Recording Sample

Using this sample, you can record & playback the Color, Depth, Infrared, Body, and Face streams.

Selective Angle Sample

Shows you how to move only specific parts of a 3D avatar.

To open a scene, double-click the corresponding file. For example, I’m opening the AvateeringSample.

Vitruvius Unity - Avateering Sample

To edit the source code of each scene, navigate to the folder:

Assets ⇒ LightBuzz.Vitruvius ⇒ Scripts

The Scripts folder contains the code-behind C# files that are used to control the game objects and give interactivity to the apps.

Step 5 – Play!

To test a scene, click the Play button.

And… that’s it! You just saw how easy it is to get started with Kinect using Unity3D and Vitruvius.

So, go on! Modify the samples to create your own amazing apps. What are you planning to develop?

Till the next time… keep Kinecting!

Author Vangos Pterneas

Vangos Pterneas is a Microsoft Most Valuable Professional in the Kinect technology. He helps companies from all over the world grow their revenue by creating profitable software products. Vangos is the owner of LightBuzz Software agency and author of The Dark Art Of Freelancing.
Read more

More posts by Vangos Pterneas

Leave a Reply