Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - OasisGames

Pages: 1
Applications / VR Desktop For Compiz
« on: March 12, 2008, 05:25:26 PM »
This is still in its experimental stages, but:
The Wiitrack plugin for Compiz, combined with the Wiimote plugin, gives your desktop a truly 3d feel by implementing the same tracking functions used by Johnny Chung Lee, but in Compiz's OpenGL environment.

Note: The video is old and the person recording it did not spend any time calibrating. Nor did they listen to my suggestions >_>

Rather than bore you with the details, I'll just link you to the Wiki page.

Oops, completely forgot that was a custom function of Compiz.
It looks like this:
Code: [Select]
matrixTranslate (CompTransform *transform,
float        x,
float        y,
float        z)
    float *m = transform->m;

    m[12] = m[0] * x + m[4] * y + m[8]  * z + m[12];
    m[13] = m[1] * x + m[5] * y + m[9]  * z + m[13];
    m[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
    m[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
CompTransform is simply a class with a matrix in it for the transformation, so use that instead...

Linux / Re: linux support planned?
« on: February 17, 2008, 03:30:45 PM »
There is CWiiD - the Linux Wiimote library. And beyond that, interfacing with a Wiimote isn't all that difficult if you know the right data to send and look for. On the side of implementing these projects, there are quite a few people working on them. IE, the DesktopVR adaptation (A Compiz-Fusion plugin, so it makes a real virtual 3d desktop). We've made a lot of progress with that one, as well as implementing other various Wiimote control (especially mouse movement)

Wiimote Desktop VR/Head Tracking / Re: IR Glasses
« on: February 03, 2008, 02:26:23 PM »
I'm considering going with this setup, and while searching around on the internet for the appropriate LEDs (which I'll probably end up buying from RadioShack) and this AOSafety goggles, I came across this little bit of information on Amazon:

(Note: Some slight editing, there was a 9v battery clip before the wiimote in the second part)

So, yeah, these goggles, some space fillers, 1.5v cell batteries and the IR LEDs should do it?

That is pretty sweet. I can't wait to get a very usable implementation of that.

2 things, though. First of all, should those windows in the video be in the reversed order? You would think that when you move your head side to side that the window in the front would move most. Maybe its just the way that the video looks, but something seems fishy to me.

Second, when using the head tracker, how does the mouse function? If the slightest motion of the head moves your windows around, how is it possible to reliably click on your 3D windows with your 2D cursor? Also how is the z order determined? Is it just the least recently to most recently activated window? If so, wouldn't the windows do some serious jumping as you switch the focus of the windows? I suppose this could be countered with some smooth animation of sorts, but in my opinion, a 3D computing environment should just have all windows in the layering order you put them in and changing the focus leaves then where they are. That way the windows are where you want them. I suppose that will largely be a personal preference thing, but I suspect more people would agree.

Like I said, I'm really excited to see where this goes and how soon I will be able to implement it.
The front most window is on the screen, so it would not move at all relative to the screen itself. This is actually what allows interaction to be possible, as the top most window doesn't move. Z order is determined by Z order, period, there is no determination. I've tried animation, but failed miserably and decided to leave it for after I get a Wiimote myself and have a use for it. You can move the windows manually, but due to technical limitations (for which fixes have been in the works for many many months), you are not able to correctly click on windows that aren't flat on the screen (there is absolutely no way to transform the clicking into 3d space at this time, we're working on it, the X server guys are working on it, the functionality will come)
To tell you the truth, this video is extremely buggy and doesn't even use Lee's trig calculations. I just recently added them myself, so as soon as SmSpillaz gets the updates we should be able to get a new video out. I just hope my Y values are correct (I may have inverted them  :o )

You've actually brought up a great point and I'm going to try to get the Z order changing animation working this weekend, now that I have plenty of time to do it.

The following should give the desired result, assuming your scene's transformation matrix is zTransform, x y and z are your head coordinates, and you set up your screenAspect properly.
Code: [Select]
float nearPlane = 0.05; // Our near rendering plane
float screenAspect = 1.0; // Leave this for future fixes
glMatrixMode(GL_PROJECTION); // We're going to modify the projection matrix
glLoadIdentity(); // Clear it first
// Set our frustum view matrix.
glFrustum( nearPlane*(-0.5 * screenAspect + x)/z,
nearPlane*(0.5 * screenAspect + x)/z,
nearPlane*(-0.5 + y)/z,
nearPlane*(0.5 + y)/z,
nearPlane, 100.0);

glMatrixMode(GL_MODELVIEW); // Switch back to model matrix
// Move our scene so that it appears to actually be the screen
matrixTranslate (&zTransform, x, y, 1 - z);

This code works flawlessly for me, so hopefully it will work for you as well.

Project Ideas / Re: Wiitrack - Wiimote Headtracking Desktop Environment
« on: January 21, 2008, 03:17:32 PM »
... wiimote attatched to head... doesn't that look a lil weird?
Not really. If you have it attached to a helmet or hat of some sort it looks just like a hard hat with a camera on top.

Is there any chance that the app will come to Windows? Could you also make a video of the program running on a computer and put it on Youtube so we can see how it looks like?
Sorry, man, not a chance. We have a video (see the replies to the post in the DesktopVR board), but it's not very good (it's not my video, I don't even have a Wiimote yet)

(from my other post) You know if you use the same concept at Johnny demonstrates with using your finger and reflective tape; by increasing sensitivity and using a recognition program, you could possibly substitute the ir led with a universal human feature. Like 2 ears.. or eyes.. or possibly shoulders. This would allow anyone that enters the room to automaticaly experiance a 3d desktop enviroment.
Such facial recognition type head tracking is already in use for other things. Personally, I think the positions of the eyes would be easiest, and they would also be the best feature to track and would produce the best results.

Project Ideas / Wiitrack - Wiimote Headtracking Desktop Environment
« on: January 14, 2008, 03:39:46 PM »
Wiitrack is a plugin currently in development for Compiz-Fusion
Combined with another plugin (see here) which takes input from a Wiimote, Wiitrack distorts the viewport and stacks windows three dimensionally to create a virtual environment out of a Linux desktop. The data collection plugin currently utilizes 2-point tracking but will later be upgraded to 6 DOF to allow for more natural use.
The plugin is being tested with two setups, as shown in the Wiki article, one with IR LEDs on the viewer's head, the other with the Wiimote attached to the viewers head. Each setup has its own advantages.
The plugin is currently compatible with most other plugins, but has some bugs.

This a practical use of the Wiimote because headtracking allows you to look behind windows in the foreground to see what's behind them.

Videos will be up as soon as we can get them.

We now have our actual tracking up, but it's 2-point tracking "pan-and-zoom" tracking (the same stuff Johnny uses)
We'll be upgrading it to 6 DOF later. The plugin itself only requires the location of your head, which is provided by a second plugin that calculates and does a few other Wiimote things.

You'll be happy to know that such functionality is being worked on.

This Compiz plugin does not yet track a Wiimote, but a separate plugin is being worked on to retrieve data from the Wiimote through CWiiD. The two should intertwine and "Wiitrack" as I've dubbed it will get data from the other plugin to calculate the head position. Other than that, we have a basic framework up and running and you can move a virtual head with key commands. It also stacks windows three dimensionally.

Pages: 1