Ralf Breninek's profile

Interactive projection mapping using leap motion

Client: Personal interest
Service:
Creative direction, art direction, C# programming, hardware building
Software: Unity 3D, Cinema 4D, Photoshop, Illustrator

Why this prototype?
Besides all the none interactive 2D / 3D rendering I have done I always wanted to do something interactive. Partially because I grew up with games I always wanted to build one myself. But also because motion graphics design includes a lot of tedious, time consuming testing, compositing and rendering, which is drastically reduced with realtime 3D graphics. So why not take a closer look at a game engine?
After my first non interactive projection mapping test in 2013 which is basically a rendering I did in Cinema 4D projected on to a car, I wanted to do something interactive. So because I already did some tests with Unity 3D years ago it was the most logic choice.

What was the goal?
My main goal was to learn how to rotate a physical object with hand gestures and project a fitting animation onto that moving object. Broken down into the main questions I had to answer:
1. How do I get Unity to recognize gestures?
Luckily Leap Motion provides assets and an API by which you can get access to the properties of virtual models of the recognized hands.
2. How do I code C#?
No shortcuts here just lots of tutorial and forum reading, still a lot to learn …
3. How do I connect a stepper Motor to Unity?

How does it work?
Leap Motion + Unity + Arduino = ♥
The Leap Motion works like a camera which sends pictures to your computer which can then be interpreted by it´s Unity API and converted into a virtual hand model. With some C# I drive the scene according to the hand model, send the visuals to a beamer and also data to an arduino board which then drives a stepper motor.
What´s the gameloop?
Because this personal project was more about learning how to drive hardware with C# the gameloop is minimal:
Find all the pets by 1st rotating the cube with your left hand 2nd grab a pet with the right hand and 3rd drop it onto it´s corresponding pillow. You have won the game when all pets are on their pillow, but can also reset it by holding both hands in close proximity for three seconds.

Unity store gallore!
I think that Unity´s big asset store and huge community are it´s biggest selling points, especially for starters and for building prototypes like this one. And because my main goal was to learn how to control a stepper motor with gestures I used a lot of assets from the unity store instead of building them myself.

Links to the Videos:

3D models from all over:
https://www.assetstore.unity3d.com


Thanks to:
Ilya Suzdalnitski for the portal shader which works like masks in Photoshop and After Effects

Interactive projection mapping using leap motion
Published:

Interactive projection mapping using leap motion

Interactive projection mapping with gestures using Unity 3D and leap motion to drive a physical cube

Published: