Specular lights with DX and OpenGL

Started by
1 comment, last by Namethatnobodyelsetook 18 years, 5 months ago
Hi! I want to write an application which can either use DirectX or OpenGL. Now I have a little problem with my specular lights: DirectX has a Power attribute in it's material structure. OpenGL has no such attribute, but it has a GL_SHININESS setting. But it seams that these two attributes are not equal. The DirectX documentation says that the Power attribute controls the sharpness (and not actually the light intensity). Therefore, if I set the Power attribute to 1, the light is very bright and very smooth. But if I set OpenGL's shininess attribute to 1, the light is nearly invisible. Does anybody have an idea how I could solve the problem? Are there any other attributes which I did not mention so far? Thanks in advance. rgds.
Advertisement
I have experience in both DirectX and OpenGL. From my past experience, OpenGL's shininess means how much light is reflected for specular part. Larger value means more specular intensity. Direct's power means how concentrate light's specular part it. Smaller value (approaches 0) means more spread of specular while larger value (approaches 100 or infinity) means more concentrate of specular. Hope this helps.
The poorest programmer in the game industry!!
If I understand correctly, you should be able to mimic the effect by setting the material specular color to specularcolor * shininess. Specular is additive, so scaling the color is the same as having it add less via a seperate control.

This topic is closed to new replies.

Advertisement