在iOS中渲染水性涂料 [英] Render water-paint in iOS

查看:76
本文介绍了在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天全站免登陆