Tutorial: Making An EA Object Without 4 Channels Into a 4 Channel Object by orangemittens

This tutorial will show you how to upgrade an EA object clone using Texture Tweaker 3 so that it has 4 channels and it will show you how to prepare your object's Mask so that all 4 channels are used in the game. 

This tutorial assumes you know how to use both s3oc and s3pe to create an object.  If you do not know how to do this there are tutorials which go over basic object creation using these tools here:

http://www.den.simlogical.com/denforum/index.php?board=63.0

If you have questions regarding this tutorial please ask them in the thread below. 

What You Will Need:

1. the same tools needed for the above tutorials.

2.  a 2D Image Editor capable of making alpha channels.  I use Paint.NET for this although Gimp is another free editor that is capable of making alpha channels.

     - If you want to use Paint.NET for making your alpha channel you will need the AlphaSpace plugin for it.  This is free and is located here:
 
        http://forums.getpaint.net/index.php?showtopic=13061 

       You will need to place the content of that download (AlphaSpace.dll) into the Effects folder inside your Paint.NET folder.

NOTE: Before you ask questions regarding this tutorial please make sure that you have the most current version  of Texture Tweaker 3.  Older versions of this tool are not supported in this tutorial thread.


Getting Started:

1. Clone the object you wish to upgrade to a 4 channel object.  For the purposes of this tutorial I have cloned EA's 3 channel Double Brass Bed.  In
    the s3oc list of objects it is called bedDoubleBrass.  The original version has only 3 recolorable channels and the sheets and pillow are on the
    same channel.  We are going to upgrade this object to a 4 channel object and make a new Mask that allows the pillows to be recolored
    separately from the sheets.

2. Open the .package using s3pe and export the MLOD with shadow (00000) as you would for any other object you plan to use as a clone for your
    new object.  Close s3pe.

Upgrading to a 4 channel Object:

3. Open Texture Tweaker 3. Click File in the upper left corner.  Choose Open from the dropdown menu.  Navigate to your .package and select it.



4. Click the Upgrade button that is just beneath the words Upgrade to 4 channel CASTable.



**The Mask is still the 3 channel original mask.  In order for your fourth channel to be recolorable in the game this mask will need to have a fourth color and an alpha channel added to it.  Since we are simply converting a 3 channel EA bed into a 4 channel EA bed we are going to use the EA original Mask as our base and then modify it by adding a fourth color and an alpha channel to it.  The easiest way to do this is to export the Mask, make our changes to it, and then import it back in to overwrite the old version.  If you were making a brand new object you could simply import your own mask into the .package overwriting the original.** 

Exporting the Mask to Edit:

5. Click the CASt presets tab and the screen will change showing you small pictures of each image in your .package.



6. Click the blue pencil located just above the Mask image.



7. The Image Picker box will pop up.  Click Export image to edit.  When the Save As box pops up name the image something like Mask and click
    Save.  The click OK in the Image Picker box and minimize Texture Tweaker 3.



Editing the Mask:

8. Now open the bed in the 3D editor of your choice and apply the Mask to it so you can see where the pillows are mapped.  If you look at your map
    you should see something like this whe you look at where the pillows are mapped:



    As you will notice the pillows are mapped in an area where the Mask is blue.  They will recolor the same way as anything else mapped to the blue
    portion of this Mask which, in the case of this bed, means they cannot be separately recolored from the sheets.  What we need to do is create an
    alpha channel in this area of the Mask so that in the game they will be separately recolorable from the sheets.

9. Open the Mask .dds that you exported from Texture Tweaker 3 in your image editor of choice.  I use Paint Shop Pro but you can use Gimp,
    Photoshop, or any other one.  You want to edit the section of this image that the pillows are mapped to so that it is a color that is not red, green,
    or blue.  I have chosen yellow.  Save this as DXT5.



10. Once you have saved the Mask change the area which is colored yellow so that it is white.  Then change the remainder of the Mask so that it is
      black.  Save this version as DXT 5 and use a different name so it doesn't overwrite the colored version.  I saved mine as MaskAlpha.   When you
      are done it should look like this:



11.  Before adding the alpha you can test your MaskAlpha on the bed in your 3D editor.  You will know it is correct if the entire bed except for the
       pillows turns black.  The pillows should turn white.



Creating the Alpha Channel:

12.  Once your MaskAlpha looks right on the bed you need to add an alpha channel to the image.  I will show how to do this using Paint.NET.  If you
       plan to do it the way I'm showing you will need to get the plugin I linked at the beginning of this tutorial.  Open Paint.NET, click File and select
       Open.  Navigate to your MaskAlpha.dds and select it.  Once it is open in Paint.NET click the word Effects located near the top and roughly in the
       middle.  Choose AlphaSpace from the dropdown menu.




13. When the AlphaSpace box pops up place a dot next to the word Black and change the Tolerance number to about 33.  You will notice all the
      black parts of your image become clear and only the white part remains solid.  Click OK and save this as DXT 5.



14.  Now reopen your Mask.dds and your MaskAlpha.dds if you created them using a different editor than Paint.NET.  Copy the colored Mask.dds and
       paste it on the MaskAlpha.dds.  Save the MaskAlpha.dds as DXT 5.

15.  Test your new MaskAlpha on the bed in your 3D editor.  This time when you apply it the entire bed with the exception of the pillows should
       become invisible and the pillows should turn yellow.



Import the Mask and Edit Your Package:

16.  Go back to Texture Tweaker 3 and click on the blue pencil over the Mask area again.  This time select Import to overwrite when the Image Picker
       box pops up.  Navigate to your MaskAlpha.dds and select it.  Click OK.  You will notice the Mask picture below changes so that it looks like a
       checkerboard with a yellow area in the bottom left corner.  Click File and choose Save.



17.  You will need to change the tiling for each of the patterns in order to make them match the size of .dds images.  On the right side of the screen
      you will see 4 boxes each showing a pattern in them.  To the right of each pattern box you will see two fields for the tiling.  One says Tiling X
       and the other says Tiling Y.  Our package has images which are 1024 x 1024 and the appropriate tiling for this size is 4 and 4.  The package
       currently has tiling which is 1 and 2 because these are set by default in the upgrade process.  Simply change these fields to 4 and 4 for each of
       the 4 patterns (Pattern A-Pattern D).  Click Commit.



18.  **optional**If you want to change the default pattern on the pillow (Texture Tweaker 3 applies a solid yellow pattern by default) click on the
           pencil next to the Pattern D area in the lower right corner. Select Pick pattern and select the pattern you would like to use.   Click Commit.

19.  Now click Save.  Your new bed has now been changed to a bed with 4 recolorable channels and is ready to test in the game.



To summarize what this tutorial has shown:

1. In order to make a 4 channel clone all you need to do is click a single button using Texture Tweaker 3
2. In order to use the fourth channel in the game all you need to do is add an alpha channel to the Mask

Thank you and credit to Inge Jones for Texture Tweaker 3

Click here to go to original support thread...