Interaction with 3D models using WiiMote

1. Overview

Interaction with a 3D environment is always both challenging and interesting. It is an excellent tool to demonstrate concepts of 3D programming, give a better insight of the 3D model and virtual reality, and catch the attention of students in a class.

Lab3D allows the user to interact with 3D models and draw onto the screen using the WiiMote. Check the video below to see a sample of using the WiiMote to interact with thee virtual reality.

2. Connecting the WiiMote

First of all, I recommend downloading the Wiimote Library from http://wiimotelib.codeplex.com/. You can find the WiiMoteTest program in the download and the WiiMoteTest is a very useful tool to check if the WiiMote is working properly.

In order to connect the WiiMote, follow these steps:

1 – Open the Bluetooth connections screen (use the Control Panel or right-click the Bluetooth tray icon);
2 – Select the Add Device option;
3 – Press WiiMote’s buttons “1” and “2” AT THE SAME TIME. The LEDs will start flashing;
4 – If you are using Windows 7, the system should detect the WiiMote automatically. Windows XP users need to manually order the system to check for new Devices;
5 – The WiiMote device will be identified as Nintendo RVL-CNT-##;
6 – Select option Pair Without Using a Code and click Next while still pushing buttons 1 and 2;
7 – Windows should detect the WiiMote as a HID device;
8 – Still pushing buttons 1 and 2, run WiimoteTest software or use Lab3D menu Wiimote -> Initialize  to finish connecting the WiiMote device;
9 – When the LEDs stop flashing the WiiMote is properly connected and you can stop pushing buttons 1 and 2.

If Windows doesn’t recognize the WiiMote as a human interface device (HID), follow these additional steps:

7a – Still pushing buttons 1 and 2, right-click the Wiimote “Nintendo” device in the Bluetooth devices screen;
7b – Select “Properties” and go to the Services tab;
7c – Check the “Drivers for keyboard, mice, etc (HID)” box;
7d – Procceed to step 8.

Windows should now properly recognize the WiiMote as a HID device.

3. Using the WiiMote

In order to enable WiiMotes in Lab3D, go to menu WiiMote -> Initialize. One sphere is created to represent each connected WiiMote in Lab3D virtual reality. Some features will not be available without a Wii sensor bar (alternatively, you can use two candles to emit infrared light and create a spooky atmosphere).

You can use the WiimoteTest program to check if the WiiMote is seeing the infrared lights.

Honestly, using the WiiMote after it has been connected is really easy. I have not checked the performance using low performance systems so be warned if you intend to use Lab3D with a WiiMote in a netbook.

3.1 Initialization

When you initialize WiiMotes, a sphere is created to represent each detected WiiMote. This sphere shows the position of the WiiMote in Lab3D virtual reality and it will move accordingly if a sensor bar is available (check section 3.3 – Commands using the sensor bar).

3.2 Commands without the sensor bar

It is posssible to issue camera commands using the WiiMote and buttons Left, Right, Up, Down, Plus and Minus. These commands will translate the camera and they don’t require the Wii sensor bar.

3.3 Commands using the sensor bar

The sensor bar is a tool that allows Lab3D to detect where the WiiMote position and move its corresponding sphere inside Lab3D virtual reality. The Wii sensor bar is just a pair of infrared LEDs that are tracked by the WiiMote infrared camera. Notice in the video how I installed my Wii sensor bar on top of the monitor.

The HOME button is very important when using the sensor bar to track the WiiMote position. To initialize the WiiMote, point to the center of the sensor bar and press the HOME button. Lab3D will reset the WiiMote screen position based on the WiiMote distance and orientation.

The available commands are:

1 – “HOME” button to center the WiiMote marker;
2 – Move the WiiMote to the sides and closer/further from the screen to move the WiiMote sphere (the WiiMote has to see the Wii sensor bar);
3 – “A” button: press and hold to draw on to the screen. If the WiiMote sphere on the screen is touching one of the 3D models, the 3D model will be dragged;
4 – “Up/Down/Left/Right/Plus/Minus” while dragging with “A”: rotate the 3D model being dragged;

4. Final words

Using the WiiMote to interact with virtual reality gives the user a more complete 3D experience. Lab3D uses the WiiMote to feature camera movement, 3D drawing and 3D models manipulation in three dimensions inside the 3D environment. The possibilities are vast and range from using Lab3D as a tridimensional board to 3D layout design.

Note: WiiMote interation was implemented using the excellent WiiMoteLib, which can be found athttp://wiimotelib.codeplex.com/. Wii and WiiMote are trademarks of Nintendo. I did not modify in any aspect the hardware, I just used it in the computer.

Leave a Reply

Your email address will not be published. Required fields are marked *