Yeppers. Looks like you are on to something here.  Sorry I could not have
been more help.

Dave

> ----------
> From:         J. Lee Dixon[SMTP:[EMAIL PROTECTED]]
> Reply To:     Discussion list for Java 3D API
> Sent:         Tuesday, September 19, 2000 12:59 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [JAVA3D] Fade-out of transparency textured polygons
> Importance:   High
>
> I can't switch to an opaque texture.  For example, a texture of a tree
> *MUST* have an alpha component.  I've faded-out polygons over time
> before... no big deal.  Just adjust the TransparencyAttributes of the
> Appearance.
>
> By the way, I am *modulating* the texture with the object.  This allows
> for *LIT* textures.
>
> In the OpenGL Redbook, there is a table showing how the color(C) and
> alpha(A) of the final pixel is computed based on the texture color (Ct),
> texture alpha(At), poly color(Cp), and poly alpha (Ap), for each of the
> image formats and texture functions.
>
> For GL_RGBA (which is what I'm using for my transparent textures):
>
> Function=Replace         Function=Modulate
> C = Ct                   C = Cp * Ct
> A = At                   A = Ap * At
>
> Function=Decal
> C = Cp(1-At) + Ct * At
> A = Ap
>
> Accoding to this, for *modulate*, the alpha (transparency) of my polygon
> should be MULTIPLIED by the alpha of the texture.  Thus, a totally
> transparent polygon should be just transparent, including the texture.
> The places where the texture alpha is 0, the polygon SHOULD NOT BE
> VISIBLE.  Yet, this is not the case.  Perhaps this is a bug??  I think
> it is time for a test app to show others (Sun)...
>
> -Lee
>
> J. Lee Dixon
> Software Engineer
> SAIC - Celebration, FL
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Yazel, David J. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 19, 2000 11:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Fade-out of transparency textured polygons
>
>
> Ah!  hehe, I thought you meant over distance.  I have not "faded out" a
> polygon over time.  This is what I would try: do not make the polygon
> transparent, instead modulate a completely opaque texture on your
> polygon.
> Since we are modulating, changes to the colors of the polygon should
> mixed
> with the texture....I'm guessing you could change the materials and
> adjust
> their alpha componant?  Or adjust the vertex colors (with the geometry
> update callback) to smoothly update thier vertex alphas?  Or possibly
> use a
> referenced texture (and on a transparent polygon) and update the alphas
> across your texture (using a graphics handle you can draw() on).
>
> Can't think of anything else to try.  The easiest thing would be to just
> adjust the polygon transparency attributes, but like you said, that
> doesn't
> work when you have a alpha blended texure.... this is probably because
> adjusting the transparency attributes of a polygon is probably just
> adjusting the vertex alphas, and since you are blending and not
> modulating
> you don't get the effect.
>
>
> Dave
>
>
>
> > ----------
> > From:         J. Lee Dixon[SMTP:[EMAIL PROTECTED]]
> > Reply To:     Discussion list for Java 3D API
> > Sent:         Tuesday, September 19, 2000 10:58 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: [JAVA3D] Fade-out of transparency textured polygons
> >
> > I mentioned that my polygon was already fully transparent to support
> the
> > alpha channel texture.  The alpha component of the polygon does not
> seem
> > to affect the transparency of the texture when the texture has an
> alpha
> > channel.
> >
> > I guess I could also be more specific.  When I say "fade-out", I mean
> > fade over *time*, not over distance.
> >
> > -Lee
> >
> > -----Original Message-----
> > From: Yazel, David J. [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, September 19, 2000 10:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] Fade-out of transparency textured polygons
> >
> >
> > Hmmm,
> >
> > Two ways:
> >
> > 1) Interesting way but probably not what you want is to set the color
> of
> > the
> > vertex to include an alpha component and fade across your vertices,
> > using
> > modulate with the texture.  I know this works in opengl, I assume it
> > does in
> > Java3d.
> >
> > 2) The next way is to use a transparent polygon, and blend a texture
> in
> > which has an ever increasing (decreasing?) alpha, this is the
> technique
> > I
> > use to make a terrain transition, I overlay two meshes and fade one
> out.
> >
> > Dave
> >
> > > ----------
> > > From:         J. Lee Dixon[SMTP:[EMAIL PROTECTED]]
> > > Reply To:     Discussion list for Java 3D API
> > > Sent:         Tuesday, September 19, 2000 8:42 AM
> > > To:   [EMAIL PROTECTED]
> > > Subject:      [JAVA3D] Fade-out of transparency textured polygons
> > >
> > > A while back I fought with the settings to make transparency
> textures
> > > work.  I could easily place the texture on the polygon, but the
> places
> > > where the alpha value of the texture was 0, it showed the color of
> the
> > > polygon.  It didn't make sense to me that I could see the underlying
> > > polygon at all.
> > >
> > > I fixed the problem by setting the TransparencyAttributes to be
> > totally
> > > transparent.  Fine.
> > >
> > > Now, how do I make the whole object fade out??  Normally, I would
> fade
> > > using the TransparencyAttributes, but it is already set to totally
> > > transparent.
> > >
> > > I thought applying a texture with alpha set to 0 would make the
> > polygon
> > > invisible; I shouldn't have to set the poly transparency as well...
> > >
> > > -Lee
> > >
> > > J. Lee Dixon
> > > Software Engineer
> > > SAIC - Celebration, FL
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> ========================================================================
> > ==
> > > =
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in
> the
> > > body
> > > of the message "signoff JAVA3D-INTEREST".  For general help, send
> > email to
> > > [EMAIL PROTECTED] and include in the body of the message "help".
> > >
> >
> >
> ========================================================================
> > ===
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff JAVA3D-INTEREST".  For general help, send
> email
> > to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
> >
> ========================================================================
> ==
> > =
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff JAVA3D-INTEREST".  For general help, send
> email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >
>
> ========================================================================
> ===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email
> to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to