Hi, everyone:

I am seeking advice despately.  I did texture mapping on a tree object
which is in a shape of two triangles (connected base to base). The
underline geometry is a TriangleStripArray. The problem is that the tree is
"Trimmed" to geometry shape. It looks very ugly. See attached picture (very
embarrassing to show). Plus, the space between the foliage is not
transparent.  I was wondering if anyone could give me some hints as how to
make the trees more realistic looking. I have played with it for couple of
days and failed to figure out what was wrong. I'd appreciate any help!
Thanks in advance!

 Here are the code that I use to set the appearance bundle.

            Texture2D treeTex = new Texture2D(Texture.BASE_LEVEL, Texture.RGB,
                                              image.getWidth(),
image.getHeight());
            treeTex.setImage(0, image);
            treeTex.setEnable(true);
        treeTex.setBoundaryModeS(Texture.CLAMP_TO_EDGE );
        treeTex.setBoundaryModeT(Texture.CLAMP_TO_EDGE );    // get the
texture from the loader
        treeTex.setMagFilter(Texture.BASE_LEVEL_LINEAR);

            TextureAttributes texAttr = new TextureAttributes();
            texAttr.setTextureMode(TextureAttributes.REPLACE);

        RenderingAttributes renderAtt = appearance.getRenderingAttributes();
        renderAtt.setIgnoreVertexColors(true);
        appearance.setTexture(treeTex);
        appearance.setTextureAttributes(texAttr);


Lan Wu-Cavener
Dept. of Landscape Architecture

<<attachment: poorImg.gif>>

Reply via email to