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/

Reply via email to