tags:

views:

17

answers:

0

Ok, so my problem is that I have a plane in java3d that has a texture painted on it. This texture is a PNG with alpha transparency. When the scene is rendered the texture on the plane is partially translucent, as if it has some transparency over the entire image. I have played around with a variety of texture and transparency settings trying to get it to work

Appearance ap = new Appearance();
TextureLoader tl = new TextureLoader(textImage);
Texture tex = tl.getTexture();
TextureAttributes ta = new TextureAttributes();
ta.setTextureMode(TextureAttributes.MODULATE);
TransparencyAttributes transat = new TransparencyAttributes();
transat.setTransparencyMode(TransparencyAttributes.BLENDED);
transat.setTransparency(0f);

ap.setTextureAttributes(ta);
ap.setTexture(tex);
ap.setTransparencyAttributes(transat);

shape.setAppearance(ap);

Any help would be appreciated