Archived

This topic is now archived and is closed to further replies.

gommo

Lighting Not affecting Textures

Recommended Posts

What would be the likely cause of my lighting (point and ambient) not affecting textures on my models. I made the ambient light come on (150,150,150) when I hold the left mouse button. The parts of my model that dont have texture on them go dark when there is little light but the textures always stay the same. No shadows or dark areas. Is there something I havent enabled in texturing???

Share this post


Link to post
Share on other sites
Could be lots of things - some of the more obvious:

- TextureStageStates not set up correctly to modulate the diffuse colour (from D3D lighting) with the texture

- Bad normals

- Bad D3D materials (say oversaturated)

- Lighting renderstate turned off

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
I had the exact same problem when I started out. Look into texture stages: What it is doing is probably using the exact colors of the texture file for your polygon''s pixels. You want it to modulate (multiply) the texture''s colors with the light''s colors, so that, if you have a red light shining on your polygon, you see a red-ish version of your texture.

Look into texture stages: you''ll need the arguments for the first stage (0) to be the texture and ''current'', which means the color values of the light, and the operator set to modulate.
That modulates the texture''s colors with the ''current'' colors, and gives you a nice lighted texture.

Share this post


Link to post
Share on other sites
Thank you both. It was the texture stage set up as SELECT_ARG1. So it was only using the texture. Thanks heaps

Share this post


Link to post
Share on other sites