Material Issue - Ambient, Diffuse, etc

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
nullterm
Posts: 14
Joined: Tue Feb 27, 2007 12:36 pm

Material Issue - Ambient, Diffuse, etc

Post by nullterm »

I'm trying to modify the AmbientColor, DiffuseColor, etc with the Direct3D9 version, but it doesn't seem to have any affect at all on the final scene. Even setting the values to 0,0,0,0 didn't change the model to pure black.

Altering the light parameters does have an affect though. Does this sound familiar to anyone?

So far as I can debug, Irrlicht is feeding the correct material values into Direct3D's SetMaterial function. But it seems like those values aren't being used.

Are the color values instead being read from the vertices, while the material is ignored?

I'm using different material types, but mainly EMT_SOLID.
nullterm
Posts: 14
Joined: Tue Feb 27, 2007 12:36 pm

Post by nullterm »

Additional...

Randomizing the color values on the vertices does have an affect. Is there a switch somewhere to tell the system to use the material color, not the vertex color?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Humm. This IS familiar to me. Used to set the color and activate the LIGHTED option on the surface so it would apply to it. (IRRedit)

Would have to have someone better than me to explain it all. But it could mean that if not "lighted" the surface will take the color of the color map and not the value entered.
Post Reply