Hi John,
I have tried your code and may understand why Ana Isabel believes it does
not work:
you may be both right!
On my test, the transparent bit is indeed used and my icon background is
transparent, but the texture behind it is not displayed.
I can see the colour of the surface behind but not the texture mapped on it
: Is this expected?? is this the case for your code??
Can a transparent gif be really transparent???
I am fighting on this issue as well as it is quite critical!!!
Any help would be welcome: from sun3D or any of us guys who has tamed this
problem.
Regards
Olivier
-----Original Message-----
From: John Brecht <>
To: Ana Isabel Pina Moreira Boto <>; [EMAIL PROTECTED] <>
Date: Thursday, February 04, 1999 9:58 AM
Subject: Re: [java3d]: Transparent Images and pick in boxes and rectangles!
This might accomplish what you want:
Appearance app = new Appearance();
Material mat = new Material( );
mat.setDiffuseColor( 1.0f, 1.0f, 1.0f );
// Set up the transparency properties
TransparencyAttributes ta = new TransparencyAttributes();
ta.setTransparencyMode(ta.BLENDED);
ta.setTransparency(0.0f);
app.setTransparencyAttributes(ta);
app.setMaterial( mat );
Texture2D surfTex = loadTexture("texture.gif", this);
app.setTexture(surfTex);
The material should have white for diffuse color, otherwise the texture's
color will be mixed with the material color. Then you make the appearance
transparent, so all that shows is the texture. The result is, wherever you
texture is transparent, your object is transparent
.
-----Original Message-----
From: Ana Isabel Pina Moreira Boto <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, February 03, 1999 11:08 AM
Subject: [java3d]: Transparent Images and pick in boxes and rectangles!
Hello!
I made an image (a gif) with a transparent background. I create a box in
java3d with an appearance and I set the texture with this image.
I set the material to null but the image I see has a white background. I
try put no material but the result is the same.
I can�t put transparent background in images!
--------------------------------------------------------------------------
In a file read in VRML, I can�t pick a box, and when I try to pick a
rectangle I get an exception:
Shape3D: no capability to allow intersect
Does anyone help me?
Thanks,
Ana Boto
-------------------------------------------------
./--\. Ana Isabel Pina Moreira Boto
. . Mail: [EMAIL PROTECTED]
\--/ [EMAIL PROTECTED]
ICQ: 24914295
-------------------------------------------------
=======================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/
=======================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/
�����������������������
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/