Page 1 of 1

after get nVIDIA 3D Vision Kit,how to write a 3d vision game

Posted: Sat Jul 17, 2010 11:15 pm
by akira32
Does sombody know how to write a 3D vision game?
If I buy the 3D Vision Kit ,120Hz LCD and Geforce 8800 graphics card, and then how do I write a 3d vision game(3D Vision Kit)?
In DirectX, how do I modify the projection matrix or view matrix or else?

Another qiestion! How do I write a 3D Vision Discover Game ((red/cyan) glasses )? Should I render the scene 3 times with differential offsets and bias colors(red/original/green)? How do I caluclate the offsets and bias colors?

Re: after get nVIDIA 3D Vision Kit,how to write a 3d vision

Posted: Sun Jul 18, 2010 6:36 am
by phil
Hi akira32,

I think this thread should tell you everything you need to know for the 3DVision side.

In DirectX, you can create the appropriate projections using D3DXMatrixPerspectiveOffCenterLH. The equations I use for camera spacing and projection offset are jotted down in this post.

Have fun!
phil

Re: after get nVIDIA 3D Vision Kit,how to write a 3d vision

Posted: Sun Jul 18, 2010 6:46 am
by phil
The easiest way to render anaglyph in DirectX is to use the D3DRS_COLORWRITEENABLE renderstate, which controls which colour channels of the backbuffer you'll write to (the remaining channels are left unchanged).

So for red-cyan anaglyph, you might do something like this:

Code: Select all

// only write to the backbuffer's red channel
DEVICE->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED);

// (draw left view here)

// only write to the backbuffer's green and blue channels
DEVICE->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_GREEN|D3DCOLORWRITEENABLE_BLUE);

// (draw right view here)

Re: after get nVIDIA 3D Vision Kit,how to write a 3d vision

Posted: Mon Jul 19, 2010 12:13 am
by rahuxx
I want to use Unity 3D for game development, can you implement your code in Unity 3D?
Demo version of unity3D is available on there site.
thanks
rahu

Re: after get nVIDIA 3D Vision Kit,how to write a 3d vision

Posted: Mon Jul 19, 2010 1:34 am
by phil
Hmm sorry, I don't know, I've never tried Unity. I wouldn't imagine it gives you much control over the rendering, but I could be wrong.

I think yuriythebest used Unity for Neil's 3D Adventure, so he might know.