3
$\begingroup$

Almost 90% of the time I light my scenes with an HDRi background.

Is there a way to control the virtual distance of the background image so I can control bokeh and blurriness of the image when using depth of field?

Or is baking the texture onto another object the way to go?

Why do i need to do this?

I have different HDRis for different things. for Example:

  • A sunset sky
  • A cloudy sky
  • A parking lot with buildings that are close by

In the real world the buildings of the parking lot are a lot closer to the camera than the clouds of the sky and thus need to react differently to the depth of field of the camera.

My Node setup for this is pretty standard: enter image description here

$\endgroup$
  • $\begingroup$ If your parking lot hdri has an alpha channel, you could use large spheres? (It's just not very convenient for navigating, right?) $\endgroup$ – Leander Jul 3 '18 at 12:07
  • $\begingroup$ I don't mind the whole image being the same distance away (like in the parking lot case: sky and buildings would have the same blurriness. That's fine). It's more about: "Well this hydra consists of mainly near objects so it needs to be less blurry). $\endgroup$ – bstnhnsl Jul 3 '18 at 12:26
  • $\begingroup$ Related: blender.stackexchange.com/questions/48240/… $\endgroup$ – user1853 Jul 3 '18 at 14:14
  • 1
    $\begingroup$ There are multiply ways to do this, depending on how you want to store the pseudo-depth for your HDRI. (Remember, it won't be right, there's no parallax.) Storing depth is the first step. If you do make a copied HDRI containing only depth values, you can render that as an emission to a different layer and set depth equal to min of depth(layer1), color*constant(layer 2).. Or, possibly, use a UV pass, but I'm not sure offhand if world will show UV.... $\endgroup$ – Nathan Jul 3 '18 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.