Re: Howto Fade Models

New Message Reply Date view Thread view Subject view Author view

Simon Mills (simon++at++wgs.estec.esa.nl)
Fri, 23 Apr 1999 15:38:43 +0200


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

Thanks for the tip. Putting the geosets into the transparent bin
(pfGeoSet::setDrawBin) when they become transparent did the trick. No
anomalies now.

> 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.

Yes. I explicitly use alpha blending transparency on iR to get a nice
fade effect.

>
> 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.
> > > >
> > > >

Regards, Simon
________________________________________________________________________

Simon C. Mills
Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
________________________________________________________________________


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Apr 23 1999 - 06:42:58 PDT

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