在 iOS 中渲染水彩画 [英] Render water-paint in iOS

查看:17
本文介绍了在 iOS 中渲染水彩画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在 iOS 中使用 OpenGL,并使用 glColor4f(r,g,b,a) 设置颜色,然后在白色上绘制我自己的颜色UIImageView.我基本上有一个画笔,然后围绕我的用户触摸移动,然后将颜色绘制到画布上.但是这个颜色需要是水性漆(像晕染的颜色)

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)

有没有人了解/知道如何像这个应用一样获得水彩画,以及背景 UIImageView 如何在其上添加纹理?

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

或在此结帐水漆.http://www.fiftythree.com/paper

我为此创造了一个赏金,因为我真的很难掌握如何从正常颜色中获得如此流畅的颜色.即使你们指出我正确的方向,或者一些关于我如何获得 water-paint 效果的示例代码,它也会非常有帮助^_^

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 ^_^

作为奖励,如果您能向我指出如何使画布看起来逼真并与颜料混合,这也会很有帮助?Blending/GLSL 是否与这些有关?

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?

推荐答案

如果您仍在为获得逼真的水彩效果而苦苦挣扎,您可能需要先在 Photoshop 中进行实验/原型制作.

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/ 展示了一些非常使用简单工具创建水彩图像的有效技巧.

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.

一旦您可以在 Photoshop 中产生所需的效果,您就会对想要做什么有明确的说明,并且您将更接近于对其进行编程.

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.

这篇关于在 iOS 中渲染水彩画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆