Many times in Junkster, we found ourselves wanting to change the colour of an asset, or part of an asset, on a per instance basis. To do so, we created our Colour Picker Palette system.
The Colour Picker Palette is simple in principle. We have an 8*8px texture that acts as our colour palette, from which we can pick a single pixel using a 0-63 value in the asset’s per instance data input. This pixel’s colour is then multiplied by a greyscale texture to give us a coloured output with value variation. The only drawback is a lack of hue variation.
Used with the building blocks of the game, the Colour Picker Palette allows them to be a range of paintable colours. The values for the whole block are defined by a greyscale texture, and the colour was determined by which UDIM the UVs were in. The unpainted colour was set in the shader, the the paint colour (and the darker variation) were chosen from the palette.
The Colour Picker Palette was also employed in a number of environment assets, particularly our modular kits. Here we added the greyscale texture as the alpha to the base colour texture map, and used UDIMs to differentiate between the two. This was especially useful in adjusting shared assets to suit the surrounding environment.
Similarly used in decals, this gave us great flexibility with a relatively limited number of assets. The grunge decals especially benefited; with a simple set of textures we could colour them to match any surface we needed.
-------
Junkster is unfortunately in a state of publishing limbo, but I am still proud of the work we accomplished and feel fortunate for the opportunities it presented. I'm glad we still have the chance to show it to the world.