When Wii Met SketchUp


Every movement, orbit, walk, zoom etc. in the movie above is controlled with the wiimote instead of the mouse. This way, one is not bound to the computer while navigating in SketchUp – perfect for presentations.

I have been amazed for a while by Johnny Chung Lee‘s experiments with the Wiimote and particularly the idea of using it to create a multitouch whiteboard. That, however, will be tried out another day. Today I am presenting a method to use the Wiimote as a tool for navigating 3D space in SketchUp.

Where did the idea come from? A few days ago, I received a blog post from Autodesk Labs stating that they implemented Wiimote navigation for their Design Review product (ADR a great, free 2D/3D viewer and drawing markup tool). While I was waiting to get some installation issues with that one resolved, I decided to try this out with SketchUp. And it worked!

So what can we do with this? Well… I like the idea of using it for presentations. At this point, you can use the roll and tilt of the remote to orbit around a model (while pressing the A and B buttons together). You can similarly use the walk tool to move through space and look around. I also mapped the up/down arrow keys to flip through animation tabs that may be in a model. Finally, the left/right arrow keys can be used to toggle shadows or x-ray mode on and off.

So whether you are doing a presentation in architecture class or are allowing clients to walk through their future house, this should give the audience a more intuitive way to navigate and evaluate the 3D model.

Once you look at how the GlovePIE code (below) works, you’ll see that you can easily modify this setup. It may be thinkable to use the Wiimote also for modeling, but precision may provide problems. Also, at this point, the code does not use the Wii infrared bar (or camera for that matter). If I find the time, I may implement this as a SketchUp plugin – that would likely add a degree of user friendliness to this.

Set Up:

  1. You already have SketchUp, don’t you? Otherwise get it from Google. Your computer must also have Bluetooth enabled.
  2. Get yourself a Wiimote. That’s just the Wii remote ($40), not the entire system.
  3. Install it in Windows. It’s all about setting it up to work with your computer’s Bluetooth adapter. For a guide, you may consult a nice and detailed how-to by Autodesk (or watch this video).
  4. Download GlovePIE. There’s no need to install it, just unzip the folder. It may even be possible to run it off a USB stick.
  5. Add the following key assignments in SketchUp. Do this in the Preferences dialog (Window menu) – see image below.
    Ctrl+Shift+X – View/Face Style/X-Ray
    Ctrl+Shift+T – View/Shadows
    Ctrl+W – Camera/Walk
  6. Open your model in SketchUp and leave it open.
  7. Paste the code below into GlovePIE and press the run button.
  8. Turn on the large screen projector, switch to SketchUp and play around with your new toy… er, “human interface device”.
SketchUp Wii Preferences
SketchUp Wii Preferences

This is the dialog in SketchUp where you can assign keyboard shortcuts. Feel free to modify the code below for your needs.

MAC USERS: I haven’t tried this on the mac yet. All instructions are for Windows. For Mac/Linux tools check out this article on Lifehacker.

Wii Remote Button Assignments:

Wiimote button assignments
Wiimote button assignments

These are the button assignments that work with the code below.

GlovePIE Code:

//  --------------------------------
//  Steer through SketchUp with a WiiMote
//  by: Alex Schreyer
//  web: www.alexschreyer.net
//  updated: 7/2/2008
//  Assign in SketchUp first (Window > Preferences):
//  Ctrl+Shift+X  - View/Face Style/X-Ray
//  Ctrl+Shift+T  - View/Shadows
//  Ctrl+W        - Camera/Walk
//  --------------------------------

// ===== Settings =====

  // How much to zoom
  var.Zoomfactor = 10

  // How much the wiimote needs to be tilted
  var.RollDegrees = 90
  var.PitchDegrees = 60

// ===== End of settings =====

// Show wiimote forces in GlovePIE - for monitoring
debug = "X="+Wiimote.gx+' Y='+Wiimote.gy+' Z='+Wiimote.gz

// Mouse Key Map
Mouse.RightButton = Wiimote.B and not Wiimote.A
Mouse.LeftButton = Wiimote.A and not Wiimote.B
Mouse.MiddleButton =  Wiimote.B and Wiimote.A

// Zoom
Mouse.WheelUp = var.Zoomfactor * Wiimote.Plus
Mouse.WheelDown = -var.Zoomfactor * Wiimote.Minus

// Track smooth movements, keep real mouse active, just in case
var.s_width = screen.Width
var.s_height = screen.Height
FakeMouse.DirectInputX = Smooth(Smooth(MapRange(Wiimote.Roll,-var.RollDegrees,var.RollDegrees,-var.s_width/2,var.s_width/2)))
FakeMouse.DirectInputY = Smooth(Smooth(MapRange(Wiimote.Pitch,-var.PitchDegrees,var.PitchDegrees,-var.s_height/2,var.s_height/2)))

// Animation tab control for presentations
PageUp = Wiimote.Down
PageDown = Wiimote.Up
// Toggle X-Ray mode
Ctrl+Shift+X = Wiimote.Right
// Toggle shadows
Ctrl+Shift+T = Wiimote.Left

// Switch Modes: Select (default) or Walk
Space = Wiimote.One
Ctrl+W = Wiimote.Two

// Reset cursor to center of screen - helps agains carpal tunnel
if Wiimote.Home then
  Cursor.PosX = var.s_width / 2
  Cursor.PosY = var.s_height / 2

Links & Ads:

  • josh

    cool post, thanks Rhinoplasty cost houston

  • Steve Cage

    You can not imagine just how much period I had spent for this information! Thanks free itune codes

  • Manu Kr

    This is awesome post ever i seen thank you for posting this free xbox live gold

  • Manu Kr

    Now free codes of xbox live game are available on this site which can helps you to make your payable game absolutely free Thank you xbox live gratis

  • munna

    done it and find that this post is really amazing.
    free amazon gift card codes generator no surveys

  • munna

    comes to this topic. Liked the material … Thanks for taking the
    time to discuss this, I feel strongly that love.
    hay day cheats no download

  • spotify codes

    free spotify codes for you.

    how to get free spotify premium codes

  • Bas

    I can’t get GlovePIE 29 to recognize the following lines:

    FakeMouse.DirectInputX = Smooth(Smooth(MapRange(Wiimote.Roll,-var.RollDegrees,var.RollDegrees,-var.s_width/2,var.s_width/2)))
    FakeMouse.DirectInputY = Smooth(Smooth(MapRange(Wiimote.Pitch,-var.PitchDegrees,var.PitchDegrees,-var.s_height/2,var.s_height/2)))

    What version of GlovePIE did you use?

    • It works fine in my v. 0.3. Admittedly the double-smooth is not the most elegant coding ever, so maybe take one of them out. I also just saw on their website that there may be a problem when you use the IR sensors as well.

  • For more detailed instructions on using GlovePIE check out this article on Lifehacker:
    Operate Your Computer with Wii Controllers

  • Here are two recent related links:

    Modeling in SketchUp with a Wii remote:

    Controlling 3ds max:

  • Great gobs of goosegrease!! How did you come up with this one!(oh yeah, you did say so above). My family uses the wii a lot. I’m not learned enough in Sketchup (Pro) but will sure try this out when I am! I will be on your blog a lot in the future, didn’t know you were here. I came upon this in the pro discussion group. I am coming out of retirement (55 yrs with 20 yrs. in Autocad doing piping and pressure vessel design). Acad priced me out of the picture with their costly upgrades but now comes Sketchup- WOW!!!! (I know, I’m too wordy)
    Ken (auldsol)