Re: Perf eoe 2.0.3 vs Perf 2.0

New Message Reply Date view Thread view Subject view Author view

Dewey Anderson (dewey++at++evt.com)
Mon, 17 Mar 1997 12:47:44 -0800


Thanks for the reply, Angus.

My object positioning is pretty trivial. The scene graph looks like this:

   Scene
|
   pfDCS
|
   pfSCS
|
   pfGeoset

As it happens in my example, the pfSCS is identity (and pfFlattened anyway).
The pfDCS has the type set with:

    dcs.setMatType( PFMAT_TRANS | PFMAT_ROT | PFMAT_NONORTHO );

In my example, the DCS matrix is set with:

    pfMatrix mat;
    mat.makeTrans( x+rcx, y+rcy, z+rcz ); // M = Cinv * L
    mat.preRot( ry, 0., 1., 0., mat ); // M = Ry * M
    mat.preRot( rx, 1., 0., 0., mat ); // M = Rx * M
    mat.preRot( rz, 0., 0., 1., mat ); // M = Rz * M
    mat.preScale( size*sx, size*sy, size*sz, mat ); // M = S * M
    mat.preTrans( -rcx, -rcy, -rcz, mat ); // M = C * M

where the rotations are 0, the scales are 1, the rcx/y/z are 0, z is 0 and only
the x value changes. Pretty simple stuff.

The other matrix fiddling I do is with the view matrix where I set the z
distance based on the FOV and the window height so that the z=0 plane maps to
the window with one unit = one pixel:

   chan->setFOV(0.0f, fov); // specify VERTICAL FOV

   pfCoord view;
   view.hpr.set(0.0f, -90.0f, 0.0f);
   float z_distance = win_height/2 / tanf( fov * (3.1415926/180.) / 2. );
   view.xyz.set(0.0f, 0.0f, z_distance );
   chan->setView(view.xyz, view.hpr);

Like I said, this all works fine with Performer 2.0 eoe. Changing to the 2.0.3
eoe messes it up. The only thing I can think of is that there is some problem
in dealing with the window itself. I give Performer the window at
initialization:

   pw = new pfPipeWindow(p);
   pw->setWSWindow(dpy,xwin);
   pw->setGLCxt(cx);
   pw->setWSDrawable( dpy, dwbl );

On Mar 15, 4:06am, Angus Dorbie wrote:
> Subject: Re: Perf eoe 2.0.3 vs Perf 2.0
> Do you have some exotic matrix operations to position the objects.
>
> Perhaps the problem lies with some performer assumptions about the
> contents of your transformations for optimization purposes.
>
> Investigate using pfDCS::setMatType
>
> Cheers,Angus.
>
> On Mar 14, 2:11pm, Dewey Anderson wrote:
> > Subject: Perf eoe 2.0.3 vs Perf 2.0
> >
> > We developed our product with Performer 2.0 and run it on Indy, Impact and
> Onyx
> > using IRIX 5.3 with no problem. But we've noticed a problem when running
it
> on
> > the O2 that we've tracked down to being a difference between Performer eoe
> > versions. It appears that the O2 ships with Performer 2.0.3 and if we
> replace
> > that with 2.0 the problem goes away.
> >
> > Is anybody aware of some important difference between the two? Is there
some
> > patch we need to have? Or are we going to have to recompile with Performer
> > 2.0.3 to run on systems with that eoe?
> >
> > DETAILS OF THE PROBLEM:
> >
> > It LOOKS like a perspective error in the X direction only. We draw 2D
shapes
> > in our window using OpenGL. Then we texture map that drawing onto a
> rectangle
> > in Performer and then draw it with Performer. We size the rectangle and
> > calculate the FOV and viewMatrix in such a way as to keep the Performer
> drawing
> > the same size as its OpenGL counterpart when the rectangle is place at Z=0.
> > (We use a coordinate system where the screen is the XY plane.) The result
> is
> > that you can't tell the difference between the OpenGL drawing and the
> Performer
> > version.
> >
> > I have a lot of faith in these calculations because we've been using them
for
> > so long on the Indy, Impact & Onyx.
> >
> > When run on the O2, the textured rectangle appears too wide, scaled out
from
> > the center of the screen. A small rectangle to the left appears too far
> left.
> > A small rectangle to the right appears too far right. A rectangle
> straddling
> > the middle of the screen appears too wide. It's almost as if the
perspective
> > calculation is making the rectangle appear TOO CLOSE in Performer. But
this
> > only happens in the X direction. If it were really a distance error, I'd
> > expect the rectangle to be displaced vertically as well.
> >
> > The O2 details are:
> >
> > IRIX 6.3 for O2 including R10000, version 12161207.
> >
> > CRM graphics revision C.
> >
> >
> >
> > Dewey Anderson
> > dewey++at++evt.com
> > Evolving Video Technologies
> >
> >
> >
> >
> >
> > =======================================================================
> > List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> >-- End of excerpt from Dewey Anderson
>
>-- End of excerpt from Angus Dorbie

=======================================================================
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:54:54 PDT

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