Saturday, December 6, 2014

Part 5: Replacing the Original Textures Within the Package Using s3pe

Navigate to where you have your package saved and open it in s3pe.

Click on the image you wish to replace, in this case the control is first. Right click on the resource and then click on replace.

You'll now be prompted to choose a file to replace the original with. Choose the control you made and click Open.

 Do the same for the other Images: the Diffuse and the Specular. Now Save your package. Congratulations! You have now re-textured your first hair. Replacing the Images this way will make your re-texture a Default Replacement, meaning it will override the original and people won't be able to use your Re-texture and Cazy's Original at the same time.

 If you don't want your re-texture to replace the original, then keep reading. Open the package in s3oc.
 Click on the contents of the package and then click "Clone or Fix".
 Make sure Create Clone Package and Renumber/rename internally are checked and then click start.
Wait for s3oc to do it's thing and then you're done. When prompted to name your package I would suggest a descriptive title. I usually include the my user name initials, the original creators name, the hair's name, and then whether or not the Hair uses Adjust Shine or EA style highlights. For example I would call this package: NF_Cazy_117_af_AS.

Bonus: Gettin' Lazy With The Tips And Roots

Congratulations! Enjoy your new re-texture ^^b
If you have any questions, you can post in the comments here or you can pop into my ask at tumblr and ask there. My tumblr ID is Please include which part you're having trouble with.
***Please, Please, Please, respect the creators TOU if you plan to share the retexture you make with this tutorial!***

Part 3: Making The Specular

The specular is what determines how shiny something is in the Sims 3. For Hair, it governs the Highlights and Low-lights If you like your Hair shiny, you'll want the highlights to stand out really well, if you don't like seeing any shine whatsoever, you'll want to make the Specular almost completely black. I'm going to show you how I do my specular and I like shine, so that's what we'll be doing today.
So you should still have the Diffuse Texture that you just made open in Photoshop. You'll want to Select the whole thing with Ctrl+A and then copy it with Ctrl+C. 
Then you'll go up top and Click File > New to make a brand new image.
 Make sure that all the options look the same as in the picture. You'll want the size of the Image to be 1024x1024 and you'll want to make sure the Color mode is set to RGB Color. Click ok then navigate on over to the new Image you just created.
Paste (Ctrl+V) your Diffuse Texture into the new Image. 
Next we're going to Flatten the Image (Ctrl+F) and then make a Duplicate Layer of the Background. I always like to make a Duplicate Layer of what I'm working on, that way if I screw up I can just delete the Duplicate and start over.
The specular needs to be very Dark. White on the specular means that part of your texture will show up shiny in game, Black means it will look matte in game. To do this we'll start by darkening up the image quite a bit. Click on Image > Adjustments > Hue/Saturation or (Ctrl+U). This brings up the Hue/Saturation window.
 Hue will change the tint of the overall image and Saturation will change how "much" color your image has. If you bring the Saturation Bar all the way to the left, it will make your image change to Black&White, completely devoid of any color. If you bring it up to the right, you'll notice your colors will look brighter and more garish. It won't do anything for our current image, though, because it's already Desaturated.
 The Lightness bar will govern how light/dark our image is. We want to darken up our image so we'll bring the arrow to the left. You want the image to be very dark, to where the texture is barely visible. It should look like the picture. (Now if you didn't really want any shine to show up on your hair, you'd stop right here, flatten your image and your specular would be done. Leaving it like this will give your hair a more "soft" look.)
We want to increase the contrast between the highlights and low-lights, so that our hair will have shine on it. So next we'll bring up the Levels window. To do this you can click on Image > Adjustments > Levels or press Ctrl+L on your keyboard
 Now that the Levels window is showing you'll notice a few things. There are 3 arrows and a huge spike, kind of like you'd see on a graph in the area where it says Input Levels. The 3 arrows here will adjust the contrast of your image in certain ways. The arrow on the far left will make dark colors darker when moved to the right. The arrow on the right will make bright colors brighter when moved to the left. The arrow in the middle kind of balances things out, at least that's what I've learned from experience. Moving either the Left or the Right arrow will also cause the arrow in the middle to move if you've moved the left or right arrow far enough. Output Levels govern how light and dark the overall image is, kind of like what we just did with the Lightness bar that was in the Hue/Saturation window. Since we already made the image darker, we're not going to worry about the Output levels.

Now we want to make the dark areas of the texture darker while making the lighter areas of the texture more visible. So we're going to move the left arrow to the right just a tad and we're going to move the right arrow to the left a whole bunch, just like you see in the picture. You can play around with the levels until you get something you like out of it or you can just go ahead and input the numbers 32 into the box on the left and the number 45 into the box on the right to make it look like mine.

I'm not sure this next step is necessary, but I like to do it anyway. Now that we've adjusted everything, you'll notice that the texture looks really grainy. Not all textures will do this, it just really depends on the texture you're using. To combat the graininess, we're gong to use a Filter to reduce the noise. To do that go to Filter > Noise > Reduce Noise. This will bring up the Reduce Noise Window. You should see a preview box to the left of all the adjustments. This will show you what your texture will look like with all the adjustments applied to it.

We really want a lot of the noise gone, so I go ahead and ramp the strength up to 10. We don't need to worry about preserving details here so we can make that 0. We'll also make Reduce Color Noise and Sharpen Details 0 as well.

Now that we've done that, it looks quite a bit better. I'm still not happy with it though, so I open up the Reduce Noise window again. This time I change some things up. I noticed that our image looked a little too blurry when I'd left everything the way it was before. (With the Strength at 10 and everything else at 0). So I moved the preserve details and sharpen details over to the right a bit until I'm happy with the end result.

I'm a tad bit of a perfectionist, so I go back into levels and play with that a bit until I see most of the artifacts go away, and everything looks a bit cleaner.
Now that I'm happy with what I see, I Flatten my image (Ctrl+F) and Save it.

Your format will most likely default to PSD so you'll need to change that to DDS. This time since the Specular does not have an Alpha channel I'll chose the first option. "DXT1 RGB 4 bpp no alpha"

We're all done with the Specular. Keep it open though, because we're actually going to be using it for the Control.

Part 2.5: What to do if the Alpha isn't Straight.

Okay, for this part we're going to open up the other Cazy Hair I had you download, in s3pe. That would be Cazy_144. Find the Diffuse texture again and Export it like you did before, then open it up in Photoshop.

Next go over to Shock&Shame's Texture again and Copy it then paste it over the Cazy texture like you did before.

 Goto the Channels tab and make the alpha visible again. You'll see that this time one of the hair "pieces" in the Alpha is a little curved and our texture looks a tad bit weird on it. This means we'll have to tweak the texture so it fits in better with the Alpha.

Go back to the Layers, making sure you leave the Alpha channel visible this time. It will act as a guide when we warp the texture.

 So first we're going to make a Duplicate Layer of the Shock&Shame texture that you just copied and pasted. Right click on the Shock&Shame layer and then choose Duplicate Layer from the pop up menu. This will make an exact duplicate of the layer. You'll see why we do this near the end.

Now click on the Rectangle Marquee Tool. It should be the second tool down on the Tool Panel, which is the skinny vertical bar on the left. With the Rectangle Marquee Tool selected, hold down the left mouse button and make a big rectangle over the curved piece just like shown in the picture.

Once you have the area selected, click on Edit from the top menu then choose Transform > Warp. This will make a type of grid around the selected area. We're going to use this grid to warp the texture so that it looks more curved and is more in line with our Alpha layer. 

To move the texture, click anywhere on the grid then hold your mouse button down and drag. We'll start by moving the top left corner over a little to the left then we'll do the same to the next line over.

Then we'll go one row down and move that line over to the right . See how it's starting to make the box a little curved on the top? We basically want the grid, and therefore the texture to resemble the way the Alpha piece curves. Which means the top and bottom parts of the grid need to be pulled to the left and the middle part of the grid needs to be pulled to the right. It's important here that you keep an eye on the texture and make sure it doesn't look too stretched or anything. If you make a mistake you can always hit.. 
...the Cancel Icon (which is to the left of the Check Mark icon on the top menu bar) and that will cancel everything you've done and you can start over. You probably won't end up with it looking perfect on your first try.
Take a look at my pictures and you can see which parts I moved and which I didn't. Try to make it look similar. As you can see in the last picture, the texture is now curved and it conforms to the Alpha...
...much better, which is what we wanted. When you're happy with how it looks, go ahead and press the check mark up to to save your Warp.

Now it's time for clean up and you'll see why it was important to make a duplicate layer of our texture BEFORE we started warping. Why? Well if you look closely at it, you'll see that because we moved the texture over to the left when we warped it, the warped part is visible on a small part of the Left Hair Piece. It's visible at the top and bottom.

Select the Rectangle Marquee tool, and make a rectangle around the offending area. Once you've done that, hit Ctrl+X to cut the selected area out. 

The layer beneath will now be visible through that cut out area. This is why we duplicated the layer, so that we could cut pieces out of the top layers. If we hadn't duplicated the layer first, we would've needed to be extremely careful about how we warped the texture and ain't nobody got time for that.

Once you've done that you should have something that looks similar to the photo. Flatten your image like you did before by pressing Ctrl+F, and then go ahead and save because you've just finished making your Diffuse Texture curved!

Next Up: Part 3: Making the Specular

Part 2: The Diffuse Texture

For this tutorial I'll be using the Cazy Hair "Over the Light" to show you an easy peasy straight re-texture, and the Cazy Hair "Rochelle" to show you what to do when part of the hair's alpha is curved. You can go ahead and pick these up at TSR for free to follow along, now that TSR isn't a paysite any more (per se). Or you can use whichever hair you like. I suggest using the same hair I'm using though, because it'll be easier to follow along that way. I'll also be using an edited version of Shock&Shame's texture to re-texture the hair. You can Download my edited texture to follow along or you can use another texture, the choice is yours.
To re-texture these hairs, you'll need to convert them from Sims3packs to packages. To convert them to packages you'll need Delphy's Sims 3 Pack Multi Extractor. This tutorial will not teach you how to use that program, because Delphy's has instructions on how to use it on the DL page.

Now go ahead and open the package with s3pe. Once you've done that, you'll notice a bunch of _IMG files. If you don't notice these, make sure you have both Display Names and Tags checked at the bottom, and then click on the Tag bar up top to sort the contents of the package by their tags. Next you'll want to find the Diffuse texture. It's generally the texture that looks light gray strands of hair like in the picture.

Next, right click on the _IMG resource and choose Export > To file. S3pe will then ask you where you want to save the file, I generally save it in a folder with a descriptive name so I don't have problems finding it later.

Now you'll need to open the file in photoshop. The file should start with S3 and end with with a bunch of numbers in between. In order for photoshop to recognize this type of file (DDS), you'll need to download the DDS plug-in for Photoshop. You can find that here. Once you're done installing the plug-in, go ahead and open the file in photoshop. Every time you open a DDS file in Photoshop, a dialog window will appear. You'll want to make sure that you're loading the image with Default Sizes and that Load MIP maps and Load Flipped Vertically are unchecked. Otherwise you're going to get a really weird looking image.

Once you open it, your image should look like the picture. Next open the texture you would like to use to replace the original texture. I'm using a personal edit of Shock&Shame's texture (link above). You can DL that texture here or use one of your own. It might be easier, though, to use the same texture that I'm using so that it's easier to follow along.

So we're going to want to copy Shockshame's entire texture and paste it over the top of the Cazy texture. to do this you'll press Ctrl+A to select the entire image and then Ctrl+C to copy the image. ( You can also use the menu up top to select the image and make a copy as well. Just click Select and then All from the drop-down menu, and then click Edit and select Copy from the drop-down menu.)

Now that you've made a copy of the texture, go back over to Cazy's Texture. To do this simply click on the tab that has the file name displayed on it. The tab should be located under the Menu Bar. Once you do that, press Ctrl+V to paste it over the top of Cazy's texture as a new layer. (You can also use Edit > Paste to accomplish the same thing)
Once you've pasted Shock&Shame's texture over the top of the Cazy texture, you'll notice that the Layers tab (The one that's in the wide panel) has changed. It now has two images listed. The background image (which is the cazy texture) and the Layer 1 image (which should be Shock&Shame's texture) 

Next, click on the Channels tab. It's the tab that is to the right of the Layers tab on the wide panel.

Next, click on the Channels tab. It's the tab that is to the right of the Layers tab on the wide panel. Once that tab is shown, you'll notice 4 different channels. Red, Green, Blue, and Alpha 1. You'll also nice an eye icon to the right of each channel. The eye tells you that a specific layer or channel is visible.

 You'll also notice what looks like another channel on the very top called RGB. This really isn't it's own channel, it's the combination of the Red, Green, and Blue channels. So, when RGB is "visible" (i.e. it has the eye icon next to it), all of your channels are also visible. You'll notice that if you try to click on the eye that is next to the RGB channel, that you are unable to make the channel "invisible". But if you click on the eye that is next to the Red Channel, you can make the Red Channel invisible and the same for all the other channels. Notice that when you make any one of the Red, Green, and Blue channels invisible, you will also make the RGB channel invisible. Like I said it's a combination of the three channels, and if all the channels aren't currently visible, the RGB "channel" won't be either.

Next we'll talk about the Alpha Channel. This channel is very important. It tells us which part of our image is visible and which part is transparent. In the Sims 3 in regards to Hair, the Alpha channel tells us which part of our base texture gets applied to the hair. Now go ahead and click on it, making sure to click anywhere but the tiny gray box that is to the left of the word Alpha 1. This will ensure that you're viewing just the Alpha channel and not every channel together.
Now look at the Alpha Channel, you'll notice that it is done in White, Black, and Shades of Gray. White means Transparent, Black means Opaque, and Gray means Translucent. Translucent meaning some of the texture will show through, but not all. The darker the gray, the less texture that will show through and vice versa.

Now go ahead and click on RGB to make the Red, Green, and Blue Channels visible again, doing that will make the Alpha invisible again so you'll need to click on the tiny box next to the thumnail of your Alpha texture. This will turn it into an eye and make it visible as well. You are now viewing all 4 channels together and this is what it should look like.  

We want to make the Alpha visible, because we want to see how our new texture is going to look when applied to the Hair. It looks good right? Now I chose this particular hair for a reason, because it's easy. We don't have to Warp the Texture to fit the Alpha better, or rotate it in any way, or cut and paste just pieces of our Texture or anything like that.

Now that you've done that go ahead and make your Alpha channel invisible and then Flatten the Image. You'll do this by hitting Ctrl+F (if you used my Photoshop setup) or by clicking on Layer > Flatten from the menu up top.

Now save the image and you're done with the Diffuse Texture. When saving a DDS file a menu will appear with a bunch of options. You can ignore most of these. You'll want to make sure Generate MIP maps is checked, and then you'll need to choose an option from the drop down menu on the top.

his menu determines what compression level Photoshop will use when saving your DDS file. The two options we'll look at for now are "DXT5 ARGB 8 bpp interpolated alpha" and " ARGB 32 Bpp unsigned" The first will offer more compression than the second. This means that DXT5 will be lower in quality but the file size will be smaller. will be higher in quality but also bigger in file size . The choice is yours. Whichever option you choose is fine just make sure that the option includes the text ARGB in it. We want ARGB because that stands for AlphaRedBlueGreen, and it determines which channels will be saved. The Diffuse texture has an Alpha Channel so we want to make sure that gets saved along with the standard Red, Green, and Blue Channels.
Keep the Diffuse Texture open, because we're going to be using it for the Specular and the Control.