Blur applies bokeh to front and matte :(

Hi All.
Question about the Blur node.
I have a prmultiplied front and want to blur it (front and matte) using the blur node in defocus mode.
Problem, if I turn on Blooming in the blur node, it applies the blooming on the front but also on the matte which doesn’t make any sense and breaks the Premult workflow…
Is there a way to apply the blooming only to the front. (other than blurring before premulting the front and the matte which isn’t always possible for exemple if I receive from 3G an image already premultiplied…

Not sure I’m clear enough. Let me know if I can add infos…
Thx folks

I would just dupe the blur mode, run the matte through its own duplicated blur node and turn the blooming down on the matte blur.

Done that but it still creates Premultiplication problems on the edges unfortunately… :frowning:

Unless I’m missing something, I was under the impression that whenever you’re performing the same operation to the Matte and Fill or the front and the matte, you ought to do them in a pre-multiplied state. If that’s breaking for some reason, then divide the RGB by the alpha and do your Bloom there and feed and multiplied image into action. Right?

Blooming is a legacy thing and it’s best to ignore it. Instead color correct the highlights of the image before multiplying it with the matte.

After all that is done, then run it through the blur with bloom set to 1 and it’ll all divide out fine afterwards.


It took me way too long to realize this is the way


You’re right, the absolutely correct way to do is First you premultiply the font by the matte then you blur both with the exact same setting. My problem is that , the slider called “blooming” in the blur node (which actually makes a bokeh effect on the brightest parts of the front) also applies the “bokeh” effect on the matte and completely breaks the premult benefit. And sometimes, I just cannot divide the front by the matte as they are elements I get from CGI for exemple. Then the divide would have almost no effect and the blur would introduce black edges on my front…

A was expecting a way to apply the bokeh on the front only, not the matte, and far enough from the edges to maintain, the premult state of the edges for later comp.

By Blooming, I mean the Bokeh effect provided by this blooming Slider.

Would there be a way then to keep front and matte blur value the same to maintain premult benefit but still add bokeh to the front? (Knowing that, if it’s a front a have in flame, I can apply the blur with bokehs on the front prior to multiply it by the matte but when it"s a element I receive from CGI or Nuke, as it’s already premultiplied, I cant’ do that (as dividing would have almost no effect unless there is already a motion or depth of filed blur)…

Yeah, I know the slider you mean. When I made the “circle ring outline” preset I set that value to 5. Years later I had to put in a tiny feature request to set the value of the preset to 1 because of exactly the issue you are having.

The reason it doesn’t work is because it’s applying a color correct to the highlights in order to boost the bokeh, but it’s doing it to a multiplied front, so even if you have two identical blur nodes with one boosting the blooming and one not, the image still won’t divide out on the other side.

ok, so a workaround would be to premult the front, blur front + matte with no bokeh and comp it over the background, and in another step, extract from the front the highlights we want with a 2D Histo or whatever you like, use another tool to create just the bokehs on that layer (for exemple with LS Lens_Blur or any tool you prefer), and comp that back over your first result.

I’ve just tested that quickly and it works.

Does that make sense?

it does, but my original approach up above is more straightforward.

A brighter image is going to bloom more, so by making the highlights in the incoming image (prior to being multiplied with the matte) brighter, you get the bloom effect for free.

with an ACES image you shouldn’t techincally need to bloom anything at all. the slider was put in to simulate how a bokeh bloom looks in real life because SDR video images don’t have enough value in the highlights to look nice.

OK, I have to say that I’m currently on Rec709 images (sorry) and even brightening the image before premult doesn’t look like what I expect. I really want to get these rounded bokeh. Plus, If I do that prior to premult, there is a chance that a bokeh close to the edge will get cut by the matte in comp.
What I like in comping them in a second step is that they or not cut anymore, bleeds on the background and it helps a lot with selling the comp.
Am I missing something?

rec images are fine. haha. they should still work for the trick unless the image is 8 bit. 8-bit images get a meta-auto-clamp in Batch so you can’t boost the highlights way up.

Even if the matte chops off part of the image when multiplying, the bokeh kernel will expand into the unmatted area so i’m not entirely sure what the issue would be. Can you post an example?

Even if you’re working in Rec709, switch the plate or element you’re blurring into linear (ACESCg, or whatever flavor you choose, don’t use the flame “linear”), blur, switch back to Rec709. Not for the entire comp, grant you. Just for the elements/ plates you’re blurring. Linear blurs are the way. This won’t fix the premultiplication issue when it comes to the blooming slide, but there’s a chance you won’t need to touch that at all, in which case the premultiplication will be fine, if your linear blurs bloom out nice.


@randy and @andy_dill doing things the right way :roll_eyes:

Are you kidding me? I’m a button masher. You know that. Most of the things I’ve learned are only because I open my big fat mouth and started a website for teaching this stuff.

Not really right now. It is just a problem I encounter quite often and even if I usually find ways to achieve what I want, I think it’s not normal that I don’t have a more solid solution. I mean I only use Flame for 25 years now so maybe it’s normal…

Did you try converting into ACEScg? Did that give a better result without having to crank blooming up?

In addition to what Andy Dill says, I like to pull the right hand side of the kernel control all the way up. That way you get nice round bokeh that matches most plates much better.
Use a viewer LUT inverted to get very bright highlights in the original.
And don’t comp in video, because it’s not scene referred and so you have to cheat with cheapo effect like ‘blooming’.

1 Like

You can go pretty crazy with the color correct before the blur. Sometimes its hard to get those nice bokeh without pushing it until the color is “broken,” but thats fine because you can just invert the color correct after the blur to get back to where the color should be.

1 Like