Thank you
I couldn't get it working. In any way I try, I get a transparency of the
whole image.
Humberto
Jeremy
try something like:
Point3d[] vertecies = {new
Point3d(-width+offsetX,-height+offsetY,depth), new
Point3d(width+offsetX,-height+offsetY,depth),
new Point3d(width+offsetX,height+offsetY,depth), new
Point3d(-width+offsetX,height+offsetY,depth)};
plateGeom.setCoordinates(0,vertecies);
Vector3f[] plateNormals = {new Vector3f(0f,0f,1f), new
Vector3f(0f,0f,1f),
new Vector3f(0f,0f,1f), new Vector3f(0f,0f,1f)};
plateGeom.setNormals(0,plateNormals);
TexCoord2f[] plateTextCoords = {new
TexCoord2f(0f,(float)textureRatioY),
new TexCoord2f((float)textureRatioX,(float)textureRatioY),
new TexCoord2f((float)textureRatioX,0f),
new TexCoord2f(0f,0f)};
plateGeom.setTextureCoordinates(0,0,plateTextCoords);
plateShape.setGeometry(plateGeom);
plateAppearance = new Appearance();
transparencyAttributes = new
TransparencyAttributes(TransparencyAttributes.BLENDED, 1.0f);
TextureAttributes texAttr = new TextureAttributes();
texAttr.setTextureMode(TextureAttributes.REPLACE);
texAttr.setPerspectiveCorrectionMode(TextureAttributes.FASTEST);
plateAppearance.setTexture(texture);
RenderingAttributes plateRenderingAttributes = new
RenderingAttributes();
plateRenderingAttributes.setIgnoreVertexColors(true);
Material plateMaterial = new Material();
plateMaterial.setLightingEnable(false);
plateAppearance.setMaterial(plateMaterial);
plateAppearance.setRenderingAttributes(plateRenderingAttributes);
plateAppearance.setTextureAttributes(texAttr);
plateAppearance.setTransparencyAttributes(
transparencyAttributes );
plateShape.setAppearance(plateAppearance);
--
Homepage: http://www.computerbooth.com/
Code page: http://www.newdawnsoftware.com/
========================================================================
===
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".