Simulating brush strokes for painting application

前端 未结 4 1195
挽巷
挽巷 2021-01-31 06:27

I\'m trying to write an application that can be used to create pictures that look like paintings using simulated brush strokes. Are there any good sources for simple ways of sim

4条回答
  •  灰色年华
    2021-01-31 06:40

    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.

提交回复
热议问题