Actually, per-vertex colors override Material Object colors
as well as ColoringAttribute colors. The presence of a Material
object in the Appearance Node of the visual object is what enables
lighting for the object.
See The Java 3D Tutorial (Chapter 6) for more details on lighting!
Cheers,
Dennis
Frederic Gillet wrote:
>
> Hi all !
>
> I create a Shape3D thru a GeometryArray and specify the normals and the
> colors at each vertex:
> for example a pyramid with a red, yellow, blue and white faces.
> How can I enable lighting on such a shape3D (Im using a directional
> light)?
> If I specify an appearance for the Shape3D, the lighting is enabled, but
> then the colors
> of the verices are overwritten, the color of the shape3D is the same for
> all the faces.
> How can I specify a Shape3D with different colored faces and still have
> lighting ?
> Is there a way of setting appearance per vertex/face ?
>
> Thanks a lot !
>
> Frederic Gillet
> Xbind, Inc.
>
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/
--
-----
Dennis J Bouvier
Find the Java 3D Tutorial "Getting Started with the Java 3D API" at
http://sun.com/desktop/java3d/collateral
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/