A Real Page-Turner

June 28, 2010 by: Tom

Here’s a little bit of fiddling I did with pixelbender, the shader language that’s built into Flash these days.

I remember a time when the page-turning effect was the hottest thing around in flash, but most were just a clever combination of masks and gradients, at best. My effort uses the pixelbender filter to reposition and shade every pixel in a fairly realistic fashion, modelled on a simple hyperbolic curve (x^2 – y^2 = 1).

Play with it here (reacts to mouse movement within the flash box)

Get the source here

Tom-

Filed under: Code

Comments

10 Responses to “A Real Page-Turner”
  1. Lawrie says:

    Wow, that’s amazing! Double points for using Sonic The Comic too.

  2. Sir Saul says:

    I think you just made the page-turning effect the coolest thing in flash again. Pretty amazing effect!

  3. Jozef Chutka says:

    good job, I love it. I guess it will get smoother with sampleLinear()

  4. theron says:

    This is awesome! How difficult would it be to add a second image to use as a backside of the first page’s flip?

  5. sucho says:

    haha, needlessly gorgeous.. but i always turn from the top of the page – AHHH ITS SO FOREIGN TO ME

  6. [PBRB]Gabe says:

    I think the guys at http://www.stconline.co.uk/ might find this usefull. Also its well worth checking out if you liked the fleetway sonic the comic.

  7. bl33b says:

    haha! thats awesome! you should use that in one of your games XD

  8. tony787 says:

    As the page turns, start blurring it, but the part that folds, leavve it crisp, sharp and colorful. Anything thats NOT being “turned”, blur it just slightly and decrese the color just as slightly. The more the page “turns”, the more the unturning parts of the page become more blurred and desaturated. You do that, and it’ll make the page turning effect a LOT more realistic. But good job on what you got for now though. Here’s hoping for the final result 🙂 !
    -tony

Leave a Reply