Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Immersive display on wall

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    3

    Immersive display on wall

    Hello

    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
    http://klee.usr.dico.unimi.it/~dan/P...eo%20Pairs.pdf

    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
    ...
    gluLookAt(
    helmetpos[X],helmetpos[Y],helmetpos[Z],
    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

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    3

    Re: Immersive display on wall

    Hello

    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

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Immersive display on wall

    glFrustum / gluLookAt is not ebough when you need off-axis projection.
    Read this to convince yourself :
    http://local.wasp.uwa.edu.au/~pbourk...llaneous/caev/

    You have to do it directly on the projection matrix.

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    3

    Re: Immersive display on wall

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •