How GIMP Uses MyPaint Procedural Brush Packs
The integration of the MyPaint Brush tool into GIMP allows digital
painters to use dynamic, algorithm-driven brushes natively within the
program. By embedding the external libmypaint brush engine,
GIMP bypasses the limitations of traditional raster stamp brushes,
rendering complex strokes based on mathematical formulas and real-time
input parameters. This setup provides artists with responsive,
natural-media emulation directly on GIMP's canvas without needing to
switch between standalone applications.
The Engine Behind the Integration
GIMP integrates the MyPaint engine through libmypaint,
an open-source library that handles brush stroke mechanics independently
of the user interface. When you select the MyPaint Brush tool in GIMP,
the software passes your stroke events—such as coordinates, pressure,
and speed—directly to this library. The engine computes the brush
dynamics and returns the resulting pixels to GIMP's active layer,
maintaining hardware-accelerated processing and layer compositing.
Procedural Generation vs. Static Stamps
Traditional digital brushes in GIMP often rely on static image masks
(such as .gbr files) that stamp a bitmap repeatedly along a
vector path. In contrast, MyPaint brushes use the .myb file
format, which contains procedural definitions rather than raw pixel
data.
Instead of repeating a fixed shape, a procedural brush generates each mark mathematically based on dozens of internal variables, including:
- Friction and Drag: Simulates the resistance of physical media against canvas textures.
- Pigment Loading and Depletion: Mimics the running out of wet ink or paint along a continuous stroke.
- Color Smudge and Blending: Calculates real-time color mixing between the active brush color and pixels already on the canvas layer.
- Jitter and Tracking: Adds organic randomness to line width, opacity, and angle based on stroke velocity.
Real-Time Input Mapping
Procedural brush packs leverage real-time hardware data from graphics tablets. The MyPaint engine evaluates continuous inputs, such as stylus pressure, tilt, velocity, and direction. Because the brush rules are procedural, the engine dynamically recalculates properties like bristle splay or wet-edge accumulation at every point of the stroke. This produces natural line weight variation, soft blends, and textured edges that adapt instantly to how fast or hard the artist draws.
Resource Efficiency and Resolution Independence
Because procedural brush packs store mathematical parameters rather than high-resolution textures, they offer two distinct technical advantages:
- Minimal File Size: Complete MyPaint brush sets often require only a few kilobytes of storage per brush, allowing large collections to load into memory without degrading GIMP's startup or operational performance.
- Infinite Scaling: Because marks are calculated algorithmically, procedural brushes scale smoothly across high-DPI canvases without the pixelation, blurriness, or spacing artifacts typical of upscaled bitmap stamps.