Quote:
Originally Posted by josh
Cheers - looks good.
Any hints on how you went about this? Also; any ideas of how you would get a smudging effect ie instead of clearing the area you move them with the finger (if that makes sense)?
|
I am not entirely sure what do you mean by a smudging effect.
If you mean true real-time transformations ( the way Photoshop handles Smudge Tool) then there is not much choice but doing it on the CPU which would be slow (mostly because you would have to reupload the resulting texture on every frame).
The way I handed it was to render to texture a black/white mask in response to user actions and use the mask texture as an alpha image when rendering two textures ( the background and the foreground.) to the screen.
I am not sure how would it work for you, but theoretically you could have two versions of the same image, one containing your pristine image and another a smudged version of it and use the same approach to mask them based on user input.
Another way would be to use a grid approach - which is essentially an image rendered on a grid of quads and then get the desired effect by manipulating quad coordinates.
Given dense enough mesh, it works fine for all kinds of image transformations.
Here is an example ( using low res grid designed for a specific effect - you would have to use denser mesh)
http://www.warmi.net/tmp/Image.mov