Using wiimote IR camera data naively

170 views
Skip to first unread message

miket

unread,
Dec 11, 2008, 5:30:59 PM12/11/08
to Google SketchUp Help - Ruby API & SketchUp SDK
Situation: I would like to write a plugin to do head tracking in
sketchup with the use of the miimote similar to the demonstration by
Johny Lee http://www.cs.cmu.edu/~johnny/projects/wii/

Question 1: Is it possible for ruby to get data from the wiimote
without tricking it into thinking the input is from the mouse? What I
would like to do is to have the head tracking control the view while
not interrupting the use of the mouse to design and draw in the
viewport

Question 2: To be accurate head-tracking, I need to be able to
relocate the center of vision away from the center of the screen.
(i.e. imagine a one-point perspective that vanishes to a point not in
the middle of the screen, like the corners.) This isn't a deal breaker
if it isn't possible but it would definitely improve the effect.

Thanks.

-Mike

Patrick

unread,
Dec 12, 2008, 12:56:19 PM12/12/08
to Google SketchUp Help - Ruby API & SketchUp SDK
I've played around with using GlovePIE (which adapts a lot of
interesting controllers including wiimotes; http://carl.kenner.googlepages.com/glovepie_download)
and SketchUp together. I set it up to work more as a mouse with tool
controls on the nunchuk, making it kind of like playing Trauma Center.

Pretending the input is from the mouse is by far the easiest
technique.

Other ways to send data to your ruby script:
* Have your ruby script watch output.txt in the GlovePIE directory,
then in the glovepie script, use the outputotfile command to output
data. This isn't quite as elegant as option 2:
* Use GlovePIE's OSC functionality to send messages to your ruby
script. OSC is a simple network interface, so you can SendOsc
("localhost", my_port, "/anything/here", target.x, target.y, roll).
You'd set your Ruby script up to listen to the OSC commands.. you can
do this with rosc (http://hans.fugal.net/src/rosc/) or a home-brew
ruby server.

GlovePIE also has functionality to scroll the desktop, which is
intended for head-mounted displays. It might be an interesting trick
to handle Question 2.
I think it will be hard to change the center of vision with the way
SketchUp manages its camera (target, eye, up instead of an arbitrary
projection matrix).

There may be other ways to get the wiimote data without using GlovePIE
(which is windows-only).

Patrick

On Dec 11, 3:30 pm, miket <jmtalb...@gmail.com> wrote:
> Situation: I would like to write a plugin to do head tracking in
> sketchup with the use of the miimote similar to the demonstration by
> Johny Leehttp://www.cs.cmu.edu/~johnny/projects/wii/

Jim

unread,
Dec 14, 2008, 10:19:11 AM12/14/08
to Google SketchUp Help - Ruby API & SketchUp SDK
Hi Mike,

Here's a couple links that might be helpful - I don't really know.
They are showing a wiimote controling objects (via Ruby) in SketchUp
in the SketchyPhysics plugin.

http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=11205

http://www.sketchucation.com/forums/scf/viewtopic.php?f=15&t=11204

miket

unread,
Dec 29, 2008, 1:04:43 PM12/29/08
to Google SketchUp Developers - Ruby API
thank you very much. I think all of those options are worth exploring.
The desktop scrolling would be an interesting work-around to move the
centered target, although it would require a desktop running at 9times
(3x3) the resolution that the monitor is showing. I will play around
with this. If I get anything interesting, I'll post it.

-Mike
> > -Mike- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages