That is it! That is the attribute that I missed.
Thank you again, Florin! Have saved me from a miserable weekend and may be more days!

Lan


At 02:44 PM 1/31/2003 +0100, you wrote:
For the appearance attribute of the shape using textures with
transparencies, you may need to add TransparencyAttributes with value=0 and
mode=BLENDED.

Cheers,

Florin

-----Ursprüngliche Nachricht-----
Von: Lan Wu-Cavener [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 30. Januar 2003 21:48
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] AW: [JAVA3D] advice and tips on a tree texture
mapping


Thank you very much, Florin!

I tried RGBA, and a more "full" tree image, I got the space between the
foliage black instead of white. Does that mean that the image background
part stapled to the geometry will not be transparent?

>In order to look more realistic, then you really need to have a little more
>complex geometry for the "green" part, and use dot3 bump mapping for the
>trunk.
>Do you mean that I need to create geometry in a similar shape as the tree
>shape in image? Could you please explain a little bit more?

My geometry for the tree is editable by user which limited the degree to
customized the geometry to the image tree shape.

Thanks again!
Lan



>Cheers,
>
>Florin
>
>-----Ursprüngliche Nachricht-----
>Von: Lan Wu-Cavener [mailto:[EMAIL PROTECTED]]
>Gesendet: Mittwoch, 29. Januar 2003 21:44
>An: [EMAIL PROTECTED]
>Betreff: [JAVA3D] advice and tips on a tree texture mapping
>
>
>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
>
>˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
>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".

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".
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".

Reply via email to