Save your image to a file type that supports transparency ( .gif or .png ) - set the area you want to see the background through as transparent, and then try texture mapping with that image. Here's a snippet of code which might help.
BufferedImage dest; ... ImageComponent2D ic = new ImageComponent2D(ImageComponent2D.FORMAT_RGBA, dest ); Texture2D t = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA, ic.getWidth(), ic.getHeight()); t.setImage(0, ic); t.setMinFilter( t.NICEST ); t.setMagFilter( t.NICEST ); TextureAttributes ta = new TextureAttributes(); ta.setTextureMode( ta.MODULATE ); ta.setTextureBlendColor( 1.0f, 1.0f, 1.0f, 0.0f ); --russell ----- Original Message ----- From: "Lan Wu-Cavener" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 14, 2002 8:25 AM Subject: [JAVA3D] texture mapping using image with black background > Hi, all: > > I have a simple question. I am using a tree image (jpg file) with black > background to do texure mapping. How can I make the black background color > change to my current background color which is light blue(sky color)? > > I have noticed that all the texture mapping I found are using the exact > image. Could anyone please help me out here? > > Thanks in advance! > > Lan Wu-Cavener > Dept. of Landscape Architecture > > =========================================================================== > 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".