cancel
Showing results for 
Search instead for 
Did you mean: 

Ocucam - piping dual webcams to an Oculus Rift

Anonymous
Not applicable
Hi, all!
In my boredom from waiting for my Oculus Rift to arrive, I've put together a tiny C# project that takes dual webcam inputs, applies the Oculus distortion shader, and then outputs via Direct3D.

It's a pretty limited app, currently--for instance, it requires the webcams to be oriented vertically (since this fills the Oculus FoV a bit more easily). You can control the inter-eye spacing (via home/end), but it's a bit crude. You can also control the FoV (i.e., how much the camera image is expanded/shrunk) via pgup/pgdn. Hit escape to... escape.

Anyway, if someone is a little bored and wants to give some feedback, here's the link:
http://www.scottcutler.net/zips/Ocucam%20v0.01.zip

What's in it for the future? I don't know. Maybe a toon shader or something wold look cool as applied to reality. I wanted to do some experiments with very widely spaced eyes, to see if it makes the world look small. I'll know better when my unit arrives!

I'm using a pair of Creative Live! Cam Sync HD 720p webcams. They don't do so well in low light, but in daylight they get a pretty reasonable 720p image at 30 fps.

The source code is included with the file (buildable with Visual Studio Express 2012), and the .fx file is editable in case anyone wants to play around. I haven't been able to test more than one config so far, so it's very likely there are bugs related to assuming something about my system. Let me know if you run into anything.

Oh, and since I don't actually have a Rift in hand yet, it's entirely possible that my distortion shader is screwed up or something, and that it looks wonky. I'd like feedback on that, too!
41 REPLIES 41

Anonymous
Not applicable
I realized that this probably better belongs in the "works in progress" section. Perhaps the mods will move it.

PixelsmithLLC
Explorer
This is actually pretty cool. I'm interested in checking this out when my kit arrives.

cybereality
Grand Champion
Nice. I've moved to WIP forum.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

Anonymous
Not applicable
Thanks!

My unit still hasn't arrived, so I haven't had a chance to test my program yet. Most likely I'll need a few tweaks. I'm a little worried about latency--I am using VMR9 for the video input and I don't know if ends up queuing up a bunch of frames. But who knows; maybe it won't be so bad.

sven
Protege
Just curious, which webcams did you use to test?

Is it ok if one camera is tilted 90° clockwise and the other is tilted 90° CCW?

I'm thinking about getting another PS Eye for this.

Anonymous
Not applicable
I'm using a pair of Creative Live! Cam Sync HD 720p cameras. I may pick up a pair of PS Eyes too; part of my end-goal is to mount the cameras on a quadcopter.

And yes, the way they're arranged, you'll have one webcam rotated CW and the other CCW. In my case this means the bases point inwards (so I can mount them to a bracket), but if you want the bases pointing out I think you can just swap the left-right cameras and rotate the assembly. At any rate, making this more easily configurable is on my to-do list.

slugger
Honored Guest
What's in it for the future? I don't know. Maybe a toon shader or something wold look cool as applied to reality. I wanted to do some experiments with very widely spaced eyes, to see if it makes the world look small. I'll know better when my unit arrives!

may i give you an idea what you could do with this nice piece of software:

http://xkcd.com/941/


Anonymous
Not applicable
"slugger" wrote:
What's in it for the future? I don't know. Maybe a toon shader or something wold look cool as applied to reality. I wanted to do some experiments with very widely spaced eyes, to see if it makes the world look small. I'll know better when my unit arrives!

may i give you an idea what you could do with this nice piece of software:

http://xkcd.com/941/


Heh heh... where do you think I got the idea in the first place :)?

slugger
Honored Guest
"SyzygyRhythm" wrote:

Heh heh... where do you think I got the idea in the first place :)?



sorry, my fault. sometimes i forget that im talking to geeks xD