0
$\begingroup$

When rendering out an image and compositing it with lens distortion it puts on a black background which I don’t want because I want the image to have a transparent background. Is there a workaround this like a button or more compositing setup I need to do?

$\endgroup$
2
  • $\begingroup$ Did you try a Set Alpha node ? Quick testing on a duplicate of Lens Distorsion on alpha channel seems to work. $\endgroup$
    – Lutzi
    Commented Mar 14 at 23:53
  • $\begingroup$ @Lutzi could you show me an example mode setup? I’m still new to the compositor $\endgroup$
    – Bludus
    Commented Mar 15 at 1:10

1 Answer 1

4
$\begingroup$

Lens distortion with alpha

I can't guarantee it's the best way to achieve that. Visually, it seems to match the expected behavior. So I would say, it's good enough until you run into some issue.

  • Have Render tab > Film > Transparent enabled
  • Repeat the Lens Distortion node for the alpha input
  • Set Alpha will change the alpha channel to what is connected to it
  • For ease of use, I would suggest connecting both parameters of Lens Disortion to a Value node. So that you tweak both nodes the same.

Lens distortion with alpha channel

If you're confused about the alpha channel, you can think of it as a black and white image representing the transparency. Black = 0 = transparent, white = 1 = non-transparent, with any shade of gray for semi-transparency. Alpha channel is an universal denomination (not Blender-only).

$\endgroup$
8
  • 1
    $\begingroup$ The only thing worth mentioning is maybe that the color of the Dispersion is dependent on the colors of the image, object as well as background. So the resulting colors will always look as if you had a black background, unless you use an Alpha Over node before plugging the image into the Lens Distortion to give it a different tint. $\endgroup$ Commented Mar 15 at 10:37
  • $\begingroup$ @GordonBrinkmann That's interesting. It should be visually correct if background gets the same Lens Distortion, right ? Or do you think Lens Distortion should be applied to subject and background altogether ? $\endgroup$
    – Lutzi
    Commented Mar 15 at 13:22
  • 1
    $\begingroup$ I don't know what the OP needs the lens distortion with a transparent background for, if it should be composited over varying backgrounds, it would be incorrect dispersion if it would look the same on different backgrounds since it changes dependent on color. If the OP knows which background to place it on before (and would apply the same dispersion to it), then having it on a transparent background is useless, the layers could be merged before using lens distortion. If it should later be composited over something (maybe in PS), then I thought it should be noted that the color might be wrong. $\endgroup$ Commented Mar 15 at 13:37
  • $\begingroup$ @GordonBrinkmann I would use a different software like PS but I just wannna just do it in like one software instead of many, making the most use of blender as possible because it can take up the ram on my pc and it’s also time consuming. The reason why I want lens dispersion with a transparent background is because I don’t usually like backgrounds mostly. I also need it to import to animation software and other stuff. $\endgroup$
    – Bludus
    Commented Mar 15 at 18:01
  • 1
    $\begingroup$ @Bludus Well, it is not a correction, it is more like intentional degradation in Blender. In real cameras lens distortion and chromatic aberration are flaws, imperfections of lenses, especially of lower quality which some photographers correct by removing it with software. So I would adding it in Blender rather not call a correction 😉 But when you just it for some dramatic effect, I guess the colors should not matter - however, if you sometimes want to get a different color for the dispersion, you can do this by underlaying different backgrounds before the lens distortion. $\endgroup$ Commented Mar 15 at 19:29

You must log in to answer this question.

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