<p>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.</p>

CC BY-SA 4.0
2021-05-29T08:07:18.763Z
Because ambient is a hack used to substitute for the lack of indirect illumination. It is not physically based.
lightxbulb
CC BY-SA 4.0
2021-05-29T20:54:33.957Z
Most of the early graphic nodels arent very physically sound. Legacy has a tendency to stick around for a while.
joojaa
CC BY-SA 4.0
2021-05-30T19:54:56.047Z
@lightxbulb Oh, that makes sense.  Thank you for the explanation, but why did you post this as a comment and not an answer?
MothRemovalInProgress
CC BY-SA 4.0
2021-05-30T21:25:36.280Z
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.
lightxbulb
<3d><lighting><color><color-science>
Why do materials have both an ambient color and a diffuse color?
MothRemovalInProgress
# Why do materials have both an ambient color and a diffuse color?

(Asked by: username_0 on 2021-05-29)

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.

**Tags:** 3d, lighting, color, color-science

> **Comments:**
> **username_1**: Because ambient is a hack used to substitute for the lack of indirect illumination. It is not physically based.  
> **username_2**: Most of the early graphic nodels arent very physically sound. Legacy has a tendency to stick around for a while.  
> **username_0**: @username_1 Oh, that makes sense.  Thank you for the explanation, but why did you post this as a comment and not an answer?  
> **username_1**: 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.  

---

## 0 answers

