4
$\begingroup$

I'm studying Illumination subject these days and I was given a problem which asks to calculate the intensity using phong illumination model. I'm little bit confused whether I should calculate normal vector using after normalize it or as it is. Normal is given below. So if you can please tell me what type of vector I have to use there and if I have to use normalized vectors then it's value.

$N=(0,0,-12)$

$\endgroup$
4
$\begingroup$

Short answer: yes.

Longer answer: yes, because the vectors you’re using are meant to represent directions, not directions-and-distances. Think of it in terms of light: it doesn’t matter how far a photon’s traveled, whether it’s from the sun or from a lamp on your desk—once it arrives at a surface, it’s going to get reflected in exactly the same way.

From a mathematical standpoint, you’re making lighting calculations based on the angles between the incoming light, the view point, and the surface normal. The dot product is defined as the length of the two input vectors multiplied by each other and by the cosine of the angle between them. To get just the angle—which you need for the lighting model—you need to factor out the length of the two vectors, i.e. normalize them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.