My own primer on Light Diffusing
Before we delve in on light diffusing, I need to remind of myself about color blending, particularly in adding and multiplying colors.
Adding colors is used to add brightness and contrast to colors being chosen.
Multiplying colors of similar hue and color gives minimal differences, this can be used on determining how much light is being reflected on the surface, and how much color has been reflected from the light source to the eyes of a viewer. However, with different hues and colors, it would give the polar opposite, making the target color duller and washed out than before.
For a given light source, S, when I shine the directional light onto a surface, the diffuse intensity of the light is determined by the dot product of the directional light vector and the reflection vector.
That dot product must then multiplied multiple times by itself, which gives me the tiny, yet different, hues and colors of the object’s surface color. These colors, when spread out from the maximum light diffuse intensity on the surface of the object (i.e., the white light), will create the illusion of light and shadow.
Note that for objects that reflect light, each of them has a spectral value, named “specular value”, which is a value that determines how spread out the light diffuse is on the surface of the object. This value is used to determine the object’s shininess. For example, metal objects have a higher spectral value, while plastic and wood have a lower spectral value.
In programming concept jardon…
The specular value must always be positive. If it’s negative, it may be undefined. The range of a specular value is from zero to one. Anything in between determines how smooth or rough the surface of an object is, which implies how wide or narrow the light diffusing area is.
It is determined as the tint of the light’s reflection from the light source by blending (or multiplying) the light source color and the surface color, then calculating the scalar color vector by using the (dot product of the light vector and the normal vector of the surface) as scalar value in scalar multiplication, and finally adding the scalar color to the surface color of an object.
Multiplying the light source color and the surface color of an object is used to measure the reflection intensity. This intensity determines how intense the tint of the blended color is.
Calculating the scalar color vector using the dot product of the light vector and the normal vector of the surface is used to increase the light intensity difference between two colors. If scalar multiplication is not used, two colors will be of very very similar color, and may cause color glitches where the graphics card may apply the same color to them during mipmapping and resizing textures.
Would you like the effect expanded upon, so that all solid color textures on a huge object have the same color, even when you’re standing really far from it? I would not.
Finally, adding the intensity differential value to the surface color of an object will cause the player to see a contrast in between. If the contrast isn’t obvious, but instead the gradient of two colors are obvious, the illusion of light and shadow is perceived.
I may have to try using a negative specular value in Unreal Engine 4 to see what it looks like, and may post more info on that. I do know that this will allow you to view all the details about light reflection properties.
That is all.