Hello,
You seem to have forgotten to set the transparency attributes on the appearance:
app.setTransparencyAttributes(transparency);
Another thing to look for is to make sure you have set the primflags on your
object (if it is from utils) to
Primitive.GENERATE_NORMALS + Primitive.GENERATE_TEXTURE_COORDS
(See attached file: PictureBall.java)
----------------------------------------------------------
Demo Seekers: A little known fact about the example programs is that they have
documentation.
http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_2_API/j3dguide/AppendixExamples.html
From,
Greg (java3d.org)
>Hi!
>
>I have problems with objects transparency with textures. Already 5 days. Below
Uma Sabada has written working (like) program. But, again, I have failled. Here
is piece of code, can somebody will prompt in than problem.
>
>app = new Appearance();
>Texture tex = new TextureLoader(texImage, this).getTexture();
>app.setTexture(tex);
>TextureAttributes texAttr = new TextureAttributes();
>texAttr.setTextureMode(TextureAttributes.MODULATE);
>app.setTextureAttributes(texAttr);
>
>transparency = new TransparencyAttributes(
>
>TransparencyAttributes.NICEST, .3f);
>
>May be somebody post a working code, please
>
>Thank you for attention.
> Hi, all
> I think code samples is a very good thing for quick helps.
> Why there isn't the same thing for java3D??
> Have good day
>
PictureBall.java