You need to set your texture to modulate against the vertex colors instead
of replacing them.  When the vertex colors are altered due to lighting, then
the lighting changes will be interpolated across the vertices and your
texture will change to show the lights.

Dave Yazel

----- Original Message -----
From: David Ko <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 16, 2000 7:49 PM
Subject: [JAVA3D] Lighting and Textures


Hello,

I've added a PointLight that moves around in a scene and dynamically
lights objects in the scene. Curiously however, when you add a Texture2D
object to a geometry (say, a polygon), the polygon doesn't get lit
dynamically (no attentuation as the pointlight is moved away from the
polygon). But when the texture isn't there, the lighting seems to work
fine. Is there something I have to do with the Texture to allow it to be
lit by the PointLight? Oh yeah, even if you take away the pointlight
source, the Texture2D'ed polygon will appear fine. But the polygon with a
texture and without a light will not be displayed.

It seems the Texture2D gets rendered with no lighting whatsoever. Is there
a solution to this?

Thank you,
David Ko

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

Reply via email to