6
$\begingroup$

I'm in the process of building a shadow catcher for a Cycles scene lit with a .jpg Environment Texture (equirectangular) - but it seems that the shadowpass will only work with a lamp in-scene.

I'd like my sun light to match the angle of the light from the Environment Texture. Can anybody think of a way to get the sun light angle from the Environment Texture without just eyeballing it?

--Rev

$\endgroup$
  • 5
    $\begingroup$ Do you know how sun clock works? You need to do the same thing: put a pole into the scene and measure the angle and distance of the shadow. Then you know where the sun is. $\endgroup$ – Jaroslav Jerryno Novotny Oct 22 '15 at 16:46
6
$\begingroup$

If the sun is clearly visible in the HDR, you can put a camera at scene origin, look around in rendered viewport mode and locate it.

If the sun is hard to locate precisely, you need to put a sun clock into the scene: put a vertical pole into the scene and measure the angle and distance of the shadow. Then you know where the sun is and how best to match the shadow.

enter image description here1

It will work for sunny HDRs with clear shadows the best. Also to get accurate shadows from HDR use environment setup like this.


For diffused shadow HDRs you will have to guess where the center of shadow is and how long it is, and substitude sun lamp for a point/spot lamp with some size. You can get the distance-size ratio from how the penumbra of the shadow looks:

enter image description here

$\endgroup$

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.