-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I will write an RTS game with j3d. To let the terrain nicer looking, I will overlap the textures of the grid. I tryed this: Appearance appearance = new Appearance(); TexCoordGeneration coord = new TexCoordGeneration(); appearance.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_FILL,PolygonAttributes.CULL_BACK,0)); TextureAttributes attrib = new TextureAttributes(TextureAttributes.REPLACE,new Transform3D(),new Color4f(),TextureAttributes.FASTEST); TextureUnitState[] texunit = new TextureUnitState[2]; texunit[1] = new TextureUnitState(theGrid.type.getTexture(),attrib,coord); texunit[0] = new TextureUnitState(tmp,attrib,coord); appearance.setTextureUnitState(texunit); appearance.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.BLENDED,0)); Shape3D tmp = new Shape3D(groundGeometry,appearance); loads the texture tmp (file is attached): TextureLoader loader = new TextureLoader("/home/andy/ChaosRTS/data/test/terrain/tmp.png",null); Texture2D texture = new Texture2D(Texture.BASE_LEVEL,Texture.RGBA,128,128); texture.setImage(0,loader.getImage()); texture.setMagFilter(Texture.NICEST); texture.setMinFilter(Texture.NICEST); texture.setBoundaryModeS(Texture.WRAP); texture.setBoundaryModeT(Texture.WRAP); The resulting image is added. I am using the beta1 linux version of j3d. What I am doing wrong? Why is the secound texture not added over the first? When I set Blending mode to screen-door. - -- Andreas Bauer [EMAIL PROTECTED] May the penguin be with you! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE86p9AaHjQVZOZP3YRAh87AKCS/LElqEdMdia9ykoyehJJ3n52zQCeJ3TF WkSPhoC9Tm9ORoi+Ljzo+4A= =u+UE -----END PGP SIGNATURE-----
<<attachment: textbug.jpg>>
tmp.png
Description: PNG image