hi, heli, it works, thanks alot. That's really a black spot in my mind and I'll never find it by myself. Since whenever an object is assigned a material, it will be lighted up, so, I only check the Texture and TextureAttributes class to see whether there is setLightingEnable method.
thanks again. xiaohua ----- Original Message ----- From: "heli" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 26, 2002 2:38 AM 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".