Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

How can I achieve a trippy visual drifting effect like the image is breathing?

See The Visual Components of a Psychedelic Experience - Visual drifting section or more precisely this fragment of this video.

Any software solution is fine, but I would be most thrilled with an implementation in Processing or Javascript

share|improve this question
    
What do you mean by an implementation in "Processing"? If you are trying to do this programatically, it may be a better fit for Stack Overflow. Can you also describe the effect more directly in your question? The youtube link you provide is already dead on copyright grounds and the other link could go dead in the future. While external clarifications are helpful, it is best if your question is still able to stand alone without them. –  AJ Henderson Mar 10 at 14:56
    
Processing is a programming lanuage geared towards video manipulation and visual effects. processing.org –  Jason Conrad Mar 10 at 18:19
    
BTW, you could probably hold a photo in front of the camera and move it around to get any effect you want. It won't look perfect, of course, but it's an option. –  BrettFromLA Mar 10 at 18:48

1 Answer 1

You can achieve an effect like this with a couple of distortion filters from most video editing or motion graphics packages. For example in FCPX/Motion, you could apply a couple of Bulge distortion filters to the upper right and lower left and adjust the scale and radius as appropriate.

In terms of implementing it yourself, I agree that it's a question for StackOverflow (once you've attempted to write it yourself). The algorithm is fairly straightforward. For all the pixels within the radius, apply a mapping function along the vector from the center to the current point. For example (in pseudo code):

distort (vec2 center, float radius, float amount)
{
    for (each pixel in the image)
    {
        vec2 dir = pixel.coord - center;
        float dist = dir.length()
        if (dist >= radius)
        {
            outPixel = pixel;
        }
        else
        {
            float percent = dist / radius;
            float newPos = pow(percent, amount);
            dir = dir / dist;
            vec2 newCoord = dir * newPos * radius;
            outPixel = getPixel(newCoord);
        }
    }
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.