Hacker News new | ask | show | jobs
by zowie_vd 1221 days ago
I don't recommend adding black to get shadow colors — you're not going to get pretty colors if you take that approach. Shadows have a bit of a color of their own. What you need to do is think of the bounce light in the scene, and I'll use an example to explain.

First of all, if you've got a sphere in deep space, its shadow side is going to be pure black, since there's pretty much no light bouncing around, and so there's no light to be reflected by the shadow side of the sphere. Now let's take an indoors scene: Imagine a room with red walls, a white floor, a single neutral (white light) ceiling lamp and a white sphere in the middle, what color is the sphere's shadow going to be? In the red-walled room, the shadows of the sphere would be subtly red — especially in the parts of the shadow where it's facing the walls more than the floor. That's because the light you see in the shadows of an object is light that has already been reflected from other surfaces in the room. This reflected light, in the case of the red walls, is red.

Of course in a more complicated scene you just approximate it. For an outside scene, you usually want to make your shadows only a bit darker and move your shadow color's hue a little closer to the color of the sky. But colors are difficult, you learn through experience really.