<p>The problem is that if you have 8 light sources (as your test image appears to have), then anything that is under only one shadow will be 7/8ths of full brightness, which is a fairly small change. Anything other than that is <em>unphysical</em>, so it'll be hard to convince your raytracer to produce a different result by changing the lighting.</p>
<p>Instead, after rendering the image, you can apply some kind of <strong>nonlinear</strong> processing of the image colors so that that 1/8th difference stands out more. In your second image, this seems to have been done by directly replacing the light gray fully-lit areas with white, but a more proportionate, yet still very visible, result could be achieved with a simple &quot;levels&quot; color edit applied to the whole image to increase contrast, as I've done for this version of your first image:</p>
<p><a href="https://i.sstatic.net/5dj8o.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5dj8o.png" alt="Levels edit" /></a></p>
<p>By pushing light gray to white, and darker grays more to black, the contrast in the image is greatly increased. The cost is that the building shapes are dark and hard to see.</p>
<p>To make the buildings look better and stand out, you could render your buildings a second time without any ground (so the resulting image has a transparent background), then layer that on top of the color-edited image, so that they are unaffected by the contrast adjustment.</p>
<p><a href="https://i.sstatic.net/RwjlZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RwjlZ.png" alt="Levels edit with original buildings overlaid" /></a></p>
<p>It might be a good idea to use color to help distinguish the buildings from the shadows. In particular, I'd suggest avoiding making buildings <em>gray</em> (or, more generally, colored the same as the sunlight). Here I've used a &quot;color temperature&quot; edit on the above to make the buildings layer bluer and the shadowed ground layer yellower (probably too much):</p>
<p><a href="https://i.sstatic.net/98ESc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/98ESc.png" alt="Color temperature edit" /></a></p>
<p>Of course, this is all rough examples based on quickly editing your sample image; I think you can produce very legible and elegant results by taking these ideas and doing them better (by being able to adjust your raytracer lighting <em>as well as</em> postprocessing the image, and rendering a separate buildings-without-ground image as I suggested).</p>

CC BY-SA 4.0
2020-11-18T11:30:49.960Z
That was perfect. Thank you very much. couple of questions: could you elaborate how you did the "simple "levels" color edit"? Did you first made the ground transparent and then adjust the color level?
ali
CC BY-SA 4.0
2020-11-18T14:57:20.973Z
@ali No, I did not do any masking or editing of individual areas. The ground is white because I adjusted the white level so the light gray became white; there's no transparency. In the second image with the restored buildings, I used transparency, which I got by deleting the ground and shadows with a "magic wand" selection tool. For an automated process, you should render it with a transparent background (or a color key, if your raytracer can't output transparency). Remember, that's a *separate render* from the version with shadows. Don't try to make the shadows transparent; that won't help.
Kevin Reid
CC BY-SA 4.0
2020-11-18T00:35:11.983Z
2020-11-18T14:52:52.673Z
2020-11-18T14:52:52.673Z
Kevin Reid
<p>I want to render the transient shadows due to the sunlight over a day in one image. So I placed all the suns, as directional light, in the scene. However the shadows in the rendered image(a raytraced image) are too bright and so they look very much faded(below image). This is understandable as there is just too much light from all those suns.</p>
<p><a href="https://i.sstatic.net/76tcL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/76tcL.png" alt="enter image description here" /></a></p>
<p>Basically I am trying to achieve an image similar to the below one, where all shadows are distinguishable and not that soft. However I cannot think of any way to achieve this. I appreciate anyone's help.</p>
<p><a href="https://i.sstatic.net/UivIy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UivIy.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2020-11-18T18:41:43.280Z
Make your lights weaker.
lightxbulb
CC BY-SA 4.0
2020-11-19T07:32:29.257Z
The shadow and non shadow areas change in same proportion together, when changing the lights intensity.
ali
CC BY-SA 4.0
2020-11-19T08:47:42.873Z
As is to be expected. If you want to change only the ratio then you don't have many options except tonemapping.
lightxbulb
<shadow>
Too soft shadows from multiple suns
ali
# Too soft shadows from multiple suns

(Asked by: username_0 on 2020-11-16)

I want to render the transient shadows due to the sunlight over a day in one image. So I placed all the suns, as directional light, in the scene. However the shadows in the rendered image(a raytraced image) are too bright and so they look very much faded(below image). This is understandable as there is just too much light from all those suns.

[![enter image description here](https://i.sstatic.net/76tcL.png)](https://i.sstatic.net/76tcL.png)

Basically I am trying to achieve an image similar to the below one, where all shadows are distinguishable and not that soft. However I cannot think of any way to achieve this. I appreciate anyone's help.

[![enter image description here](https://i.sstatic.net/UivIy.png)](https://i.sstatic.net/UivIy.png)

**Tags:** shadow

> **Comments:**
> **username_1**: Make your lights weaker.  
> **username_0**: The shadow and non shadow areas change in same proportion together, when changing the lights intensity.  
> **username_1**: As is to be expected. If you want to change only the ratio then you don't have many options except tonemapping.  

---

## 1 answers

### Answer by username_2 on 2020-11-18. Score: 3 | Accepted answer

The problem is that if you have 8 light sources (as your test image appears to have), then anything that is under only one shadow will be 7/8ths of full brightness, which is a fairly small change. Anything other than that is *unphysical*, so it'll be hard to convince your raytracer to produce a different result by changing the lighting.

Instead, after rendering the image, you can apply some kind of **nonlinear** processing of the image colors so that that 1/8th difference stands out more. In your second image, this seems to have been done by directly replacing the light gray fully-lit areas with white, but a more proportionate, yet still very visible, result could be achieved with a simple "levels" color edit applied to the whole image to increase contrast, as I've done for this version of your first image:

[![Levels edit](https://i.sstatic.net/5dj8o.png)](https://i.sstatic.net/5dj8o.png)

By pushing light gray to white, and darker grays more to black, the contrast in the image is greatly increased. The cost is that the building shapes are dark and hard to see.

To make the buildings look better and stand out, you could render your buildings a second time without any ground (so the resulting image has a transparent background), then layer that on top of the color-edited image, so that they are unaffected by the contrast adjustment.

[![Levels edit with original buildings overlaid](https://i.sstatic.net/RwjlZ.png)](https://i.sstatic.net/RwjlZ.png)

It might be a good idea to use color to help distinguish the buildings from the shadows. In particular, I'd suggest avoiding making buildings *gray* (or, more generally, colored the same as the sunlight). Here I've used a "color temperature" edit on the above to make the buildings layer bluer and the shadowed ground layer yellower (probably too much):

[![Color temperature edit](https://i.sstatic.net/98ESc.png)](https://i.sstatic.net/98ESc.png)

Of course, this is all rough examples based on quickly editing your sample image; I think you can produce very legible and elegant results by taking these ideas and doing them better (by being able to adjust your raytracer lighting *as well as* postprocessing the image, and rendering a separate buildings-without-ground image as I suggested).

> **Comments:**
> **username_0**: That was perfect. Thank you very much. couple of questions: could you elaborate how you did the "simple "levels" color edit"? Did you first made the ground transparent and then adjust the color level?  
> **username_2**: @username_0 No, I did not do any masking or editing of individual areas. The ground is white because I adjusted the white level so the light gray became white; there's no transparency. In the second image with the restored buildings, I used transparency, which I got by deleting the ground and shadows with a "magic wand" selection tool. For an automated process, you should render it with a transparent background (or a color key, if your raytracer can't output transparency). Remember, that's a *separate render* from the version with shadows. Don't try to make the shadows transparent; that won't help.  

---

