Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Speed-Building Challenge - posted on 17th Oct 2018 at 6:25 PM
Replies: 46 (Who?), Viewed: 34828 times.
Page 1 of 2
Ms. Byte
staff: moderator
Original Poster
#1 Old 11th Jun 2011 at 8:11 PM Last edited by CmarNYC : 29th Jun 2011 at 11:38 PM. Reason: Added explanation
Default Tutorial: Creating body hair with GIMP and Hairinator
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.



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.



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.



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.)



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.



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.



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.



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).



Click the Create Body Hair Package button, name the package and save it, and you're done. Now wasn't that easy?
Download - please read all instructions before downloading any files!
File Type: zip AdultBodySkins.zip (840.9 KB, 675 downloads) - View custom content
Description: Adult body skins
10 users say thanks for this. (Who?)
Advertisement
Top Secret Researcher
#2 Old 11th Jun 2011 at 8:16 PM
Yay! Looking forward to trying this out. Thanks for the hard work

I work for a living, but I don't necessarily live for a working.
Née whiterider
staff: administrator
#3 Old 11th Jun 2011 at 8:23 PM
...hairinator? Seriously? You just get worse...

What I lack in decorum, I make up for with an absence of tact.
Ms. Byte
staff: moderator
Original Poster
#4 Old 11th Jun 2011 at 8:35 PM
Quote:
Originally Posted by whiterider
...hairinator? Seriously? You just get worse...


But it's Doofenshmirtz approved!
Field Researcher
#5 Old 12th Jun 2011 at 5:13 PM
Is there an alternate download source for Hairinator? At the moment this site keeps erroring when trying to download making it impossible to continue the tutorial.
Ms. Byte
staff: moderator
Original Poster
#6 Old 12th Jun 2011 at 5:54 PM
Were you able to download? If not, I've attached it here temporarily.
Download - please read all instructions before downloading any files!
File Type: zip HairinatorV1.1.zip (844.0 KB, 103 downloads) - View custom content
Field Researcher
#7 Old 12th Jun 2011 at 6:02 PM
Quote:
Website Offline, No Cached Version Available The website you are trying to access is currently offline. The most likely causes are the server is down for maintenance, there may be a network problem, or the site may be experiencing excessive load. The site uses CloudFlare in order to help keep it online when the server is down by serving cached copies of pages where they are available. Unfortunately, a cached copy of the page you requested is not available, but you may be able to reach other cached pages on the site. If you continue to receive this error after you believe the site is back online, you can retry a live version of the site.


Even on the one you just posted I get this error. I've tried several other downloads here and they all come up with that error. Even the attachment for the male/female bodies attached here errors now when it downloaded fine when I started the tutorial.

Edit: Forcing it retry a live version finally worked on the file you posted. Thank you.
Lab Assistant
#8 Old 13th Jun 2011 at 1:03 PM
Thank you ^o^
But the problem with body hair overlay is it looks very blurry especially the limbs part even I already tried with 2048*2048
or maybe I should turn up to 4096*4096... lol
Screenshots
Ms. Byte
staff: moderator
Original Poster
#9 Old 13th Jun 2011 at 4:42 PM
I think that screenshot looks pretty good myself although I might see the problem in better lighting. Anyway, my guess is that increasing resolution won't help and might hurt since the game has to scale the image down. But only experimentation will tell for sure.

In my own attempts at body hair I haven't seen blurring as a problem - it's the way the game uses the texture as a transparency map, leading to different effects with different hair colors. Lighter colors in particular tend to look flat and to disappear, while red hair tends to look spotty. I'm working on a chest hair that looks good with other colors but with red hair it looks like the guy has pimples.

Do accessory hairs look a lot better? I've never tried one. Possibly they're rendered with lod0 detail while body hair and tattoos are rendered at lod1??
Test Subject
#10 Old 13th Jun 2011 at 9:52 PM
I dunno. Now that I have windows 7, my graphics card has access to nearly 4 gigs of ram. My texture rendering problems seemed to have mysteriously disappeared.

Thanks for this! My graphics editor is in many ways a lot more intuitive than Gimp, but lacks some of it's features. Am I too understand that the overlay is similar to the multiplier in clothing textures, and the specular somewhat like the mask?
Ms. Byte
staff: moderator
Original Poster
#11 Old 14th Jun 2011 at 1:12 PM Last edited by CmarNYC : 14th Jun 2011 at 4:33 PM.
Looks to me like the overlay works the way the base texture does in clothing - the alpha is a transparency mask and the RGB has the image that's recolored to the current hair color.

The specular - going by the name (which I got from the xml) it should control lighting and reflection. Honestly I haven't experimented, just copied what they look like in the game hair. Maybe it's used like a normal map??? I haven't seen any evidence of a separate normal map. Have to look into that.

I used the simplest CASP structure I could find in the game hairs, but many of the hairs also have what appears to be an RGB recoloring mask, which I couldn't find that it actually did anything. There's only one recolorable area after all!
Test Subject
#12 Old 23rd Jun 2011 at 10:45 PM
What brushed did you use...my burshes don't look right to me
Ms. Byte
staff: moderator
Original Poster
#13 Old 24th Jun 2011 at 1:53 AM Last edited by CmarNYC : 19th Jul 2011 at 10:52 PM.
For curly hair I used several of Nagel's Photoshop brushes from series 12, 19, 21, 36, and 43 - GIMP can use them. The complete set is here: http://um3d.dc.umich.edu/lounge/showthread.php?tid=58

For straighter hair I'm experimenting with making my own brushes, with mixed results so far. Here's a good tutorial: http://emptyeasel.com/2008/10/03/gi...rushes-in-gimp/
Field Researcher
#14 Old 1st Jul 2011 at 6:38 PM
I think doing an overlay will give me much better results for the tans I'm making -- would this method work for that? Right now I'm doing the tans like a tattoo and using the body specular as the base texture. I use an RGB mask to define the areas where the skin tones can be painted on. I'd need to be able to change the color of the overlay in CAS in at least 2 colors (some suits have mesh panels). Is that possible?
Ms. Byte
staff: moderator
Original Poster
#15 Old 1st Jul 2011 at 10:38 PM
How are you making the tans - as clothing or as a tattoo? They work quite a bit differently. And what are you thinking of using as an overlay?

I think you're making tan lines to go with swimsuits? IMO the best way to do that might be as part of the swimwear clothing - make the tan or pale areas almost transparent using (I think) the alpha channel of the base texture. Make the alpha some shade of gray depending on how transparent you want it, and make that area one of your recolorable channels, and you can preset it to pale pink or dark tan or whatever depending on what effect you want.
Field Researcher
#16 Old 2nd Jul 2011 at 3:19 AM
The tan lines I've made are tattoos using cloned gloves, and they do go with a clothing swimsuit. I'm getting fairly nice results with the tans by using a solid alpha channel combined with a detailed grayscale skin as the base. I don't know why it never occurred to me to make the tan lines transparent. I did it with the swimsuits to make the transparent panels in them. The results are good for the most part, but I have to fiddle with the base quite a bit because of how the tans look around the dark areas of the body -- especially around the butt. The results can also look a little weird when my detailed base skin is used with a different skin. It can get really noticeable.
Wouldn't I get better results (and have to do a lot less fiddling) if I set the tan areas up as a solid color overlay? The tans would be set to a specific area and then whatever color I applied would just wrap itself to whatever skin is on the body. I'm working on the tan lines for the 2nd suit now and will start playing with the alpha channel. This one also has 2 different tan regions. I couldn't find any info on applying an overlay to the skin -- is it the same method as applying a mask? There's a place in CTU where you can place overlays, but so far I haven't come across any CC that uses them. If I can find ONE, I can pull the overlay out and take a look at how it's done.
Ms. Byte
staff: moderator
Original Poster
#17 Old 2nd Jul 2011 at 10:18 AM
You're making the tans as an accessory, then? Yes, I think a solid semi-transparent color would work better with the variety of skins out there.

There are various overlays available but you don't want to use a skin overlay; that would change the skin itself. Using the gloves accessory is an overlay of sorts. A clothing overlay as part of your swimsuit might be an excellent idea - if you look at the game afBodyApron, it uses the overlay apparently to apply the stains on the apron, the gray color to the apronstrings, and the patch on the jeans. It has an alpha channel to control transparency as well. Maybe you can adapt that for your tan.
Field Researcher
#18 Old 4th Jul 2011 at 4:17 AM
There's a lot going on with that apron! I'll get more in depth with it on the next suit for sure. I just finished the tan using about 50% gray on the alpha and I got some pretty nice results. The nipple area can get a little dodgy if the applied color is too light, but as long as there isn't a major difference from tan to natural skin in looks good. All I have to do is make a couple of minor touch-ups and the 2nd suit will be ready to upload too. The tans are anywhere from acceptable to good so far, but I know they can be better -- I just have to figure out the right way to do them! Thanks for the tip on the apron -- figuring out how everything works on it should keep me busy for a while!
Test Subject
#19 Old 14th Oct 2011 at 8:22 PM
Quote:
Originally Posted by CmarNYC
But it's Doofenshmirtz approved!

I know. This post is kinda old. But only now i realized that the Hairinator name was inspired by Doofenshmitz Liked the name
Ms. Byte
staff: moderator
Original Poster
#20 Old 14th Oct 2011 at 9:58 PM
Quote:
Originally Posted by Sharner
I know. This post is kinda old. But only now i realized that the Hairinator name was inspired by Doofenshmitz Liked the name


LOL, I was wondering if/when someone would catch on! :p
Test Subject
#21 Old 12th Apr 2012 at 2:26 AM
The body skin files don't work in gimp...
Ms. Byte
staff: moderator
Original Poster
#22 Old 12th Apr 2012 at 12:25 PM
If you mean GIMP won't open the .dds files, you need to install the DDS plugin linked at the beginning of the tutorial.
Test Subject
#23 Old 12th Apr 2012 at 11:48 PM
Quote:
Originally Posted by CmarNYC
If you mean GIMP won't open the .dds files, you need to install the DDS plugin linked at the beginning of the tutorial.


I tried that. It says i'm missing some file, but I checked its there. I'm using a converter...

Why does my hair show up as a black skin?
Ms. Byte
staff: moderator
Original Poster
#24 Old 13th Apr 2012 at 1:59 PM
If you upload your hair package I'll take a look. If you're using a converter it may not be converting into the right format, especially the alpha channel. You really should try to get GIMP working.
Test Subject
#25 Old 15th Apr 2012 at 7:10 AM
Default To anyone still using this as a resource...
paint.net works great for converting dds so you can edit textures(in general) with another program. You can get it at paint.net. When you convert the dds's, save them as png's not jpg's. png files have transparency support.
Test Subject
DELETED POST
2nd Jul 2012 at 10:36 AM
Default Editing With This Program
This message has been deleted by mokbokox.
Page 1 of 2
Back to top