Re: Howto Fade Models

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Fri, 23 Apr 1999 15:05:30 -0700


Scott Herod wrote:
>
> I've been wondering about using glBlendFunc with one of
> the CONSTANT_ALPHA_EXT flags to simplify this process.
> It would probably be best to create a separate drawing
> bin for anything you want to blend away like this in order
> to sort correctly. Another thing that I've considered
> trying is to use a projected texture that contained alpha.
> I'm not sure whether it would be possible to sort
> it to only effect the object that you want.
>
> I have discovered that you need to be careful with PFTR_ON
> on IR. Apparently it defaults to screen door transparency
> which has only a few (9?) levels. Fading with it causes
> noticable jumps in transparency level.

This will be worse with fewer multisamples. You obviously have 8
samples.

CHeers,Angus.

>
> Scott Herod
>
> Simon Mills wrote:
> >
> > I also needed to fade in/out parts of my scene loaded from *any*
> > database file. My method was to:
> >
> > - Set up node pre/post draw callbacks to set override of transparency
> > on/off.
> > - Use a traverser to set the alpha component of each geoset colour array
> > under a given node. Blend in any alpha contained in transparent
> > materials so these fade correctly.
> >
> > This is slightly different to what Brian wrote below with setting the
> > pfGeoState transparency on. I tried this also but it makes a permanent
> > change to the geometry (unless you go to the bother of remembering the
> > setting for each pfGeoState you use). For me it messed up the order of
> > rendering so I got artifacts. Also my database shared pfGeoStates with
> > parts that should not fade.
> >
> > However my method is not perfect since the ordering by transparency done
> > by the cull stage doesn't seem to take the above into acccount. So I get
> > rendering anomalies during fade. Does anyone know a way to fix this?
> >
> > P.S. I was working on Octane MXE. On Onyx2 iR you can use multisample
> > transparency to get around this.
> >
> > Hope it helps, Simon.
> >
> > Brian Furtaw wrote:
> > >
> > > You'll need to enable transparency (blending) for the fading models
> > > pfGeoState's. To do this call pfGeoState::setMode(PFSTATE_TRANSPARENCY,
> > > PFTR_ON). Also look at the pfTransparency() call to determine what quality of
> > > transparency you are interested in.
> > >
> > > Brian
> > >
> > > On Apr 19, 12:29pm, Gary Quinn wrote:
> > > > Subject: Howto Fade Models
> > > > Hi all.
> > > >
> > > > I'd like to be able to fade models in and out of
> > > > view, something along the lines of in/decreasing their
> > > > transparency or alpha values.
> > > >
> > > > There doesn't seem to be anything documented, and
> > > > I've tried changing geometry set alpha values -
> > > > but that doesn't seem to do anything.
> > > >
> > > > A similar question was posted in Feb 1997,
> > > > but there wasn't enough detail in the answer
> > > > for me to implement the solution - which I didn't
> > > > fully understand anyway :-(
> > > >
> > > > Can anybody help please.
> > > >
> > > > Cheers,
> > > > Gary.
> > > >
> > > >
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
"Microsoft's system was like a forest that hadn't had a controlled
 burn in decades, just waiting for one person with a match to turn
 it into a disaster. Melissa was Microsoft's fault. They left their
 system wide open to this sort of abuse, they knew it could happen
 and did nothing." -- Bruce Perens

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Apr 23 1999 - 15:05:35 PDT

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