FOLLOW VITUAL BIKE ON THE OFFICIAL SITE
Here you can read about its origin, how was the first project release, and some curiosity.
What is Virtual bike?
A real bike is placed in front of a wall on which is projected a video of a route. The video will follow your speed, if you run fast or if you slow down, giving the impression that you are really cycling through Sanit Lowrence streets. There is also a mechanism of score that will place point-boxes through the route, rendered in an ‘augmented reality way’, that let you earn points.
Si tratta di una vera bicicletta posizionata di fronte un muro su cui è proiettato un video il cui contenuto è una passeggiata tra le vie della città. Il video seguirà la velocità del ciclista - se si pedala più veloce andrà più veloce - dando l'impressione al giocatore di passeggiare davvero per le strade di San Lorenzo. C'è anche un meccanismo di punteggio: durante il percorso compariranno delle scatole virtuali posizionate in maniera casuale sull'asfalto (stile realtà aumentata), che permetteranno al giocatore di guadagnare punti.
Eventually we used ad IR sensor for the steering, while a Bike computer sensor and magnet was used to detect each rotation of the wheel (and then the velocity).
We used Arduino to connect the hardware sensors, Quartz Composer for the graphic, a MIDI keyboard to let the player use some special bonus, and Java-based code that allow the hardware to talk with Quartz Composer.
Virtual Bike was presented in different events, and it is always a big success. In particular, we are amazed at how the children liked the bike. How this ever happened? Today, the graphic quality of games is excellent. Despite this, create a simple game but with unusual input devices and that recall the life of every day can make a difference. And we know this!
HOW VIRTUAL BIKE WAS BORN // COME NASCE VIRTUAL BIKE
HOW IT WORKS
Here it is a brief description of the workflow we followed to build up the installation.
STEP ONE – Shoot the path.
Use a good camera (we used a GOPRO cam that allows a beautiful wide angle video), a steadycam if you want your videos to be more stable, and bring with you a lot of patience. 🙂 Once you have one or more videos with your path you have to stabilize them (we used After Effects CS6 warp stabilizer) and create a single long video.
For a good video you must take into account:
- The speed must be constant throughout the path.
- The vanishing point of the street must be at the center of the frame.
- The horizon must be at the same level.
STEP TWO – Build up the bike
- a bike (really? 🙂 )
- an Arduino Ethernet (or a Arduino + Ethernet shield)
- a bike speedometer
- an IR sensor (we used one from Sharp IR sensors family)
- a Mac (with Quartz Composer)
The bike speedometer is actually a simple button: usually there are two wires, one for power and the other one attached to the other end of the switch. You would use them with the Arduino in the same way “simple button tutorial” shows.
We need the IR sensor to know if you are steering left/right: just put it on a distance of about 60 cm on the side of the bike, parallel to the ground, pointing the wheel: it’ll return the distance from the sensor to the wheel (be careful to fill-in the gaps between the rays of the wheel, otherwise the IR will pass the wheel!). Here you can find a tutorial on how to do that.
STEP THREE – Turn your bike into a virtual bike
The Arduino program will:
- receive the speedometer signal every time the wheel will make a whole turn.
- calculate the instant speed.
- process the IR signal.
- send an OSC message with speed and turn infos trough Ethernet to the Mac. We used ArdOSC library to send OSC messages from Arduino, and qcOSC receiver to process them in Quartz Composer.
The OSC message will be processed in Quartz Composer in this way:
- the speed will be the increment of the timeline associated with the path-video (the faster you run, the faster the video will play).
- the turn info will offset the video on the left or the right (the video was recorded with a wide angle: we show only a portion of that to simulate a steering).
STEP FOUR – Enjoy the fun!
We start to think about this project considering a funny way to approach people to the story of the neighborhood Saint Lowrence in Rome. It is only one of hundreds of project you can discover on internet about Arduino and Quartz Composer programming.
We choose Arduino for the hardware side because of its huge opensource community: you can search for every kind of tutorial, even the strangest one.. you’ll always find someone crazy like you, and you’ll find a lot of help to start with Arduino everywhere! 🙂
From the software side, we choose Quartz Composer mainly because of its immediate use. It is mainly a software for VJ artists, but it allow to do a lot of funny things with little effort: if you have a Mac, give it a try! 🙂