Simulating brush strokes for painting application

被刻印的时光 ゝ 提交于 2019-12-02 16:24:25

There's a large literature on Non-Photorealist Rendering. The main books are "Non-Photorealistic Computer Graphics" by Strothotte & Schlechtweg and "Non-photorealistic Rendering" by Gooch & Gooch. They discuss brush strokes. There are several of papers that deal with simulated brush strokes. See for instance "Simulating Artistic Brushstrokes Using Interval Splines".

Here's a classic from 1989 - Dynadraw, by Paul Haeberli. It uses a simple dynamical model to fill in a smooth the raw mouse positions.

While the strokes are drawn incrementally as polygons, you should be able to use the points generated by the dynamic filter to place copies of your brush texture.

The way I can think of would be to figure out the strength of the brush at each point in the line, and layer many uniform textures over it. Each texture would have an alpha value corresponding to "how hard" the brush is pushing down on the canvas at that location. The function to figure out how hard the brush would be pushing down would probably have to be correlated with the input.

If you go into a tool like Photoshop or GIMP, and observe how it implements the paintbrush tool, it should be pretty easy to simulate something close to it.

Check out NPRQuake, they might have an effect you like.

Not exactly what you're asking for, but I've found that applications that use line smoothing (like Adobe Ideas on the iPad or Doozla on the Mac) make for more realistic and eye-pleasing brush strokes, as you don't get the un-natural "jaggies" associated with tracking mouse movements perfectly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!