4

I tried following cegaton's answer here to make a HDRI map more subtle, and the result produced generates a darker edge / drop shadow between the 3D objects and the background:

enter image description here

I am not sure what causes it.

MicroMachine
  • 4,611
  • 17
  • 62
  • 109
  • 1
    can you add an image of your compositing nodes? –  Aug 29 '17 at 17:53
  • 3
    It's because you're blurring the Environment pass. The environment is *not* inclusive of the area behind the building. In other words, there's a black hole where the building is and you're trying to blur it... therefore some of the blue is going to be darker around the edge. If you want to blur the environment, it would be better to use layers. – bertmoog Aug 29 '17 at 17:59

2 Answers2

8

It's because you're blurring the Environment Pass. The Environment Pass is not inclusive of the area behind the building. In other words, there's a black hole where the building is that's being blurred... therefore some of the blue is going to be darker around the edge.

enter image description here


I've been hoping and waiting for the Blender devs to include the capability of making only specific layers transparent. As far as I know, this doesn't exist yet.

If you want to blur the environment without having a halo and without having to save a separate render to disk and then composite the image to your scene, you can use the "Glass Sphere" trick.

1.) Set Transparent under Render Properties >> Film:

enter image description here


2.) Add a Sphere object (low poly) with Smooth Shading enabled and set the material to be Glass with a IOR of 1.0 and a Color of 1.0 White. Make it large enough to encompass your Camera and then Parent it to the Camera:

enter image description here


3.) Create two render layers... one for your setting and one for the sphere. Exclude the Sphere's layer from everything else (this ensures that the sphere itself doesn't affect the lighting on any objects in your scene). Set the Number of Samples on the Sphere Layer to 1 (it should only take a couple of seconds to render):

enter image description here


4.) After that, blur it as you were with the Environment pass:

enter image description here

EDIT: I forgot... the reason this works is because you now have a shader (albeit a perfectly clear shader) covering the camera plane. Blender must render the shader and all the rays that are affecting it, hence the environment on the other side of the glass must be visible. For obvious reasons, a Transparent shader will not work for this.

bertmoog
  • 6,106
  • 2
  • 19
  • 37
  • without adding extra geometry you can just add an empty render layer (one that does not contain objects) with the environment pass enabled, so that there is no masking. https://i.stack.imgur.com/aAgtK.png –  Aug 30 '17 at 01:14
  • 2
    @cegaton - You sexy devil. Why do I even answer when we have you around? – bertmoog Aug 30 '17 at 01:16
  • 1
    it's all good. I just like to share ideas. A lot of the times I get it all wrong... Like most of us, I'm just here to learn and share. –  Aug 30 '17 at 01:19
  • @cegaton - lol, you post and I'll just delete mine. – bertmoog Aug 30 '17 at 01:20
  • 2
    don't delete anything. We all come with different solutions. None is more or less valid. –  Aug 30 '17 at 01:21
6

As clearly explained by @bertmoog the envirionment pass is missing information.

As an alternative without adding extra geometry, you can just add an empty render layer (one that does not contain objects) with the environment pass enabled, so that there is no masking, blur it and use Alpha Over to composite other elements.