Fish eye correction with multi-channel

New Message Reply Date view Thread view Subject view Author view

Jean BENOIT (101372.3460++at++CompuServe.COM)
06 Nov 96 05:35:32 EST


I have to use a visual with a FOV of (80 by 60).
To reduce the fish eye effect,I try to divide my screen by four channels.
Each of them has a FOV of (40 by 30), the fish eye effect is reduce,
but I have not a good continuity between the four channels.

To do that, I modify the perfly sources :

gui.c : in the case GUI_FOV :
------------------------------
           
            /* all channels share this new FOV */
            pfChanFOV(ViewState->masterChan, 40., 30.);
             
            /* all channels have a positional offset of zero */
            pfSetVec3(xyz, 0.0f, 0.0f, 0.0f);
             
            /* set each channel's rotational offset */
            /*
            for (c = 0; c < NumChans; c++)
            {
                pfSetVec3(hpr, (((NumChans - 1)*0.5f) - c)*fov, 0.0f, 0.0f);
                pfChanViewOffsets(Chan[ChanOrder[c]], xyz, hpr);
            }
           */

generic.c : On InitChannel()
----------------------------
        I replace

            for (i=0; i< NumChans; i++)
                {
            pfSetVec3(hpr, (((NumChans - 1)*0.5f) - i)*fov, 0.0f, 0.0f);
            pfChanViewOffsets(Chan[ChanOrder[i]], xyz, hpr);
                }
         

        by

        if ( NumChans!=4)
            for (i=0; i< NumChans; i++)
               {
            pfSetVec3(hpr, (((NumChans - 1)*0.5f) - i)*fov, 0.0f, 0.0f);
            pfChanViewOffsets(Chan[ChanOrder[i]], xyz, hpr);
               }
        else
            for (i=0; i< 2; i++)
                for (j=0; j< 2; j++)
                {
            pfSetVec3(hpr, -((-(NumChans/2 - 1)*0.5f) + j)*40.,
                            ((-(NumChans/2 - 1)*0.5f) + i)*30.,
                            0.0f);
            pfChanViewOffsets(Chan[ChanOrder[2*i+j]], xyz, hpr);
                }
    }

I run the application with perfly -g 0 -c 4 <bdd file>

What do you think about this solution and the result : Is it a bug ?
or is it a problem of approximation in the processing of the perspective ?

Yoel HALLAKOUN V.S.M

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:53 PDT

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