Thursday, May 1, 2008

You Can't Frustum and You Can't Frust Withoutum

That title is just a joke. Contra my graphics (and award-winning user interface design) instructor in college, it certainly is possible to discuss 3D projection without resorting to the term "frustum."

I'm a little confused about what kind of camera setup creates the best anaglyph images. All of the custom hardware setups I've read about people using either have identical cameras exactly side-by-side and pointing in the same direction,

Schematic of two parallel cameras,

or a single camera mounted so it can slide right and left perpendicular to the direction of the lens,

Schematic of single camera on sliding mount.

Either of these setups result in two images that reproduce the effect of looking at an object (a duck, say) with your eyes facing exactly the same direction:

Eyes looking at an object in parallel.

(Those are eyeballs at the bottom.)

And that's the kind of configuration I've been using for the anaglyph 3D graphics display: move the virtual camera slightly to the left and render the red channel, then move the virtual camera slightly to the right and render the blue and green channels.

But I think the way human vision actually works is that both eyeballs sort of independently point at whatever you're focusing on. Which is why when a butterfly flies up to you and lands on your nose you end up crossing your eyes. More like this:

Eyes looking at an object obliquely.

I think that's more like how I take 3D photos with my digital camera. I don't have a horizontally-sliding mount or two identical cameras, so I just take one picture pointing at an object, move over, and then take another pointing at the same object. I think the result should be more like looking at an object in real life, assuming the viewer is focusing where you expect them to be.

I'm going to try this out in my graphics setup and see how it works.


DU said...

That UI design award was well-earned.

I have a feeling the rotated eyeball setup is proportional to the regular one. We do turn our eyeballs (and that does give us additional depth information) but the image is still the same.

Like, look at something in the middle distance. Now look at something past it. Your eyeballs moved a little, but the photons arriving at your pupils are still the same ones. It's only your focus (i.e. attention and the image at the center of the retina) that changed. I think.

tps12 said...

But the "image at the center of the retina" is what our vision system processes, right? I don't know, I'll have to see what it looks like.

Also your comment makes me wonder about the 3D graphics equivalent of keeping your head still and swiveling your eyes left and right and up and down in their sockets.

Let's see if I can make myself hurl using only the power of computing...

(Although if that Graphics Lab page didn't then I doubt anything could.)

DU said...

Right, but my point is that the "image plane" (i.e. the entire image on your retina) is the same, though translated, when you move your eyes. Unless the object is very close, you aren't going to see around the corner of it appreciably.

Unless I'm wrong.

You've seen goatse, right?