Re: transparent textures

New Message Reply Date view Thread view Subject view Author view

Simon Mills (simon++at++hal.wgs.estec.esa.nl)
Thu, 17 Jul 1997 09:43:03 +0200


On Wed, 16 Jul 1997 17:26:52 -0700 "Anita Kishore" <kishore++at++triavest.com> wrote:

> I am trying to map an image of a neon sign (created in Photoshop)
> with alpha onto a geometry. The image has the sign in the middle with neon
> like light emanating from it which slowly merges with the blackness around
> the sign. This image with its geometry is in an Inventor file which gets
> loaded into my application through pfiv (BTW : the version of pfiv that I have
> didn't have transparency enabled, so I added the lines :
>
> if ( numComponents == 4 )
> {
> cbd->dummyGState->setMode(PFSTATE_TRANSPARENCY, PFTR_ON);
> }
>
> in the routine 'getTexture').
>
> Anyway, the problem is that when this texture gets loaded, the neon light
> around the sign appears completely banded with each band having a single
> level of colour. The change in colour from the neon light colour to black
> (completely transparent) is not smooth at all. What else should I set to make
> it smooth?

I have also encountered problems like this because by default the RE2 uses
multisample transparency since it's faster than alpha transparency. For me
the fix was to explicitly set a pfGeoState that uses alpha transparency with

pfGStateMode(geoState, PFSTATE_TRANSPARENCY,
        PFTR_BLEND_ALPHA | PFTR_NO_OCCLUDE);
         
This allows smooth transitions in transparency and avoids the transparency
quantisation effects in multisample transparency. Hope it helps.

Regards, Simon

----------------------------------------------------------------------------
Simon Mills
System Simulation Section (WAS)
Automation & Informatics Department
European Space Research And Technology Centre (ESTEC)
Postbus 299 e-mail: simon++at++wgs.estec.esa.nl
2200AG Noordwijk phone: +31-(0)71-565-3725
The Netherlands fax: +31-(0)71-565-5419
----------------------------------------------------------------------------
=======================================================================
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:55:37 PDT

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