brianchirls / Seriously.js

A real-time, node-based video effects compositor for the web built with HTML5, Javascript and WebGL
MIT License
3.88k stars 354 forks source link

FFT effect node #64

Closed positlabs closed 10 years ago

positlabs commented 10 years ago

It would be nice to have an FFT node. Personally, I just want to play with it... but in general it's incredibly useful for signal processing.

Probably, the best solution would be to find a version of FFTW that runs as shader code. I'm not sure how feasible this is, but it seems like FFTW is the fastest FFT algorithm out there.

brianchirls commented 10 years ago

This may be possible, but not easy. What do you think you'd do with it?

http://wildabc.github.io/WebGL/FFTDroplet.html

positlabs commented 10 years ago

Probably not fluid sims :). I'm interested in using it to compose glitch effects.

brianchirls commented 10 years ago

Can you give some more specific examples?

positlabs commented 10 years ago

I'd like to apply an FFT transformation to an image, modify the result somehow, then reverse the FFT transformation to put the pixels back in their original locations. I think we could get some cool effects out of it.

Here's a good example of FFT used for image processing: http://www.imagemagick.org/Usage/fourier/

lselden commented 10 years ago

While great for audio effects, in my personal experience FFT is too unwieldy for effects in the visual domain.

If you're interested in glitch effects you may try translating some of the CIFilters/QC patches on this blog into shaders: http://machinesdontcare.wordpress.com/

Or the Rutt-Etra effect? https://github.com/v002/v002-Rutt-Etra

brianchirls commented 10 years ago

Yeah, I think @lselden is right. Most of those effects can be done more directly, like blur and contrast adjustment, etc.

Yeah, Rutt-Etra's been on my list for a while.

positlabs commented 10 years ago

You have my vote for Rutt-Etra!

I may try experimenting with FFT using 2d canvas drawing. If I find some cool technique that would warrant a Seriously node, I'll let you know.