This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Virtual Playhead and Motion Blur Demo

"Perfectly Synching Hamster Gyro"

Code remix by subpxiel

Version 0.2, 2009-01-29

Idea started with Hamster Gyro Music Video Generator by Johan Larsby


Virtual Playhead

Temporal Anti-aliasing (motion blur)

I saw Johan's video generator program and was interested to find out what made it tick. I really should have written something like this last year when I had a need for supplying lyrics for music at parties... I'd had a bit of an experiment in another direction, using custom HLSL pixel shaders in the Neon v2 VJ software I use, but that proved to be painful and not especially useful!

Anyhow, when I looked inside the hamstergyro, aside from the world of pain of setting up those hundred or so timed lyrics entries, I saw that the method use to calculate the animation was a bit confusing and awkward. My first thought was to post a comment recommending Johan check out the lerp() and lerpColor() functions for future projects, and started typing some example code in the comments box to show how nice it might look in comparison.

I then realised the code probably would not be formatted properly in the comment, and I also didn't want to leave a suggestion to use code that I'd not actually tried out, sp downloaded the zip file and started hacking away to make sure it _would_ work the way I was suggesting. I may just have a use for this myself, so it seemed a worthwhile project to keep things tidy and make it easier to expend on in future! :o)

Of course, just testing out a couple of lerp() calls wasn't going far enough, and what I've ended up with is something I reckon is pretty cool. A kind of video transport system with a virtual playhead that can be controlled independently of Processing's current frame number and/or frame rate. I also had this brilliant idea to try out rendering in-between frames and blending them together for a nice motion blur effect. That part in particular I'm sure can be improved upon, but it is a nice start. :o)

In all, I'm pretty pleased with the result so far, and I'd like to thank Johan for the inspiration - seeing something done is sometimes all the motivation you need to go out and try it yourself.


Source code: spxlPlayheadDemo_1_1 spxlPlayhead spxlRenderResult spxlTimedImage spxlTimedItem spxlTimedText

Built with Processing