Dynamic Clothing Colour in LR2 (Patreon)
Content
Prior to today, all of the clothing items in Lab Rats 2 were rendered as you seem them in Daz Studio. That meant that if I wanted the same tshirt in red, blue, and green I needed to spend three times as much time rendering it and three times as much space storing it. The alternative to this, which I've finished implementing tonight, is storing a single grey scale render of the clothing item and having a shader modify the colour of each pixel of the image so that it is the correct colour when drawn to the screen. Creating a different coloured version of a clothing item is now as simple as defining a red, green, blue, and transparency value for it.
Here's a quick example of the results, recolouring the white tanktop currently in the game:

This approach will work with any solid colour clothing item. Items with patterns or multi-coloured sections will require a separate mask image to let the shader know which sections it should colour and which it should leave alone (or colour a different colour!).
Changing over to this new shader based display code will have other benefits, but I'll save talking about those for another night!