Steve Baker (sbaker++at++link.com)
Fri, 26 Sep 1997 14:32:20 -0500 (CDT)
> Steve Baker wrote:
> >
> >
> > Hi.
> >
> > I'm using pfTexGen with SPHEREMAP mode to generate cute shiney reflections.
> >
> > As a test, I modelled a white sphere, and picked a suitably distorted
> > environment map with sky in the top half of the circle and ground in the
> > bottom half.
> >
> > I model the sphere under a pfDCS node - and everything looks great - I
> > spin the DCS and the ground stays reflected in the bottom half of the
> > sphere and the sky in the top half.
> >
> > However, if I roll the eyepoint inverted (using pfChanView for example)
> > the reflection rolls with me. So, the sky is now reflected in the wrong part
> > of the sphere. The pfESky shows blue on the bottom half of the screen - but
> > that bottom half of the sphere is still green.
> >
> > Is this an inherent problem with pfTexGen or am I doing something wrong ?
> >
> > Could it be something to do with when the pfTexGen is pfApply'ed ? Right
> > now, I attach the pfTexGen to the pfGeoState - so I don't have control of
> > when this happens.
> >
>
> SPHEREMAP works in eye space. It consider the eye space the coordinate
> system that defines the up/down/left/right directions.
> I guess that you will have to 'undo' the eye rotations using the texture matrix.
>
> [pfApplyTMat in 2.2]
> [mmode(MTEXTURE); loadmatrix(m); mmode(MVIEWING); before 2.2]
Ah - I thought it might be something nasty like that. This is ugly since Performer
is doing the pfApply of the TexGen. I guess I'll need a pfGeoState callback or
something.
Thanks.
===================================List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:00 PDT