Specular materials

Started by
1 comment, last by CountOfMonteChristo 21 years, 7 months ago
I''ve never had any result from setting the specular properties of a material. I don''t see any specular highlights on objects, even when I set both the light''s and the material''s specular properties to 1.0f, and set the D3DRS_SPECULARENABLE render state to true. I have only been trying it with square objects, while it is usually used on round ones... Does this have anything to do with it? Shouldn''t you at least see some white spot moving over a rotating cube?
Advertisement
You may just not be getting the "right" angle with the cube to see the specular component, as there is a very small margin of error with respect to the angle where you''ll see specular light sense the cube has so few sides.

Try creating a sphere and see if it still doesn''t work. Also, make sure the normals on the square are correct (specular light depends on them)

Brett
Ummm... You''ve only been using it on square objects....

Don''t forget that specular lighting is a a per vertex operation and not a per pixel operation so a to get a nice specular effect on your object you need a particular amount of vertices (that''s why it''s normally used on spheres and so on, because due to their curvy nature they automatically need a lot of vertices). So if you have a light pointing to the center of your square (admitting that you don''t have any vertices in the center) you will not get any specular highlight, at the maximum you will get a uniform specular highlight along the whole surface...

This topic is closed to new replies.

Advertisement