Hi! (again)
I'w working on SGI Indigo2 impact IRIX 6.5 & java 3D 1.1.3, and it seems
there's some problems with the transparent texture.
I have
- a white plane
- a texture with some pixels colored and some transparent
I would like my plane to have the colors of the texture. But when I use
- modulate, the result is semi-transparent and dark for all the pixels,
It's not the colors of my texture
- blend, the result is completly white
- decal, I can see the edges of my texture, but it's really white. It's
not the colors of my texture
did I miss sth? or is it a specific problem with SGI and texture. (I
mentioned that examples
didn't work very well, "examples/texture/TextureModeApp.java")
thanks in advance
Gatien MELLION
CRIL TECHNOLOGY
--------------------------------------------------
////////////// define the pixels of image and the texture
//////////////////////////////////////////////////////////////////////////
BIM = new BufferedImage (TailleImagette,
TailleImagette,
BufferedImage.TYPE_INT_ARGB);
// fill the image pixels
// some pixels have a color, some are transparent created with "new
Color(0.0f, 0.0f, 0.0f,1.0f);"
....
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);
//////////// define the appearance
//////////////////////////////////////////////
appear = new Appearance();
TextureAttributes TA = new TextureAttributes();
TA.setTextureMode (TextureAttributes.MODULATE);
//// TA.setTextureMode (TextureAttributes.BLEND);
//// TA.setTextureMode (TextureAttributes.DECAL);
appear.setTextureAttributes (TA);
appear.setTexture(texture);
appear.setTransparencyAttributes
(new TransparencyAttributes
(TransparencyAttributes.FASTEST, 0.1f));
/////////// define the plane, white color
/////////////////////////////////////////////////////
QuadArray plane = new QuadArray(4, QuadArray.COORDINATES |
QuadArray.TEXTURE_COORDINATE_2 |
QuadArray.COLOR_3);
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));
Color3f Coul = new Color3f(1.0f, 1.0f, 1.0f);
plane.setColor (0, Coul);
plane.setColor (1, Coul);
plane.setColor (2, Coul);
plane.setColor (3, Coul);
Shape3D myShape = new Shape3D();
myShape.setGeometry (plane);
myShape.setAppearance (appear);
===========================================================================
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".