rdTexTools Tutorial 12 – Using Materials to create Textures – part 2.

rdTexTools version 1.20 introduces a new tool that allows you to create new textures using a Material as the modifier to your selected textures.

There are two versions, one that runs the material over each of the selected textures, producing a new texture for each – and another that passes all selected textures to a single material, producing one new texture.

This tutorial uses the second technique to create a new texture from a series of selected textures, we’re going to pack 4 photos into 1 texture.

Step 1. Create the Material

Firstly, make the material to pack the photos. Like the previous tutorial, make the Material Mode PreMultiply AlphaComposite, and “Unlit”. Create the code as below to draw each texture in a quadrant. Note that the 4 texture samples are “TextureParameters” named “Texture1”, “Texture2” etc.

Step 2. Select the Textures

Select the photos you want to pack (in our case, the material supports 4 texture inputs, so select 4 textures.

Step 3. Run the Multi-Source Material tool

Now right-click and select “Render Material (multi-source)” from the rdTexTools section of the menu. In the window that opens, choose an output name, select your material, then click “Render”.

Step 4. Done

Now you should have a new texture with the 4 photos packed into it.