alias_sqbr: the symbol pi on a pretty background (Default)
[personal profile] alias_sqbr
A digital painting of my cat Darcy, with chaotic splotches of colour that get more detailed around her eyes and more abstract in the background.

This still needs some work as a piece of art but was a successful proof of concept.

I assume a moderate knowledge of shaders. Image descriptions are sparse but I've tried to cover all the important concepts in the text.

This has a lot of parts, and I tweaked things a bit between taking screenshots, but I'm tired so this is what you get.

Original Images

The image is made of three sections: a back, middle, and front. Each section has its own alpha mask defining where the brushstrokes can be placed.

Back Original:
Everything but the cat is very destaurated and blueish

Middle Original:
Everything but the cat is a little blue and desaturated.

Middle Mask:
The edges of the bag and cat, all of the face are white.

Front Original:
More saturated, warm, and high contrast.

Front Mask:
Fuzzy grey shape of a cat with details and a few sketchy lines in white.

The Back Original contains masked versions of the Middle Original and Front Original, but erased and blurred around the edges. Similarly, the Middle Original contains a masked version of the Front Original. The back and middle are bluer and more desaturated than the front. I added some texturing over the top but it didn't make much difference to the final painting so I probably won't bother next time.

A single layer of brushstrokes

Now, how an individual layer of brushstrokes is constructed within blender.

The brushstrokes are made with a nodegroup using a chebychev voronoi texture.

The inputs are:
Actual Coordinates: the Generated Texture Coordinates, a UV map would also work.
location X/location Y: I didn't end up using these but they alter the texture and could be used for animation.
Stroke length: The ratio of length to width for each stroke. I usually set this to 3.
gap: Inversely affects the gap between strokes.
Rotation: Angle between the stroke and the X axis.
Scale: Inversely affects how large the strokes are.

Here's a simplified nodegroup for the front section with no gaps between strokes:
single stroke shader

I create scale, rotation and location vectors using combine xyz nodes. I pass these into a Mapping node set to texture to create the voronoi's coordinate system, then into the Chebychev Voronoi set to F1, then into a Mapping node set to Point to invert all the rotations etc to create a pixellated but otherwise unchanged coordinate system for the image. I then mix in the voronoi's colours with soft light to create some colour variation. I should probably make the factor for the soft light an input instead of hard coding it to 0.425.

Here's the result, a quasi-pixellated image made up of blocky shapes with the given size, shape, and angle:
A mosaic/pixellated version of the photo made up of little squareish shapes at an angle.

Now the rest of the shader, including the gaps between paintstrokes and alpha masking:
single strokes with alpha shader

A noise shader is passed into the smoothness value of a smooth F1 Voronoi texture with the same inputs as the earlier Voronoi. This creates fuzzy edges which vary randomly. Subtracting the Distance from the Colour and then multiplying by the gap variable created the sort of gaps I wanted. This is then multiplied by the mask image to remove anywhere that's black in the mask, and then passed into a colourramp to flatten the colours to nearly black and white.

Here's the result:

Small strokes just along the eyes, the edge of the face, and a few other details

Varied layers of strokes within a single section
The "Mixed strokes foreground" node group consists of three layers of these brushstrokes, all with slightly different scale, rotation, and gap variables according to a variation input. Here's part of the nodegroup, which creates a layer of brushstrokes with the inputs scale*(1-0.2*variation), gap*0.2, and rotation - 0.02*variation:
multi layered shader

The back and middle node groups are basically the same, although the back one has a layer at the bottom with no gap.

Layering the three sections

The full shader then layers the back, middle, and front:
multi stroke shader

The back has scale = 7, rotation =3, and variation = 4.
The middle has scale = 22, rotation =10, and variation = 1.
The front has scale = 100, rotation =-0.4, and variation = 1.

These combine to form this layered image:
Sketchy blocky paint strokes but it's clearly a cat

Distorted version
There is also a distorted version of the back section, which combines the masks for the middle and front with a paint texture and inputs this to the scale and rotation, mapped to the ranges 50:90 and 0:0.1 respectively.
Distortion shader

This is the result:
Darcy distorted

There is more distortion in places where the shade of the masks vary, which I tweaked by adding more random white strokes wherever the distortion was too flat.

The layered sections are combined with the distorted version, with a lightened version of the middle mask as the factor to get the final painting!

A digital painting of my cat Darcy, with chaotic splotches of colour that get more detailed around her eyes and more abstract in the background.

I tried some of the compositing techniques I used for the lily painting but didn't like the result.

I really want some way to mark brush stroke direction for specific parts of the image, but haven't figured it out yet. I could cheat and render multiple versions of the image at different angles then mask it all out in an art program. This sort of thing could also be a good way to test out composition and colours for a more hands-on digital painting.
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

alias_sqbr: the symbol pi on a pretty background (Default)
alias_sqbr

April 2025

S M T W T F S
  12 345
6789101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 23rd, 2025 11:10 am
Powered by Dreamwidth Studios