1
$\begingroup$

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

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

$\endgroup$
  • $\begingroup$ Make your lights weaker. $\endgroup$ – lightxbulb Nov 18 '20 at 18:41
  • $\begingroup$ The shadow and non shadow areas change in same proportion together, when changing the lights intensity. $\endgroup$ – ali Nov 19 '20 at 7:32
  • $\begingroup$ As is to be expected. If you want to change only the ratio then you don't have many options except tonemapping. $\endgroup$ – lightxbulb Nov 19 '20 at 8:47
2
$\begingroup$

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

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

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

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).

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – ali Nov 18 '20 at 11:30
  • $\begingroup$ @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. $\endgroup$ – Kevin Reid Nov 18 '20 at 14:57

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.