Alright I am back !
I have been reading about Lighting for a while now , the problem is that I gathered most of my knowledge from different sporadic sources , without a consistent organized supply of info , so my understanding of the concept still has massive holes , I plan to fill them by asking you guys .
First , as I understand it , objects that need to be lit has some pre-defined characteristics , like Ambient , Emissive , Specular .. etc , these factors are like colors , they are used to alter the interaction between the light and the object .
To put it simply , they are like certain color modifiers , if an object has a value of 4 in it's
Ambient criteria , then it behaves in a certain way when exposed to light , for example , when exposed to a green light , the object would always gain a dark color .
Q1 : Is my understanding of that concept here correct ?
Secondly , the process of calculating light boils down to two basic operations : determining distance and angles .
it starts with creating a normal for the triangle needed to be lit , then the distance between that triangle and the light source is calculated , and since lighting occurs after
Rasterization , it is basically done in 2D mode , and the distance is calculated simply by subtraction , for example , the distance between point 9 and point 3 is 6 ! ,
9-3=6 .
The value of the distance is then treated as a
Vector , and the angle between that vector and surface normal is calculated by the
Cosine law .
kinda like this picture :
Finally , the color of the triangle is calculated from the equation : L(luminance of light source)X Angle .
Q2 : Is my understanding of this concept correct ?
Q3 : Tf it is correct , then where the (emissive , specular , ambient ) criteria fit in ? after or before the luminance equation ?
thanks in advance .