Low cost virtual reality and motion tracker 
There are many flavors of virtual environments out there. The type of interest to this post are known as a CAVEs. As is the case with all types of VR, CAVEs have their benefits and limitations. These are beyond the scope of this article but what is important to note is that the intrinsic planar design of a CAVE lends itself easily to cheap motion tracking.

As I have mentioned before I currently work on a system known as CaveUT. CaveUT is an open source mutator for Unreal Tournament 2004(UT2k4) that allows the user to create a CAVE like environment by leveraging UT2K4's client spectator mode. Without getting in to the nitty gritty lets just say that what CaveUT does is set up a system whereby each "spectator" is actually a different viewpoint in to the 3D world centered around the main view generated by the server, thus giving us a sense of 3D.

So really the cost of CaveUT breaks down in to the cost of UT2k4, 2 or more computers and their displaying device(monitor or projector), and the cost of wall space. Pretty cheap when compared to VR goggles or full immersion environments. The savings isn't from the hardware. VR goggles have come down in price. What you save is development costs for a virtual world. To date there are few, if any, open source virtual reality environments. And none that I know of as robust as Unreal's engine. A gaming engine is a multi-million dollar investment that you get access to for a measly $25 dollars. While the engine itself isn't open source the hooks are all freely available.

But what fun is a VR environment without some interaction. Sure you can use a mouse and keyboard but where's the fun in that? Some of you may have seen Johnny Lee's interesting youtube video on how to use the Wii remote as a head tracker. This gave me the idea of a low cost tracking system.

All you need is a WiiRemote, an open source C# library for reading WiiRemote input/output, and a strip of infrared LEDs. Any infrared LEDs will do but for testing purposes I just used the ones that came with my Wii.

Using the C# Wii library is a snap. Look at the demo code that comes with the library for an idea of how trivial the programming can be. For those not familiar with C# the following line of code will allow you to control the mouse with the Wii:
Cursor.Position = new Point((int)(WiiPositionX * ScreenWidth), (int)(WiiPositionY * ScreenHeight));
If you look at the example program that comes with the Wii remote library you'll see a section of code that updates the info from the Wii remote. At the bottom is a line of code pertaining to the display of the ellipses that represent known LEDs. Put the mouse code in any one of these "if" statements and change 'WiiPosition#' to whatever the code is for that value. Make sure you don't use the raw data, what you need is the normalized data (0-1).

The last piece of the puzzle is a way to communicate with UT2K4. I've got you covered. In my source repository are 2 packages. Tracksoft is a mutator for UT2K4 that accepts motion tracking and treadmill information from a tracking server. TrackSoftNet is the tracking server. It's a stand alone C++ program designed to take tracking information from a HiBall server and a treadmill and import it in to UT2K4. Currently I haven't implemented the Wii code but honestly it would be trivial. It took me 30 minutes to get the Wii remote up and running and moving my mouse cursor around.

One thing to keep in mind is that the WiiRemote can only track up to 4 LEDs. What does this mean? It means that if your user only needs to move around in a 180 degree arc and doesn't look up you should be fine. This lends itself perfectly to a CAVE environment, especially if you are looking to make a shooter where the user will never physically turn around.

And that, as they say, is that. A "do it yourself" and relatively cheap approach to virtual reality. There are cheaper solutions if you happen to be an amazing programmer, but not many. As I said the VR goggles are cheap but you would have to write a VR world from scratch.

Addendums: In the near future I will add the Wii remote tracking code to my TrackSoftNet server. Check back for updates. If anyone is interested in the code but lacks the technical knowledge to actually make it go just let me know and I can compile an executable for distribution. And please ignore the sloppy code structure. This was written in 2 days to meet a deadline.

Addendum 2: The SVN server I like above now requires a username and password.
Login: Guest
Password: guest


[ view entry ] ( 140 views )   |  permalink  |   ( 3 / 57 )

<<First <Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next> Last>>

"Real programmers don't comment their code. If it was hard to write it should be hard to read."