0
$\begingroup$

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

$\endgroup$
2
  • 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 Nov 28 '20 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 Nov 28 '20 at 10:33
2
$\begingroup$

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).

$\endgroup$
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 Nov 28 '20 at 16:02

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.