Skip to content

Adding a custom brush to Lightcube

Adding custom brush shapes

You can easily add your own custom brush shapes to Lightcube. This blog article describes the steps you need to implement to add a new set of brush shapes.

Brush shapes are stored in the directory %appdata%\lightcube\brushes\. Create your brush shapes as black and white bitmap files where black is used to set each pixel in the canvas whenever the brush is applied. The bitmap can be any size but note that each shape in the bitmap file should be the same size, e.g. 32 x 32, or 20 x 20. The BMP file can be any bit depth, and you should use black for the pixels in the brush, white for the transparent parts.

  1. Store the bitmap in the C:\Users\<username>\AppData\Roaming\LightCube\brushes\ directory.
  2. In the same folder you will find the file brushes.json. Open this file using a text editor and then add your bitmap, using the example below:
{ 
"title-en": "MyCustomSet", 
"filename": "mycustombrush.bmp", 
"size": 32, 
"index": 20, 
"preserve": 0 
}

Notes:

▪ The "index" value must be the last brush index + 1, so if you were to follow on from my example above you would use "index": 21.

▪ The size is the grid size of the brush. For example, a 128x32 bitmap would contain four 32x32 brush patterns if the size is set to 32.

▪ The "preserve" value should be 0 for now.

▪ You only need to add the "title-za" field if you are using Lightcube in a Simplified Chinese language locale.

Restart Lightcube and the custom brushes should be available.