Jump to content
  • Advertisement
Sign in to follow this  

What are materials for?

This topic is 4563 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

When I setup my texture stage state to use diffuse, it uses the diffuse values from the vertices, not the materials. So what is the material for? How do I get it to use the material diffuse value? Thank!

Share this post


Link to post
Share on other sites
Advertisement
The material is similar to a real world material like chrome, metallic materials, plastic. It doesn't define the grain but it defines the way light interacts with objects that are associated with the materials you render. Such as chrome has a high specularity level. Your material gets applied to the object you are rendering and the light then interacts with it.

Here is a better definition from the SDK.
Materials describe how polygons reflect light or appear to emit light in a 3D scene. Material properties detail a material's diffuse reflection, ambient reflection, light emission, and specular highlight characteristics. Direct3D uses the D3DMATERIAL9 structure to carry all material property information. With the exception of the specular property, each property is described as an RGBA color that represents how much of the red, green, and blue parts of a given type of light it reflects, and an alpha blending factor.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Simply put : The material is used by DirectX when the light is enabled. If the light is disabled, then the vertex colors are used (if they exist) ^^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!