Re: pfTexGen problems

New Message Reply Date view Thread view Subject view Author view

Rémi Arnaud (remi++at++remi.engr.sgi.com)
Fri, 26 Sep 1997 11:26:07 -0700 (PDT)


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]

    _ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
                                           
=======================================================================
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:56:00 PDT

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