Jump to content
  • Advertisement

Archived

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

CountOfMonteChristo

Specular materials

This topic is 5760 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!