You did not set the TransparencyAttributes for the shape, and you didn't
define vertex colors. Thats probably part of the problem.
Dave Yazel
----- Original Message -----
From: Gatien Mellion <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 4:11 AM
Subject: [JAVA3D] Pb with texture on SGI
Hi!
I'w working on SGI Indogo2 impact IRIX 6.5 & java 3D 1.1.3, and it seems
there's some problems with the transparent texture.
first I made a BufferedImage,
transparent pixel are created with "new Color(0.0f, 0.0f, 0.0f,1.0f);"
then an ImageComponent2D, then a texture.
And I create the plan.
--------------------------------------------------
BIM = new BufferedImage (TailleImagette,
TailleImagette,
BufferedImage.TYPE_INT_ARGB);
ic= new ImageComponent2D (ImageComponent2D.FORMAT_RGBA,
TailleImagette,
TailleImagette);
ic.set(BIM)
texture = new Texture2D(Texture.BASE_LEVEL,
Texture.RGBA,
TailleImagette,
TailleImagette);
texture.setImage(0, ic);
texture.setEnable(true);
texture.setMagFilter(Texture.NICEST);
appear = new Appearance();
TextureAttributes TA = new TextureAttributes();
TA.setTextureMode (TextureAttributes.MODULATE);
appear.setTextureAttributes (TA);
appear.setTexture(texture);
QuadArray plane = new QuadArray(4,
GeometryArray.COORDINATES
| GeometryArray.TEXTURE_COORDINATE_2);
plane.setCoordinate(0, Rot.getPoint2D(gis, site+sitePas));
plane.setCoordinate(1, Rot.getPoint2D(gis, site));
plane.setCoordinate(2, Rot.getPoint2D(gis+gisPas, site));
plane.setCoordinate(3, Rot.getPoint2D(gis+gisPas, site+sitePas));
plane.setTextureCoordinate(1, new Point2f(0.0f, 1.0f));
plane.setTextureCoordinate(0, new Point2f(0.0f, 0.0f));
plane.setTextureCoordinate(3, new Point2f(1.0f, 0.0f));
plane.setTextureCoordinate(2, new Point2f(1.0f, 1.0f));
Shape3D myShape = new Shape3D();
myShape.setGeometry (plane);
myShape.setAppearance (appear);
----------------------------------------------
The problem is that, there's no transparency in my texture. The pixels
that
should be transparent are black.
I noticed several question about transparency and texture in the
archives,
but no one answer the question.
any idea?
----------------------------------------------
----------------------------------------------
I think there's many problems with transparency with java3D on SGI,
because when I run the Java3D tutorial examples
"examples/texture/TextureModeApp.java"
I see only the "MODULATE" text, and there's nothing for DECAL,BLEND or
REPLACE...
----------------------------------------------
thanks in advance
Gatien MELLION
CRIL TECHNOLOGY
===========================================================================
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".
===========================================================================
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".