The purpose of this tutorial is to take an image with 4 layers and create a viable The Sims 3 pattern having each layer representing each of the 4 recolorable colors by their opacity using Paint Shop Pro. This is designed to be an in-depth tutorial giving precise step-by-step instructions.
For this tutorial, I am using my wavy-grid-illusion pattern as shown below. I have taken my blue channel and changed the color in the original to black so that you can see that this will work no matter what color the original layers are as the tutorial is based on the opacity and not the color or brightness. Note: Using this tutorial, each layer represents a single color in the final package based on the opacity of the layer. The actual color/hue/brightness/etc. of the layer is irrelevant, only the opacity is used.
Extracting the Layers into Luminance Maps
The first thing we need to do is to extract the layers each into their own image file so that we can convert them to a luminance map. Begin by creating 4 images that are 256×256 with a black background.
- Open a new image: Click File->New… or the new image button on your toolbar, or type CTRL-N.
- Use all the settings in the image above and, click OK to create the new image (The Color is black, #000000).
- Repeat (steps 1-2) three times so each layer will have its own image.
Additionally, make sure you have also opened your original image with 4 layers. Again, for this example, I am using wavy-grid-illusion.pspimage.
In the image above, I have selected the whole image, but the selected layer extends past the canvas, so you do not see the selection border.
- After opening and focusing the source image, CTRL-A to select the whole image.
- If the selected layer extends past the canvas, use Selections->Clip to Canvas to shrink your selection to only the canvas size or the layers will not line up correctly.
- Select the bottom layer and copy it using CTRL-C. Do not use CTRL-SHIFT-C as that will copy a merged version of the entire image.
- Select one of your new images and paste it in there using CTRL-V.
- Repeat this for each layer (steps 6-7), copy/pasting each layer into a separate image.
You can see the results below in Image3 and Image 4. Image 3 appears totally black because the content of that layer are black and the background is also black, you can see later that this layer will become visible to you. (Image1 and Image2 in the image below are results after steps 9-11.)
After copying each layer to its own image, we need to make the color of that layer white (in the image above, this has been done already for 2 of the images). I investigated a number of ways to do this and the one here seems to be the easiest.
- Focus the first new image (make sure the pasted layer is still the active layer).
- Click Adjust->Brightness and Contrast->Brightness/Contrast… (shown above)
- Set the Brightness to 255 and the Contrast to 100 (shown below) and click OK.
- Repeat (steps 9-11) for the other 3 new images.
In the images above and below, you can see that this has been done for two and note the difference in the third where the previously black layer has been converted to white.
When finished, all layers should appear in black and white as shown below.
- In turn, select each of the 4 new images, then Layers->Merge->Merge All (Flatten) (shown above).
- In turn, select each of the 4 new images, then Image->Greyscale (shown above).
Now, all of our layers have been converted to luminance maps. For 3 of them, we can combine using the Combine from RGB function. The fourth we will force into the Alpha channel of the image.
Putting the Luminance Maps Together
The lowest three layers of the image are going to be put into the red, green and blue channels of our final image. Red is the bottom most color, green on top of that and blue over green.
- Click Image->Combine Channel->Combine from RGB… (shown above).
- Select the luminance image of the bottom-most layer for the Red channel source.
- Select the luminance image of the second from the bottom layer for the Green channel source.
- Select the third from the bottom as the Blue channel source and click OK.
In the example above, you an see that mine are Red => Image1, Green => Image2 and Blue => Image 3. This very likely may not be the numbers as they appear in yours, so pay attention that you map your lowest layer to red, next up to green and above that to blue. The top layer will be mapped to the alpha channel later.
Above you can see results do not look like the original image. This is okay. Additionally, you can see that the top-most layer is not represented visually at all. It won’t be visible in this image, but rest assured, we’ll get it in there. We’re not trying to get it to look good in PSP (you should have done that before starting), we’re trying to get it into a format that the DDS exporter will understand.
Now, for the final layer, we are going to create a map and assign that map to the alpha channel of the final image.
- Select the luminance image of the top layer.
- 2. Click Layers->New Mask Layer->From Image… (shown above)
- 1. Check Source luminance and uncheck Invert mask data (as shown above) and click OK.
A new mask layer should appear and be selected. With that mask selected…
- Click Layers->Load/Save Mask->Save Mask To Alpha Channel… (show above)
I found this particular step a little tricky when I was coming up with it, so pay attention.
- From the popdown, Add to document (shown above), select the final image (which was created by Combine from RGB earlier).
- Enter Alpha in the Name.
- Click Save.
Because this is not visually represented on the screen, you can check the image information (Image->Image Information… after focusing that image) to see that there is now an alpha channel.
The only thing left is to save the file into DDS format. If you haven’t already, install the DDS plugin.
- Focus the final image and click File->Save, click the save icon in the toolbar or type CTRL-S to save.
- Select DDS * (*.dds) from the Save as type menu (shown above).
- Give it a File name (with a .dds extension) and click Save.
The options in this menu above are the default options. I do not know of any reason to change these options and am not familiar enough with any of them to give further input on them. I would ignore them if I were you.
- Click Save (shown above).
Open the The Sims Workshop
Open the DDS file in The Sims Workshop. (I see no need to replicate the manual instructions on importing DDS files into TSW as they are already clear there.) Below, you can see this pattern with colors assigned.
For those curious in the effectiveness of the layering ability provided by this tutorial, I recommend you check out these images: bottom layer, bottom 2 layers, bottom 3 layers, all 4 layers (I used yellow for the alpha layer).
- For a three-layer only file, the luminance image for the 4th layer is not needed, nor are any of the steps involving it.
- For a two-layer or single layer file, three luminance images are still needed, however, leave the unused ones black. You will still need to apply greyscale to the unused ones and possibly flatten.
- If any pixel in the original image is not fully opaque, the Background fill color (in TSW as shown above) will show through. This can be used as a 5th color. This 5th color, however, cannot be changed in CAS in the game. If you are clever, you can use that to your advantage to insert texture in a reliably determinable color.
- Do not apply transparency directly to the merged RGB image (i.e. in a way that is visible on the screen), this will disrupt the RBG values in the DDS export and probably leave Background fill color borders around the transparency. Only apply transparency through the Save Mask To Alpha Channel… functionality.