View Full Version : Immersive display on wall

02-22-2010, 09:31 PM

I'm trying to make an immersive display on a wall and I'm using a tracker for head movement

I've been trying to adapt an algorithm that I've found
Calculating Stereo Pairs - Off axis Frustums - OpenGL

But I still have problem ... and I don't have a lot of time remaining

For the moment, In short, I have ...
the coordinates of the headtracker (helmetpos)
the 4 screen corners (pul, pur, pdl, pdr)

screen width : 2.4 m
screen height : 1.2 m
the wall is about 1.5 m from the tracking center

znear = helmetpos[Z]-pdl[Z];
zfar = 1000; or some value bigger then znear (constant for the moment)

left = pul[X]-helmetpos[X];
right = pur[X]-helmetpos[X];
bottom = pdl[Y]-helmetpos[Y];
top = pul[Y]-helmetpos[Y];
glFrustum( left, right, bottom, top, znear, zFar );
screenCenter = (pur+pdl)/2
screenCenter[X],screenCenter[Y],screenCenter[Z], 0, 1, 0

But I still have problems to get a realistic view
and there is so many things ... I'm confused

The main problem I see is that:
Going from the left to the right limit of the screen (from a distance) make the scene go totally out of view even if it is supposed to stay in front
I know that I have to watch the screen from an Off axis Frustums but the consequences are far more than expected

Thank you for your help

02-24-2010, 08:30 AM

Is it possible that my problem is related to the fact that my gluLookAt is pointing to the screen center and not perpendicular to the wall

I cannot test for the moment since I'm not in the lab ... but it just came to my mind

Thanks for your help

02-24-2010, 08:44 AM
glFrustum / gluLookAt is not ebough when you need off-axis projection.
Read this to convince yourself :

You have to do it directly on the projection matrix.

03-16-2010, 03:16 PM
Thank you for your advice

But in fact, my idea was right and it now work really well
So the gluLookAt have to stay perpendicular to the wall

I may have introduced you in mistake by the lack of details

But thanks again