Indexed Palette for Blender
A downloadable tool
A plugin that maps RGB channels to indexed colors, creating a node setup for your shader materials. I wanted an similar painting experience to pixel art apps with indexed colors so I came up with this solution. Indexed colors are colors that are mapped to a specific swatch in your palette, changing that swatch color updates that color in your texture instantly.
Installation:
- In Blender go to:
- Preferences > Addons > Install from Disk
- Choose the indexed_palette.py file
Setup:
- Ensure you have a shader going to output and an image texture in your material
Usage:
- In the 3D view side panel (shortcut 'N' by default), you can find the Indexed Palette tab
- Hit Create Palette or select the number of colors you want for each channel
- This will create 3 color ramps of swatches for each color channel
- Adjust each swatch to see the associated color update
- Clicking the button above each swatch changes the texture painting tools color to the associated channel color
- An example painting in a purely red color (1,0,0), is mapped to the first set of swatches, last swatch in that row.
- Associated channel colors never change, they are fixed offsets depending on how many colors are in a given ramp.
- I recommend having your darker colors on the left, and your lighter colors on the right as this works better for the smudge / blur tools and any falloff from the brush.
- To get the texture, you need to bake it. If you are unfamiliar with that process, the UcuPaint addon has a one click solution. Just remember to save your image before baking or the baking process might not pick up on your changes.
One way of setting up and thinking of your palette is to divide each channel into chunks of "materials", which are gradients that go from dark to lightest. Due to the linear nature of the underlying color ramps, you'll get some bleed of neighboring materials on the edges of your materials when using swatches at either end of the gradient. One workaround is to have swatches that bookend a usable range of swatches that you don't directly use, but compliment the material. An example [bookend swatch, dark red, mid red, light red, bookend swatch, bookend swatch, dark steel blue, mid steel blue, light steel blue, bookend swatch]
If you're wondering why you aren't able to paint a certain color, make sure your ImageTexture is set to Non-Color. The plugin tries to set this for you, but if you end up replacing the texture for whatever reason, this is probably the culprit.
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.