Sep
8
2010
I've been prototyping some ideas with Unity3D and the Arduino/mbed, looking at how we can connect the real and the virtual environments for all sorts of applications. This is a prototype of a simple light dependent resistor circuit that controls the light intensity of a room light in a Unity3D scene. The connection is via Open Sound Contol (using Japanese Hacker Recotana's ArdOSC implementation http://recotana.com/recotanablog/?page_id=222 ) over ethernet to a Unity3D scene also running an OSC C# implementation.
The photo showing the Unity3D console shows the test OSC messages and how they are mapped to control Unity3D light intensity. The light dependent resistor returns a number between 0 and 1023. We send this value over ethernet via OSC messages to the Unity3D scene. Unity3D lights can have an intensity between 0 and 8, so we just use a simple scaling formula to fit the LDR range to the Unity3D light Range. I have it set up so that when the LDR is receiving more light the Unity room light is low, and vice versa.
This simple demo sets a communications framework in place to enable all sorts of wired/wireless sensors to interact and control a virtual scene, and vice versa. I'm looking forward to freaklabs wireless arduino platform for some real fun and games!
Unity3D is a multiplatform game development tool designed for Rapid Application Development and ease of use. In addition to games, it can also be used to develop serious games, simulations, virtual worlds, interactive art and other applications. Unity Basic edition is free. http://unity3d.com/unity/licenses.html