Top-bottom stereo

New Message Reply Date view Thread view Subject view Author view

From: G. Anthony Reina (reina++at++nsi.edu)
Date: 03/05/2001 18:53:11


Thanks to several suggestions from the list, I've managed to get
2-channel (top-bottom) stereo pretty much working on my Octane using
STR_RECT as the setmon. There seems to be only one thing that's off: the
left and right views are slightly offset in the vertical dimension. When
I move the 3D object in and out, the two views move off at a diagonal
rather than parallel to the horiztonal plane (as they should).

Can anyone think of what I'm doing wrong here?

Thanks.
-Tony

Procedure:
(1) I'm using /usr/gfx/setmon -n STR_RECT to set the screen resolution
to 1280x1024_60s for top-bottom stereo
(2) I'm creating an X window in performer that is 1280 x 1024:
pfPWinOriginSize(win, 0, 0, 1280, 1024);
(3) I'm setting the left and right channels to different viewports of
that window:
                 pfChanViewport(left_chan, 0.0, 1.0, 0.5, 1.0);
                 pfChanViewport(right_chan, 0.0, 1.0, 0.0, 0.5);
(4) I'm setting the aspect ratio and aspect views:

    Iod = 50; /* (in mm) */
    Converge = 300 ; /* (in mm) */
    pfChanFOV(left_chan, 45.0f, 36.0f);
    eyeAngle = PF_RAD2DEG(atanf(Iod*.5f/Converge));

   /* Left eye */
    pfSetVec3(hprOffsets, -eyeAngle, 0.0f, 0.0f);
    pfSetVec3(xyzOffsets, -Iod/2.f, 0.0f, 0.0f);
    pfChanViewOffsets(left_chan, xyzOffsets, hprOffsets);

    /* Right eye */
    pfSetVec3(hprOffsets, eyeAngle, 0.0f, 0.0f);
    pfSetVec3(xyzOffsets, Iod/2.f, 0.0f, 0.0f);
    pfChanViewOffsets(right_chan, xyzOffsets, hprOffsets);

    pfChanTravMode(left_chan, PFTRAV_CULL, PFCULL_VIEW|PFCULL_GSET);

    pfSetVec3(view.xyz, 0.f, -Converge, 0.f);
    pfSetVec3(view.hpr, 0.0f, 0.0f, 0.0f);
    pfChanView(left_chan, view.xyz, view.hpr);


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 05 2001 - 18:50:12 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.