Jump to content
  • Advertisement
Sign in to follow this  
sbayeta

OpenGL Direct3D material shininess?

This topic is 4708 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'm trying to simulate some real materials in my direct3d app, and I found this link wich seems like a good start: http://devernay.free.fr/cours/opengl/materials.html The only problem is that I can't find an analogous material property to shininess in direct3d. (using the managed api if directx9) Can anyone helpme with this? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Well there isn't. Simplified, what you would do is store your own properties for a material and apply it to the surface. For example you might make a brick_wall material, using a certain vertex shader that only does dull texturing with just diffuse lighting for example. For a shiny surface you would add specular and make it stronger.

ace

Share this post


Link to post
Share on other sites
I'm not very sure, but perhaps Power parameter from D3DMATERIAL9 is an equivalent of "Shininess" or related to it in some way (maybe 1.0 / shininess).

Share this post


Link to post
Share on other sites
It is true the power parameter will affect the specular brightness of your lights, but if you want a decent result you definately need to look to shaders. As was mentioned earlier, you can either have two shaders, one flat and another with specular. Or you can just have one and vary your own 'specular level' variable in that shader. This way you can have full control over exactly how 'shiney' your objects are. ie. You object can contain a parameter of it shineyness (or even have various subsets with differing shineyness if you want) and then on render you can set the HLSL variable, CommitChanges(), and off you go. Good luck [wink]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!