Re: [Tuxpaint-devel] New "Bloom" effect added
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2023-02-28 06:42:26
|
On Sun, Feb 26, 2023 at 03:28:03PM +0100, Karl Ove Hufthammer wrote: > Bill Kendrick skreiv 07.02.2023 10:43: > >I got a little obsessed over the "bloom" effect, and was struggling to > >understand Fast Fourier Transforms to get it done. Maybe some day. > >In the end, I brute-forced it and came up with an okay-looking (if not > >awesome, and not fast) effect. It's in the Git repo, please try it out. > > I’m sure the math is complex, but at least on my system, it just > looks like a *very* subtle ‘lighten’ effect. It's meant to add a fringe around light parts of the image, to simulate how bright lights affect how things look to a camera or even to human eyes. Here's an example where I created a brown background, with a slightly lighter brown radial gradient, then drew some basic color bars (white, yellow, cyan, green, etc.). The 'glow' seen comes entirely from the bloom effect being applied. https://pbs.twimg.com/media/Fp9DImxacAA-Bj2?format=png&name=small Frankly, I would have loved to implement it using Fast Fourier Transforms, but _that_ level of math has eluded me so far. > And at first, I didn’t think it worked *at all*, as the thing I was > drawing disappeared as soon as I let go of the mouse button. But > after a bit more testing, I see that it does lighten (non-dark) > areas somewhat and adds a (too) subtle glow effect. Okay, I've tried changing "BLOOM_WEIGHT_CONST" from 0.025 to 0.05, basically doubling it, and it's more obvious, without being too overwhelming, I think. -bill! |