# Creating a brush texture

**URL:** https://discourse.processing.org/t/creating-a-brush-texture/10701
**Category:** Project Guidance
**Tags:** homework
**Created:** [April 28, 2019, 12:09am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701 "2019-04-28T00:09:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![saitam95](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saitam95/32/4853_2.png) [@saitam95](https://discourse.processing.org/u/saitam95)
#### Post date: [April 28, 2019, 12:09am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/1 "2019-04-28T00:09:30Z")

</div>

Hi, english isn’t my native language so I’m sorry in advance for any spelling mistakes/awkward writing. I’m in need for some help for a college project and I’d appreciate any kind of guidance you can give me.

So, the project consists of a series of abstract paintings which we have to use as inspiration for our own piece. You should be able to interact with this piece with the mouse (X,Y for now).

We’ve split the elements of the painting, but we’re having trouble recreating the pencil texture and the different colors. Does anybody know how to recreate the brush texture and how it mixes the different colors?

 ![Yago-Hortal-3](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4a8d5ee09acec439ba93bb8805ed53804ba3884e.jpeg)

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [April 28, 2019, 7:03am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/2 "2019-04-28T07:03:03Z")

</div>

Which one of the different parts of the image do you mean? How would you describe what you see and how could that relate to mouse position?

Please show your code so far since this is homework

---

<div class="post-metadata">

### Author: ![saitam95](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saitam95/32/4853_2.png) [@saitam95](https://discourse.processing.org/u/saitam95)
#### Post date: [April 28, 2019, 7:48am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/3 "2019-04-28T07:48:48Z")

</div>

Hi, sorry I didn’t clarify that: the brush that I’m talking about is this one.  
It’s like a bristle brush.

I don’t have any code yet, because I don’t know if this is even possible to make in Processing. Anyways, I’m asking for some idea to begin to create the texture of the brush, not a complete code or something like that.

![Screenshot_1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c21f218f6236c1627284b4b3142ee34da4ebb6b8.png)

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [April 28, 2019, 9:35am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/4 "2019-04-28T09:35:38Z")

</div>

You could start by a sketch that draws a wide gray brush with the mouse

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [May 1, 2019, 5:32am UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/5 "2019-05-01T05:32:22Z")

</div>

Your example brush is quite difficult to model – mixed paint colors on a 3D volume changing with the changing direction of the stroke, and also blending / running / dripping / spattering.

I wouldn’t recommend working up from a simple pixel brush, in this case. Instead I would recommend looking at fluid dynamics examples in PixelFlow for Processing.

In particular see the examples for Fluid Dynamics or Flow Field.

> **[diwi/PixelFlow](https://github.com/diwi/PixelFlow)**
>
> A Processing/Java library for high performance GPU-Computing (GLSL). Fluid Simulation + SoftBody Dynamics + Optical Flow + Rendering + Image Processing + Particle Systems + Physics +... - diwi/Pixe...

---

<div class="post-metadata">

### Author: ![saitam95](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saitam95/32/4853_2.png) [@saitam95](https://discourse.processing.org/u/saitam95)
#### Post date: [May 1, 2019, 10:12pm UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701/6 "2019-05-01T22:12:26Z")

</div>

Thank you! I think this will work
