3

I want to use a hdri just for the light and i want to change the color of the background in white.How can I do that ?

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
Krenk
  • 179
  • 2
  • 4
  • 13
  • https://blender.stackexchange.com/questions/58272/making-an-emission-shader-emit-a-different-colour-of-light-than-the-colour-assig/58280#58280 https://blender.stackexchange.com/questions/53359/how-do-you-make-an-image-emission-without-washing-out-the-image/53360#53360 – Duarte Farrajota Ramos Jul 15 '19 at 10:16
  • Hello Duarte, i am not sure, but this are just solutions for cycles, right? Or do they also work in Eevee? – Chris Jan 28 '21 at 07:54

2 Answers2

7

A flexible way would be to use compositing, as shown here. That would let you change the background to anything you like, at later stages.

A more destructive way is to use a Light Path node in the World's node tree:

enter image description here

(Select 'World' in the Node Editor's header, as opposed to 'Object')

With HDRI background visible to camera:

enter image description here

Without:

enter image description here

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
  • I had to use some real magic numbers to try to fit the jpeg into the camera background as you describe... and it still seems to be mapped to a sphere, rather than being the actual flat image. Any way to get it to be flat in a world material? – eobet Mar 04 '21 at 13:05
  • 1
    @eobet 'the' jpeg? :) ... none in this answer. There's an equirectangular HDRI environment-texture, designed to be projected on a sphere. The World is at infinity, so only knows about normals. You could put your jpeg as a plane into your scene, and shoot it as part of an equirectangular environment.. There might be some maths you could do instead, you could go ahead and post a question on that? – Robin Betts Mar 04 '21 at 14:46
  • Sorry, I should have clarified... I did not use a solid background color like you did, I put a jpeg in there instead... and for some reason, Blender maps it to a sphere. – eobet Mar 05 '21 at 08:08
  • 1
    Yup, got that... I still suggest, post: 'How do I put my rectangular picture into a world texture?' One way, already answered in the link.. but if you want to do it with maths instead, I think that would be another answer. – Robin Betts Mar 05 '21 at 08:23
  • Thanks! I didn't understand the linked post as first, but I will have another look. – eobet Mar 05 '21 at 10:20
2

There are 2 easy ways of doing that. In both cases you need to set "Transparent" in Film render properties. Then you can spread a white plane behind the scene (switching off all Ray Visibility Cycles settings except Camera) or use Alpha Over node in Node editor and drop the render result over the white color.

Mzidare
  • 4,280
  • 1
  • 10
  • 24