If you want front faces and back faces of objects to have a different
color (or a different texture, or ...) then you need to create two
Shape3D nodes, one for the front and one for the back. In order for
culling and lighting to be correct, make sure that that the triangles
are wound opposite from each other (so that only one of them is front
facing at any one time), and turn on back face culling.
--
Kevin Rushforth
Java 3D Team
Sun Microsystems
[EMAIL PROTECTED]
>Date: Tue, 10 Oct 2000 13:16:46 +0100
>From: Mohammed Akacem <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Setting the color of the Back face of a visuel object
>To: [EMAIL PROTECTED]
>
>Hello everybody,
>
>
>
>I am using Shape 3D und GeometryInfo classe,
>
>I am drawing an open box , with geoinfo.setColorIndices(colorindices); I
>am setting
>the colorindice array of my cube. I am also setting the appearreance of
>my Shape3D object as follow:
>Appearance materialAppear = new Appearance();
> PolygonAttributes polyAttrib = new PolygonAttributes();
> polyAttrib.setBackFaceNormalFlip(true);
> polyAttrib.setCullFace(PolygonAttributes.CULL_NONE);
> materialAppear.setPolygonAttributes(polyAttrib);
>
> Material material = new Material();
> material.setDiffuseColor(new Color3f(1.0f, 0.0f, 0.0f));
> materialAppear.setMaterial(material);
>
>my Problem is that I want to show Frontfaces and Backfaces with
>different colors
>so that I can check if a triangle is showing in the wrong direction.
>
>Thanks a lot for any help
>
>Mohammed
>
>===========================================================================
>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".