Showing posts with label 3D. Show all posts
Showing posts with label 3D. Show all posts

Wednesday, 21 April 2010

Games for 3D glasses with XNA

Following on from my post about creating images for 3D glasses, here is how I modified my XNA game engine to render stereo images.

Previously my camera class simply set up the view and projection matrices based on various input. These matrices are then used by the other components in the game to draw themselves. I have now added an extra property to the class, AnaglyphType, to determine whether the scene is rendered as a left/right stereo pair. Also extra code is added to the game loop to draw the scene into two textures, then combine them with a pixel shader.

Sunday, 11 April 2010

Creating images for 3D glasses

I got a copy of Coraline for my birthday, and it came with a few pairs of those red/green 3D glasses.  I thought I'd have a go and making some of my own 3D photos.  The idea is pretty simple, you take two photos of the subject, one from the position of your left eye, and one for your right eye.  You then tint the left image green, the right one red, and merge them together (this can all be easily done in Photoshop or equivalent).

I think this one came out pretty well, the rotors on the top of this model helicopter really look like they're coming out towards you!