Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render water-paint in iOS

I have been working with OpenGL in iOS, and setting the colors with glColor4f(r,g,b,a) and then drawing my own color on a white UIImageView. I basically have a brush, which is then moved around my user's touch, and then it paints the color onto the canvas. But this color needs to be water paint (like smudged color)

Does anyone understand/knows how to get a water color like this app does, and how the background UIImageView has a texture on it?

https://itunes.apple.com/us/app/hello-watercolor/id539414526?mt=8

or checkout water paint in this. http://www.fiftythree.com/paper

I created a bounty on this as I am really having a hard time to grasp how to derive such smooth flowing colors out of the normal colors. Even if you guys point me in the right direction, or to some sample code on how I can get the effect of water-paint, it would be really helpful ^_^

And as a bonus, it would be also be helpful if you can point out to me how to get canvas on which it is painted on looks realistic, and blended with the paint? Does Blending/GLSL have to do with any of this?

Is there any sample project on this?

like image 513
Legolas Avatar asked Oct 22 '13 05:10

Legolas


1 Answers

If you are still struggling with the basics of getting realistic looking water colors working, you may want to experiment/prototype in photoshop first.

http://www.zoepiel.com/tutorials/watercolor/ shows some very effective tricks for creating watercolor images with simple tools.

The most interesting one is to multiply a group of watercolor layers with a greyscale watercolor paper image. The texture of the paper makes some parts remain white, and other parts saturate with color, just like real watercolor.

Each layer remains 'wet' in the sense that the colors within it blend, but the layers are 'dry' with respect to each other.

She also explains some of her brush and blur settings and shows what they do.

Once you can produce the desired effect in photoshop, you'll have clear specifications of what you want to do and you'll be quite a bit closer to programming it out.

like image 124
flup Avatar answered Oct 13 '22 21:10

flup