CmarNYC
11th Jun 2011, 08:11 PM
What this tutorial will do:
Show you how to make textures for custom body hair using GIMP and package them as non-replacements with Hairinator.
What it will not do:
Teach you the basics of GIMP or any other image editing software, or teach you how to texture hair.
What you'll need:
GIMP - a freeware image editor: http://www.gimp.org/
GIMP plugin for importing and exporting DDS image files: http://code.google.com/p/gimp-dds/
Skin textures: Attached to this post, and in Fullbuild0.
Hairinator: http://www.modthesims.info/download.php?t=445101 (If you don't see the Random/Maternity checkboxes, grab version 1.1.)
Tutorial:
In GIMP, open a body skin texture. In the Layers panel, right-click the main surface and click 'New Layer'. In the new layer properties popup window, make sure the layer is 1024x1024, and the Layer Fill Type is Transparency.
http://timelinefiction.net/S3Tutorials/BodyHair/controls1.jpg
Make sure you have the new layer selected. (It'll be highlighted blue when you have the Layers panel selected, gray when you click somewhere else.) Paint your hair on that layer - it'll look like it's right on the skin texture.
http://timelinefiction.net/S3Tutorials/BodyHair/image1.jpg
When you're happy with the hair, make the skin texture invisible by clicking the eye symbol for the main surface in the Layers panel. The eye should disappear and so should the skin texture, leaving a transparency checkerboard with your hair on it.
http://timelinefiction.net/S3Tutorials/BodyHair/image2.jpg
In the image window, do an Edit / Copy visible to copy the hair image.
Now, make a new 1024x1024 image by clicking File / New. Make sure it's 1024 x 1024. Paste the hair image into it. In the Layers panel you should see a Floating Selection layer appear above the blank white Background layer. Right-click that Floating Selection layer and click Anchor Layer.
(You can save, close, or minimize your image with the hair layer over the skin texture at this point - we won't need it again for the tutorial. In practise I suggest you save it since you may want to work on the hair after you see it in-game.)
You now have an image of your hair on a white background. In the image window, click Colors / Invert. The black and white of the image will reverse and now you have a white image of your hair on a black background. (If your hair is very light or sparse, the image may become almost invisible. Don't panic.)
http://timelinefiction.net/S3Tutorials/BodyHair/image3.jpg
Go back to the Layers panel, right-click the Background layer, and click Add Alpha Channel. Save this image in .dds format as your specular. Give it a descriptive name so you know what it is later, and use DXT5 or DXT1 compression. I use DXT5. Select Generate MipMaps.
http://timelinefiction.net/S3Tutorials/BodyHair/save1.jpg
Now back to the image window. Do Edit/Copy to copy the whole image. In the Layers panel,
right-click the Backgroud Layer and click Add Layer Mask. For the layer mask properties choose Transfer layer's alpha channel. You should see a white square appear in the Background layer bar in the Layers panel.
Right-click the Background layer again, and click Show layer mask. Your image should turn white. Note that BOTH Show Layer Mask and Edit Layer Mask should have a check mark next to them.
http://timelinefiction.net/S3Tutorials/BodyHair/controls2.jpg
Do an Edit / Paste in your image and you should now see the white hair on black background. Again you'll have a Floating Selection in the Layers panel; right-click and anchor it.
Right-click the Background layer in the Layers panel again, and uncheck Show Layer Mask. Repeat to also uncheck Edit Layer Mask, and a third time to check Disable Layer Mask. You should again see the white hair on black background.
(Edited from original) For this tutorial, we'll do a basic adjustment to the RGB channels that looks pretty good for most hairs. In the image window, do Colors / Brightness-Contrast. Lower the contrast to around -100 so the background turns a darkish gray and your hair almost disappears. For sparse hair, it may completely disappear.
In general, the darker and less contrasted this image is the more the hair will stay dark (and visible) despite light hair colors. The lighter it is, the more it'll change with hair color in-game, but the more it'll tend to disappear or look painted on with light blond hair colors. You'll have to experiment with this.
http://timelinefiction.net/S3Tutorials/BodyHair/image4.jpg
Go to the Layers panel, right-click the Background layer, and click Apply Layer Mask. If your hair didn't disappear before, unless it's pretty heavy it probably will now and all you'll see is a checkerboard. Once more, don't panic.
Save this file as your Overlay, again with a descriptive name. You must use DXT5 compression for this file. And again, select Generate MipMaps.
Now fire up Hairinator to make the package. Plug in the two DDS files you just created, select the body area the hair is for, and give your hair a unique name. The name is used to generate a unique ID so I suggest you use a combination of your name and a descriptive name for the hair. Optionally, you can enable the hair for any age/gender you wish, enable or disable for random and maternity, change the order in which it will be listed in CAS, and you can modify the opacity by setting it to a value between 0 (fully transparent) and 1 (fully opaque).
http://timelinefiction.net/S3Tutorials/BodyHair/Hairinator.jpg
Click the Create Body Hair Package button, name the package and save it, and you're done. Now wasn't that easy?
Show you how to make textures for custom body hair using GIMP and package them as non-replacements with Hairinator.
What it will not do:
Teach you the basics of GIMP or any other image editing software, or teach you how to texture hair.
What you'll need:
GIMP - a freeware image editor: http://www.gimp.org/
GIMP plugin for importing and exporting DDS image files: http://code.google.com/p/gimp-dds/
Skin textures: Attached to this post, and in Fullbuild0.
Hairinator: http://www.modthesims.info/download.php?t=445101 (If you don't see the Random/Maternity checkboxes, grab version 1.1.)
Tutorial:
In GIMP, open a body skin texture. In the Layers panel, right-click the main surface and click 'New Layer'. In the new layer properties popup window, make sure the layer is 1024x1024, and the Layer Fill Type is Transparency.
http://timelinefiction.net/S3Tutorials/BodyHair/controls1.jpg
Make sure you have the new layer selected. (It'll be highlighted blue when you have the Layers panel selected, gray when you click somewhere else.) Paint your hair on that layer - it'll look like it's right on the skin texture.
http://timelinefiction.net/S3Tutorials/BodyHair/image1.jpg
When you're happy with the hair, make the skin texture invisible by clicking the eye symbol for the main surface in the Layers panel. The eye should disappear and so should the skin texture, leaving a transparency checkerboard with your hair on it.
http://timelinefiction.net/S3Tutorials/BodyHair/image2.jpg
In the image window, do an Edit / Copy visible to copy the hair image.
Now, make a new 1024x1024 image by clicking File / New. Make sure it's 1024 x 1024. Paste the hair image into it. In the Layers panel you should see a Floating Selection layer appear above the blank white Background layer. Right-click that Floating Selection layer and click Anchor Layer.
(You can save, close, or minimize your image with the hair layer over the skin texture at this point - we won't need it again for the tutorial. In practise I suggest you save it since you may want to work on the hair after you see it in-game.)
You now have an image of your hair on a white background. In the image window, click Colors / Invert. The black and white of the image will reverse and now you have a white image of your hair on a black background. (If your hair is very light or sparse, the image may become almost invisible. Don't panic.)
http://timelinefiction.net/S3Tutorials/BodyHair/image3.jpg
Go back to the Layers panel, right-click the Background layer, and click Add Alpha Channel. Save this image in .dds format as your specular. Give it a descriptive name so you know what it is later, and use DXT5 or DXT1 compression. I use DXT5. Select Generate MipMaps.
http://timelinefiction.net/S3Tutorials/BodyHair/save1.jpg
Now back to the image window. Do Edit/Copy to copy the whole image. In the Layers panel,
right-click the Backgroud Layer and click Add Layer Mask. For the layer mask properties choose Transfer layer's alpha channel. You should see a white square appear in the Background layer bar in the Layers panel.
Right-click the Background layer again, and click Show layer mask. Your image should turn white. Note that BOTH Show Layer Mask and Edit Layer Mask should have a check mark next to them.
http://timelinefiction.net/S3Tutorials/BodyHair/controls2.jpg
Do an Edit / Paste in your image and you should now see the white hair on black background. Again you'll have a Floating Selection in the Layers panel; right-click and anchor it.
Right-click the Background layer in the Layers panel again, and uncheck Show Layer Mask. Repeat to also uncheck Edit Layer Mask, and a third time to check Disable Layer Mask. You should again see the white hair on black background.
(Edited from original) For this tutorial, we'll do a basic adjustment to the RGB channels that looks pretty good for most hairs. In the image window, do Colors / Brightness-Contrast. Lower the contrast to around -100 so the background turns a darkish gray and your hair almost disappears. For sparse hair, it may completely disappear.
In general, the darker and less contrasted this image is the more the hair will stay dark (and visible) despite light hair colors. The lighter it is, the more it'll change with hair color in-game, but the more it'll tend to disappear or look painted on with light blond hair colors. You'll have to experiment with this.
http://timelinefiction.net/S3Tutorials/BodyHair/image4.jpg
Go to the Layers panel, right-click the Background layer, and click Apply Layer Mask. If your hair didn't disappear before, unless it's pretty heavy it probably will now and all you'll see is a checkerboard. Once more, don't panic.
Save this file as your Overlay, again with a descriptive name. You must use DXT5 compression for this file. And again, select Generate MipMaps.
Now fire up Hairinator to make the package. Plug in the two DDS files you just created, select the body area the hair is for, and give your hair a unique name. The name is used to generate a unique ID so I suggest you use a combination of your name and a descriptive name for the hair. Optionally, you can enable the hair for any age/gender you wish, enable or disable for random and maternity, change the order in which it will be listed in CAS, and you can modify the opacity by setting it to a value between 0 (fully transparent) and 1 (fully opaque).
http://timelinefiction.net/S3Tutorials/BodyHair/Hairinator.jpg
Click the Create Body Hair Package button, name the package and save it, and you're done. Now wasn't that easy?