pfFlatten breaks pfTexGen

New Message Reply Date view Thread view Subject view Author view

Marcus Barnes (marcus++at++multigen.com)
Tue, 2 Jul 1996 19:00:27 -0700


Hi Sharon,

I've found that pfTexGen plane coefficients are not transformed by pfFlatten
when the pfTGenMode is OBJECT_LINEAR. This breaks the texture coordinates that
are generated since this mode works in object space. Once the geometry is
transformed into world coordinates by pfFlatten, the texgen function is
invalid.

I think that pfFlatten could handle this in a couple of ways. Fetch the
pfGeoState from the pfGeoSet and the pfTexGen from the pfGeoState. If the
texgen is in object space do one of two things:

o Clone the geostate and the texgen. Fetch the texgen plane coefficents
   into a pfMatrix. Transform the matrix and reapply it as the new texgen
   planes. This will induce some state overhead, degrading performance.

o Fetch the texgen plane coefficients and compute texture coordinates for the
   pfGeoSet (creating them if need be). Disable the texgen. Remember the
   pfGeoState. After everything is flattened, traverse all the affected
   geostates and delete their pfTexGen's.

In either case, pfGeoState inheritance should be reasserted for efficiency.

Until pfFlatten is fixed, the only choice is: don't call pfFlatten when
pfTexGen is in used to project textures in object space.

Regards.

--
   ____ ___  ____  _    Marcus Barnes, Member Technical Staff
  / __ `__ \/ __ `( )   MultiGen Inc. 550 S. Winchester Blvd. STE 500
 / / / / / / /_/ / /    San Jose CA 95128 WEB: http://www.multigen.com
/_/ /_/ /_/\__, /_/     PH:1-408-556-2654 FX:1-408-261-4102
          /____/        EMAIL: marcus++at++multigen.com
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/   <--new!
            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:08 PDT

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