Jump to content
  • Advertisement
Sign in to follow this  
Fnord42

[SOLVED] Why is there a specular light component?

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

Hello everyone,

can somebody tell me why is there, for example in the Phong illumination model, a specular light component?
It makes sense to me, that there are distinct material-constants, because as I understand it, the specular reflected rays get reflected directly by the surface, while the diffuse reflected rays go a bit inside the material and scatter multiple times before they get out again.
But why a seperate specular light component? Aren't the rays which a lightsource emits the same both for diffuse and specular reflection? What could be the use of a distinct specular light color?

Thanks for your time!

Share this post


Link to post
Share on other sites
Advertisement
Edit: as pointed out below, the content of this post is not entirely correct.

I may be a bit off (not an expert in lighting physics): specular is a a quick way to fake the reflections that are in the real world: so it's a cheap (and fake) way of showing that a surface reflects directly a lot of light. If you were to use raytracing with proper reflections (and all the "real" but slow physical effects) you wouldn't need it.

I may be wrong, so if I am do tell and I'll blank this post ^^

Share this post


Link to post
Share on other sites

Maybe its for more artistic reasons, rather than physical reasons?

I can't imagine another reason.
But I also can't imagine a good artistic-example where someone might use different colors for specular and diffuse ;)
Thanks for your reply.


I may be a bit off (not an expert in lighting physics): specular is a a quick way to fake the reflections that are in the real world: so it's a cheap (and fake) way of showing that a surface reflects directly a lot of light. If you were to use raytracing with proper reflections (and all the "real" but slow physical effects) you wouldn't need it.

I may be wrong, so if I am do tell and I'll blank this post ^^

In retrospective my post may has been not as clear as it could have been ;)
I wasn't wondering about the use of specular lighting.
I was wondering about why there are both a specular- and a diffuse-color for an incoming light-ray while in physics there is only one.
But thanks for your reply anyway.

Share this post


Link to post
Share on other sites
Real light isn't as simple as having a single color. Light can contain photons of multiple frequencies. Two light sources that appear the same to the human eye can have different frequency distributions. Photons of different frequencies interact with surfaces in different ways, including refracting or reflecting at different angles. Using specular color is a simpler way to model light than, for example, saying 10% 680 nm 20% 720 nm and 70% 740 nm light.

Share this post


Link to post
Share on other sites

Real light isn't as simple as having a single color. Light can contain photons of multiple frequencies. Two light sources that appear the same to the human eye can have different frequency distributions. Photons of different frequencies interact with surfaces in different ways, including refracting or reflecting at different angles. Using specular color is a simpler way to model light than, for example, saying 10% 680 nm 20% 720 nm and 70% 740 nm light.

Thanks for your reply.
I knew that light can consist of different frequency-combinations which physiologically create the same impression of color, but I don't see how this is a reason to use different frequencies for the simulation of specular-reflections as for the simulation of diffuse-reflection like it's done for example in the OpenGL's fixed-function-pipeline's implementation of the Blinn-Phong-illumination-model.
Why would someone simulating illumination, choose to use one set of incoming frequencies to calculate diffuse-reflection with diffuse-material-constants and another set of incoming frequencies to calculate specular-reflection with specular-material-constants?
Shouldn't the simulated light emit only one set of frequencies which interact with both material-properties?

Share this post


Link to post
Share on other sites
The point is that standard color representations do not model light as a combination of frequencies. It models it as final perceived color value. However, lights with different frequency combinations that share a perceived color value interact with materials differently. A light with RGB 0xffffff could be generated with a broad spectrum of a hundred different frequencies or it could be generated with just three frequencies. These two different lights will interact with surfaces differently. Rather than specify light A has 100 light frequencies and exactly which ones they are, a shortcut is taken by modeling light as having different colors for different properties like diffuse and specular.

Share this post


Link to post
Share on other sites
Most materials do not require a coloured specular component (monochrome is enough) -- phsyically speaking, it should only be used when a material has an index of refraction that varies depending on the wavelength of light.

When we use a "specular mask" (whether it's coloured or monochrome), we're indirectly describing the material's IOR value (which influences reflection vs refraction ratios). If we use a monochrome value, then we're saying that the IOR is the same for all visible wavelengths, but if we use an RGB value, we're providing an approximation of a IOR-vs-wavelength curve (with 3 points on that curve).

Insulators/dielectrics can typically be modelled accurately with a monochrome specular mask, however metallic materials will require coloured specular masks as their IOR values often vary greatly with wavelengths (which is where metals get their colour from -- their diffuse/albedo colour is usually black!)

So:
* "diffuse colour" == a graph of wavelength vs re-emittance (RGB values == curve approximated with only 3 wavelength values).
* "specular colour" == an indirect description of a graph of wavelength vs IOR (RGB values == curve approximated with only 3 wavelength values).

I may be wrong, so if I am do tell
You're a bit off wink.png
"Diffuse lighting" models the photons that are refracted and then re-emitted by a material, whereas "specular lighting" models the photons that are reflected by a material. They're both equally real/important in a physically-based renderer.

Share this post


Link to post
Share on other sites
In the games industry we have a history of giving artists lots of options and flexibility in the rendering pipeline, so that they can hack and fake their way towards trying to achieve the look they want. Lately the new trend is to pull back on the number of knobs, and instead try to stick to more physically-based rendering models. The idea is that if you it right, artists will produce better results more quickly. Keeping in line with those principles, I would think that seperate specular lighitng color is a unnecessary flexibility and should be removed from the pipeline.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!