An approach I use (for shaded terrain rendering) is the following:
1. Set the color of the underlying mesh to Color3f(1.0f, 1.0f, 1.0f)
2. Define a material object :
material.setAmbientColor(color);
material.setDiffuseColor(color);
3. Set the Gourad shading model in ColoringAttributes
4. Set textureAttrib.setTextureMode(TextureAttributes.MODULATE) for the
texture
This has the effect of modulating the texture with the light shaded polygon
mesh.
Works well for terrain as it bypasses having to "burn in" a particular sun
position (albeit
at a possible performance penalty).
-Pedro Estrada
www.alphatech.com
----- Original Message -----
From: "Fran�ois Savard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 12, 2000 9:10 AM
Subject: [JAVA3D] Lights on texture
> Is there a way to apply lights effects on textures as on others surfaces?
>
> Fran�ois Savard
> OPEA-MAT / Civil Engineering Department
> Universit� Laval
> Qu�bec-Canada
>
>
===========================================================================
> 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".