2
$\begingroup$

One of the first things I learned about computer graphics lighting (and light in general) is that when a ray of light hits a surface, the surface absorbs certain colors and the light retains the rest. If this is true, then why do most computer graphics examples and tutorials I've seen use two different colors for ambient and diffuse color for a material? If both ambient and diffuse light waves come from the same light source, with the same color, then shouldn't the material reflect the same color for both types of light? Note that I'm fairly new to computer graphics, so I've barely scratched the surface of complex lighting and etc.

$\endgroup$
4
  • 8
    $\begingroup$ Because ambient is a hack used to substitute for the lack of indirect illumination. It is not physically based. $\endgroup$
    – lightxbulb
    May 29, 2021 at 8:07
  • 1
    $\begingroup$ Most of the early graphic nodels arent very physically sound. Legacy has a tendency to stick around for a while. $\endgroup$
    – joojaa
    May 29, 2021 at 20:54
  • 2
    $\begingroup$ @lightxbulb Oh, that makes sense. Thank you for the explanation, but why did you post this as a comment and not an answer? $\endgroup$ May 30, 2021 at 19:54
  • 2
    $\begingroup$ Because I didn't elaborate, I don't consider this answer worthy. And one can elaborate, with justification about what the ambient term does, and examples illustrating how it's useful. Thus other users can expand upon my concise comment. $\endgroup$
    – lightxbulb
    May 30, 2021 at 21:25

0

Your Answer

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

Browse other questions tagged or ask your own question.