4
$\begingroup$

I'd like to create an animation (mp4 video) with a completely white background and use a hdri environment texture for lighting.

If it was just an image I'd have no problems, simply by setting Film to Transparent under Render options and then the PNG to RGBA, I could easily add a white background to the image subsequently using some photo editor.

But what about animations? If I do the same thing, so I set Film to Transparent, the video gets a black background.

Is it possible somehow?

$\endgroup$
  • $\begingroup$ Wait, so you wan't a white background or a transparent background? I can do white + HDR lighting without transparency in cycles if that is what you want. $\endgroup$ – GiantCowFilms Oct 17 '15 at 12:52
  • $\begingroup$ Note: I don't think blender supports any video formats with transparency, so you will have to do the white in blender, or render as an image sequence and use a second program. $\endgroup$ – GiantCowFilms Oct 17 '15 at 12:53
  • $\begingroup$ I want a white one. I just didn't know any other way to do this than using the Film > Transparent function if at the same time I also want a hdri lighting. Or maybe turning off the camera ray for world? It would keep the hdri lighting while preventing the image to be seen in the background. But then the background becomes pure black.. how can I make it white? Compositing maybe? I'm just thinking out loud.. What solution do you have? $\endgroup$ – tom Oct 17 '15 at 14:06
4
$\begingroup$

This one uses transparent option in the render panel.

With use transparent checked, we can use the compositor to add in the white background before blender saves the file.

Check use nodes in the compositor, and then add the alpha over node, and drop it between the render layer and the output, and voila, we have our white background!

enter image description here

$\endgroup$
  • $\begingroup$ This is a better solution than the other one below as this one works also then if there is a masking layer in the scene. $\endgroup$ – tom Nov 2 '15 at 11:09
  • $\begingroup$ @tom okay good, I added so you could pick which one you like. :) $\endgroup$ – GiantCowFilms Nov 2 '15 at 15:43
4
$\begingroup$

To create a colored background with and HDR we want everything but the camera to see the world as the HDR, and the camera to see it as white. To do this we can use the Light Path node. use the Is Camera Ray attribute to see if the camera is what is looking at the sky, if it is, show white. If not, show HDR.

enter image description here

$\endgroup$
  • $\begingroup$ This is worthwhile info and thank you for this. I have saved your nodes to my notebook. $\endgroup$ – Rita Geraghty stands by Monica Nov 15 '18 at 9:53

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.