# Should I add a sun lamp when using an hdri environment?

In experimenting with an hdr environment texture for the World (with Cycles), I do not see very pronounced shadows in my scene even though the image has an uncloudy sun. I expect my objects to cast shadows because even though the sky is bright, the sun is much brighter.

For outdoor scenes, is it typical practice to use a Sun lamp in addition to the environment texture or am I missing some other setting?

• You might be interested in this post on Blender Nation. – gandalf3 Dec 30 '13 at 2:07
• Very informative post. Thanks very much for the link. – jrboddie Dec 30 '13 at 4:17
• Yes, you must. Because the hdr environment only casts sky lighting. – user2007 Dec 30 '13 at 6:29

Depends how your hdr looks like. If there is a bright light source, then you might increase contrast for the hdr.

Standard setup gives result like this:

If you increase a contrast:

You can multiply or perform any other mathematical operation to get the brightness and the contrast you like.

Also if you'd like to keep the background plate with the original colors, you could mix in original, unchanged background like this:

• I like this approach and will give it a try today. In your second node setup ( to display the background itself), shouldn't the Environment Texture be set to 'Color'? – jrboddie Dec 30 '13 at 15:50
• Thanks to all that responded but I am marking this as the answer because provides the solution for my problem -- how to get shadows from ibl without using a lamp. For Blender, the answer is to modulate the Strength property of the background with the image. There are several node setups that do this. The one that I found that works best for me is at the end of this blog post. Also, I found that it is very important to enable Multiple Importance Sample in the World panel. – jrboddie Dec 31 '13 at 14:40
• Yes, the Multiple Importance Sample is important for hdr's that have dark and bright spots, I should have mentioned that too. It gives the bright areas of the hdr higher priority to cast the light rays for the camera and it makes perfectly sense, since it's the bright areas that give more light. It's a little less accurate (but almost unnoticable), but cleans up noise a lot faster. – kilbee Jan 1 '14 at 12:25
• Oh as for the color space for the Environment texture - I'm not really sure how it works for cycles, but from what I have experienced it doesn't really matter (I may be mistaken here though, so double check this statement) for the background if you pick color or non-color data. The latter simply uses linear color space, which is important for hdr images and helps operating on them for brightness and contrast space, not to mention that it provides much more information on the color. Anyway cycles should handle both in the best way. – kilbee Jan 1 '14 at 12:30

Using just a HDR-Environment map leads to less pronounced shadows, you need some objects in the scene to receive the shadow (here just a plane).

HDR environment map from http://www.hdri-hub.com/free-samples more free HDR samples at openfootage

You could add a Hemi-Lamp at a position close to the image's sun get well pronounced shadows:

For comparision the hemi-lamp has been changed by a sun.

• I see how that could work, but I thought that it was more common to use hemi lamps as a fill light. The HDR image is doing that. The sun lamp gives more realistic outdoor shadows, no? – jrboddie Dec 30 '13 at 15:40
• When using an additional sun instead of a hemi-lamp in the scene the shadow wouldn't be sharply demarcated. I would say it depends on the detail and scene which one is more believable. I added another image for comparision, – stacker Dec 30 '13 at 15:51