‘Simulating oil painting with Blender 4.x’

NPR rendering techniques in Blender to simulate oil painting.

NPR aims to reproduce all types of non-realistic rendering. Our project consists in reproducing an oil painting style similar to that of Rembrandt. Rembrandt

For a brush painting like rendering, we are developing specific tools within Blender using the new geometry node system and the EEVEE rendering engine.

We are specifically using shadertoRGB, which allows us to use the object’s illumination as a work basis. shadertorgb

We start by applying a layer of paint to the ‘canvas’, then add the darkest layers of paint, followed by new lighter layers depending on the illumination of the surface. couches

A layer is made of brushstrokes simulated on a map. pinceau

A black and white version of this map is used to generate a bump on a basic diffuse shader. To this result, we add the inversion of an identical diffuse shader but without the bump. This allows us to get the bump matching the paint layer without the grey values due to lighting. We then modulate the colour of the layer of paint layer to simulate its thickness. couleur As a node in the shader editor. nodediffus

A greyscale mask matte is generated by mixing the gaps between the brushstrokes in the map and a surface illumination calculation. The whiter the mask, the more paint is applied, here on a green background. mix nodediffus

Each layer of paint mixes with the previous one, forming a more or less homogeneous paste.

To mix one layer with the previous one, we vary the way we obtain the illumination on the object’s surface, sometimes making it depend on the ambient occlusion or the degree of surface deformation, calculated via the Geometry node. illumination

The way the paint is then deposited on top of the existing paint is currently implemented using a basic method :

We retrieve the maps managing the bumps and masks from the two layers. We multiply each by a fraction of 1, the total of the two multipliers equals 1. We then add these maps together. addition nodediffus

The final result consists of 10 overlapping layers. pate

The last layer, which simulates the brightest touches of light on the skin, does not blend with the others, like a smear, consisting of depositing dry paint on the existing paste.

Future developments will involve implementing various methods for blending paint layers, such as taking into account the brush movement to blend the layers or taking into account the fluidity of the paint.

First results.

Light reaction test. visualisation

In situation. rendu

The render lacks variation in the evolution of layers in relation to each other, which should improve with future blending methods.

The number of layers is limited by the number of textures that can be put into a shader in Eevee.