Hi guys,
I'm trying to map an image texture to a shape3D (textured plane) but I want
the image to be semi-see-thru (not just invisible bits of the image like a
PNG, but the whole thing, all the colors). I can't seem to get this to work,
all the textures I get are completly opaque!!!

Anyone know why?

TextureLoader loader = new TextureLoader(this.getClass().getResource(fnm),
null);
    ImageComponent2D im = loader.getImage();
    if(im == null)
      System.out.println("Load failed for texture: " + fnm);
    else {
      Appearance app = new Appearance();

      // blended transparency with 30% transparent so we can see through it
      TransparencyAttributes tra = new
TransparencyAttributes(TransparencyAttributes.BLENDED, 0.3f);
      app.setTransparencyAttributes( tra );

      // Create a two dimensional texture
      // Set the texture from the first loaded image
      Texture2D texture = new Texture2D(Texture2D.BASE_LEVEL, Texture.RGBA,
        im.getWidth(), im.getHeight());
      texture.setImage(0, im);
      app.setTexture(texture);

      setAppearance(app);

Thanks,
CHRIS

===========================================================================
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