2
$\begingroup$

I'm stuck on this question asking me to calculate the intensity of a pixel using Ray Tracing. It gives values such as $I_i$ but doesn't give any coordinates.

I know for the diffuse component, $I_ik_d(n,l)$ can be written as $I_ik_d(\cos\theta)$ but for the specular component $I_ik_s(h\cdot n)$ is there any other way to write it so that it doesn't require any vectors such as $h$ and $n$?

This is the question:

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Are you sure you want N·H, or do you want R·L i.e. reflection vector dotted with light source vector? The latter would be the classic Phong equation (N·H is Blinn), and the figure appears to mark the R·L angle: 15 degrees. $\endgroup$ Mar 27 '16 at 6:01
  • $\begingroup$ Should the question not point out which Bidirectional Reflectance Distribution Function (BRDF) you need to use? You have Phong, Blinn-Phong, Modified Phong, Modified Blinn-Phong and a whole variety of physically-based ones. $\endgroup$
    – Matthias
    Mar 27 '16 at 10:17
  • $\begingroup$ @NathanReed how can i find R.L if i dont know the vectors? Do i just use 15 degrees? $\endgroup$ Mar 27 '16 at 13:28
  • 2
    $\begingroup$ @user2976568 The dot product is the cosine of the angle between the vectors (for unit vectors). Just as you remarked that N·L = cos(theta). :) $\endgroup$ Mar 27 '16 at 17:24
  • 1
    $\begingroup$ @NathanReed sounds like the answer to me $\endgroup$
    – joojaa
    Mar 29 '16 at 8:07
5
$\begingroup$

Assuming that the classic Phong model is desired here, the dot product that goes into the specular calculation should be R·L, rather than N·H (which was introduced by Blinn). That is, Phong calculates specular using the angle between the reflected eye vector and the light vector.

In the diagram you posted, these vectors are shown and the angle is given as 15°. So, R·L = cos(15°) = 0.96 according to the table below the diagram.

$\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.