Sorry, ment to post this response to the list as well....

-----Original Message-----
From: J. Lee Dixon
Sent: Friday, November 17, 2000 1:59 PM
To: 'Tom Nelson'
Subject: RE: [JAVA3D] java3d1.2.1beta1 - transparent gif as texture
fails


Well, from reading some documentation about how the color (C) and the
alpha (A) of a colored/textured polygon are computed:

(where f=face(polygon) and t=texture)

Modulate Mode:
C = Cf*Ct
A = Af*At

In modulate mode, the alpha of the texture is *multiplied* by the alpha
of the polygon.  In other words, if you can see through the texture, the
poly will be invisible as well.

Decal Mode:
C = Cf*(1-At) + Ct*At
A = Af

In decal mode, the texture will blend with the poly color, but the alpha
will only be taken from the face.  I think this may be the mode you
want...

(got this from the OpenGL red book...)

-Lee

-----Original Message-----
From: Tom Nelson [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 17, 2000 1:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] java3d1.2.1beta1 - transparent gif as texture
fails


Thanks, but I'm not making an Appearance with transparency attributes,
I'm making solid colored objects textured with a transparent gifs.
I do that so I can change the color of the object under the gif
(dark to light) and it simulates
something like a backlit LED.
The actual java3d model is here:

http://www.csee.umbc.edu/~tnelso2/java3d/

The panel of lights behind the keyboard is textured with 26 letters
of the alphabet, done as transparent gifs. You'll see what I mean if
you run this with a previous version of java 3d.

The latest java3d1.2.1beta1 has broken the model on both solaris and NT.

Tom Nelson

"J. Lee Dixon" wrote:

> You need to enable blending...
>
>       TransparencyAttributes transp = new TransparencyAttributes();
>       transp.setTransparencyMode(TransparencyAttributes.BLENDED);
>       appearance.setTransparencyAttributes(transp);
>       // workaround for bug... default RenderAttr
>       appearance.setRenderingAttributes( new RenderingAttributes() );
>
> Previously there was a bug concerning transparencies, and setting
> the default RenderingAttributes was the workaround.  I don't know if
> it is still needed or not...
>
> -Lee
>
> -----Original Message-----
> From: Tom Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 17, 2000 11:31 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] java3d1.2.1beta1 - transparent gif as texture fails
>
> If I use a transparent gif as a texture
> (for example, in demos/java3d/TextureTest/MultiTextureTest.java)
> the object appears solid black. A non-transparent gif works fine.
> Is there something new we have to set for textures with transparency?
>
> Thanks,
> Tom Nelson
>
>
========================================================================
> ===
> 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