I want to set bg pixel values to 0 (black) but when I change the color of world, the pixel values of bg become more than 1 due to lights. When disabling lights, rendered image gets plain black image including my object. I am using blender 2.8.

Is there any way to set pixel values of background to 0 when rendering?

EDIT I'm not using any effect on the world. The rendered image background looks plain black but when checking it with python, it's not.

enter image description here

enter image description here

Here's the rounded 1s distribution. the white pixels were 1s.

enter image description here

  • 2
    $\begingroup$ To have a completely black world, just disconnect all nodes in the world section. The lights will not light the world though. Are you using volumétrica (smoke, haze, fog or bloom)? $\endgroup$
    – no-can-do
    Commented Nov 28, 2020 at 4:16
  • $\begingroup$ I don't know PIL, but so many (maybe) white parts should be visible. There can be rounded values in png format, try to export as exr (looseless) format. $\endgroup$
    – lemon
    Commented Nov 28, 2020 at 10:33

1 Answer 1


As @no-can-do mentioned in the comments, you would have to go in the world part of the shader editor.

If you want to keep your environment light you can use a setting like the following.

"Is camera ray" will drive the background color.

If it is a ray from the camera (rendered), the value is 1 and the "mix color" will give black.

If it is not the value is 0, the ray will be from the texture and will light the scene.

enter image description here

Note: if you're not using accurate texture format (openEXR), you may have rounded RGB values (i.e: 0.000something becomes 1).

  • $\begingroup$ Thanks you for your reply. I manually changed the rounded 1s to 0 in png because I'm not familliar with exr file. :) $\endgroup$
    – guest02212
    Commented Nov 28, 2020 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .