Re: [info-performer] a question about transparency

New Message Reply Date view Thread view Subject view Author view

From: MLM Veraart (veraart++at++fel.tno.nl)
Date: 09/27/2002 05:21:37


You must put your

glDisable(GL_DEPTH_TEST); and glEnable(GL_DEPTH_TEST); in a
node pre-draw and post-draw callback respectively.
Look at the pfNode page for more info.

Mario

陳家生(Archer Chen) wrote:
>
> Thanks for your answer for me.
> I disable the Z-test by glDisable(GL_DEPTH_TEST) at DRAW process,
> I can get the correct response about the "Smoke effect".
> But that will make the other scene lose the Z-test.
> Can I disable Z-test for the "Smoke Geo" only?
> Or I made the other wrong to it??
>
> Regards,
> Archer Chen
>
> ----- Original Message -----
> From: "MLM Veraart" <veraart++at++fel.tno.nl>
> To: "陳家生 (Archer Chen)" <archerc++at++hitrontech.com>
> Cc: "Performer List" <info-performer++at++sgi.com>
> Sent: Thursday, September 26, 2002 6:36 PM
> Subject: Re: [info-performer] a question about transparency
>
> > You have a Z-buffer problem. Your polygons are co-planar and some of them
> get
> > lost in the Z-test.
> > If you draw your special effect in the transparent buffer you just disable
> the Z-test
> > with a draw callback.
> > Otherwise use the pfLayer technique (stencil planes) to cope with the
> coplanar geometry.
> > Use a base layer that does no update to the color-buffer and is as large
> to contain all the
> > animated geometry.
> >
> > Mario Veraart
> >
> > P.S. Please adjust your email tool so you send only plain text to the
> mailing list.
> > A reply was not possible without copying from the original message.
> >
> > ----------------------------------------------
> > Archer Chen Wrote:
> >
> > Hi all,
> >
> > I find that I can't read the attach file, so I post it again , sorry.
> >
> > I had a problem about transparency , and have no idea to solve it .
> > Please someone can give me some suggestion.
> >
> > My problem is that I can't show the Second transparent texture where after
> the other transparent texture.
> > Because , the first transparent texture will make the Second texture to
> transparent on the overlape region.
> > How can I make the first transparent texture near camera unable to affect
> the Second texture's transparent effects.
> > Please give me a solution to handle it .
> > Thanks.
> >
> >
> > pfGStateMode(shared->rain.gstate, PFSTATE_TRANSPARENCY,
> PFTR_BLEND_ALPHA);
> > pfGStateMode(shared->rain.gstate, PFSTATE_ALPHAFUNC, PFAF_ALWAYS);
> > pfGStateMode(shared->rain.gstate, PFSTATE_ENFOG, 0);
> > pfGStateMode(shared->rain.gstate, PFSTATE_ENLIGHTING, PF_OFF);
> > pfGStateMode(shared->rain.gstate, PFSTATE_ENLPOINTSTATE, 1);
> >
> > pfGSetAttr(shared->rain.gset, PFGS_COLOR4, PFGS_PER_VERTEX,
> shared->rain.colors, NULL);
> > pfSetVec4(shared->rain.colors[i], 0.6, 0.6, 0.5, 0.3);
> >
> >
> >
> > Regards
> > archer chen


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Sep 27 2002 - 05:22:04 PDT

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