In principle, light has on effect on texture, that is to say, the texture
attribute has higher priority than light in REPLACE attribute. Maybe you can
try other attributes of the texture such BLEND, MODULE.

Cheng Chang Dong
http://vlab.ee.nus.edu.sg/~ccd


----- Original Message -----
From: "heli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 6:38 PM
Subject: Re: [JAVA3D]


> xhsun wrote:
>
> > Could anyone tell me how to make light take effect on textured object?
> > Whenever I set texture to an object, the light will have no effect on
> > it. I even tried to remove the textured object from the light's scope
> > node's list, it is still visible.
> >
> >
> >
> > Thanks in advance.
> >
> >
> >
> > xiaohua
> >
>
> hi xiaohua,
>
> I had the same problem with my ship_shape_.
> Try the following:
>
>
>         Appearance appearance = ship_shape_.getAppearance();
>         Material material = new Material();
>         material.setLightingEnable(true);
>         appearance.setMaterial(material);
>         TextureAttributes texture_attributes = new TextureAttributes();
>         texture_attributes.setTextureMode(TextureAttributes.MODULATE);
>         appearance.setTextureAttributes(texture_attributes);
>         ship_shape_.setAppearance(appearance);
>
>
> bye
> heli
>
> --
>      __ __    __           __    __ __    _    __
>     / // /__ / /_ _  __ __/ /_  / // /__ (_)__/ /__ ___ ____ ____ ____
>    / _  / -_) /  ' \/ // / __/ / _  / -_) / _  / -_) _ `/ _ `/ -_) __/
>   /_//_/\__/_/_/_/_/\_,_/\__/ /_//_/\__/_/\_,_/\__/\_, /\_, /\__/_/
>                                                   /___//___/
>
>
===========================================================================
> 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