View Single Post
Old 20th May 2006, 04:15   #15  |  Link
actionman133
Movie buff & shine
 
Join Date: Jan 2004
Location: Logan, the only hole above ground.
Posts: 257
I think this might be the true bloom

I should first say that I should renounce the first function that I posted, as it was a glow filter, one that makes it look like objects were emitting more light, not reflecting light.

This one should be a more accurate bloom. It works similarly to ones previously posted, but changes a couple steps. Rather than simply blending a blurred version of the clip with itself with low opacity, it uses Overlay's "add" mode at full opacity, combined with a mask based on the brightness of the blurred clip. Using "add" guarantees the the clip will only brighten the darker parts of the image, and the mask prevents excessive blooming in dark areas of the image (which normally wouldn't bloom).

NOTE: this has only been tested with YUV data, and it REQUIRES Donald Graft's plugin port of VirtualDub's BoxBlur. Download it at http://www.neuron2.net

threshold: the strength of the bloom. Values from 0-255, default 255. Decreasing the threshold will enhance the bloom effect. Lower values can add a 'dreamy' effect to the clip, but going too low can produce muddy shadows.

radius: increases the size of the bloom. Default is 1/120 of the clip's width.

Code:
Function Bloom (clip Last, int "threshold", int "radius") {

LoadVirtualDubPlugin ("BoxBlur.vdf", "BoxBlur")
radius = Default (radius, Round (Width / 120.0))
threshold = Default (threshold, 255)
threshold = Round (Threshold * 219 / 255.0) + 16

bloom = ConvertToRGB32 ("pc.601").BoxBlur (radius, 3, 1000).ConvertToYV12 (matrix = "pc.601")
bloommask = bloom.Tweak (sat = 0, coring = false).Levels (16, 1, threshold, 0, 255, false)
Overlay (last, bloom, mode = "lighten", mask = bloommask)

}
__________________
I'm a boxer who can Bob () & Weave (). I like to Overlay () punches and Blur () his vision to ShowFiveVersions (). My KO punch will always Pulldown ().TimeStretch () and all he will hear is Tone ().

Last edited by actionman133; 20th May 2006 at 04:17.
actionman133 is offline   Reply With Quote