PDA

View Full Version : Tutorial: Creating body hair with GIMP and Hairinator


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?

tomomi1922
11th Jun 2011, 08:16 PM
Yay! Looking forward to trying this out. Thanks for the hard work :bunny:

whiterider
11th Jun 2011, 08:23 PM
...hairinator? Seriously? You just get worse...

CmarNYC
11th Jun 2011, 08:35 PM
...hairinator? Seriously? You just get worse...

But it's Doofenshmirtz approved! :)

ThomasRiordan
12th Jun 2011, 05: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.

CmarNYC
12th Jun 2011, 05:54 PM
Were you able to download? If not, I've attached it here temporarily.

ThomasRiordan
12th Jun 2011, 06:02 PM
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.

TummyZa
13th Jun 2011, 01: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

CmarNYC
13th Jun 2011, 04: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??

Jrs1317
13th Jun 2011, 09: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?

CmarNYC
14th Jun 2011, 01:12 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!

rimybucks1
23rd Jun 2011, 10:45 PM
What brushed did you use...my burshes don't look right to me

CmarNYC
24th Jun 2011, 01:53 AM
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/gimp-brushes-tutorial-how-to-modify-and-create-brushes-in-gimp/

sciguy77
1st Jul 2011, 06: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?

CmarNYC
1st Jul 2011, 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.

sciguy77
2nd Jul 2011, 03: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.

CmarNYC
2nd Jul 2011, 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.

sciguy77
4th Jul 2011, 04: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!

Sharner
14th Oct 2011, 08:22 PM
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 :D Liked the name :rofl:

CmarNYC
14th Oct 2011, 09:58 PM
I know. This post is kinda old. But only now i realized that the Hairinator name was inspired by Doofenshmitz :D Liked the name :rofl:

LOL, I was wondering if/when someone would catch on! :p

AverySim
12th Apr 2012, 02:26 AM
The body skin files don't work in gimp...

CmarNYC
12th Apr 2012, 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.

AverySim
12th Apr 2012, 11:48 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.

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?

CmarNYC
13th Apr 2012, 01: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.

drew1938
15th Apr 2012, 07:10 AM
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.
:gjob:

CmarNYC
2nd Jul 2012, 05:39 PM
..ok im having a big problem right now. editing or trying to edit the sims 1 skins right now, trying to get big breast augmentation and all that by introducing my own skins because im not at all pleased with the limited body and hair shapes they offer in sims so i download gimp in an attempt to make modified skins like those-


sighhhhhhhhhhhh... i hated media class in high school. programs like this looked fun for editing things but teachers could never explain what all the weird functions meant.
how on earth do i use this to make skins with all kinds of shaped hair-heads chest sizes and skin editing because im having a nightmare of a time trying to place a skin in gimp and modify it using the tools, but i know this is a way to. pllease i really want to get to this badly, help plz.


Are you talking about Sims 1, 2, or 3? Sims 2 is the only one I know of that can link a skin to a body shape.

In any case, what you're trying to do has nothing to do with this tutorial. You need to post in the appropriate Create forum.

CmarNYC
2nd Jul 2012, 09:09 PM
sims 1
and how is it not?..
you show a picture in a post of a skin and your adding hair to it on gimp, which is what i want to do minus the hair thing. i have no idea where the other forum is. other people have made a full fledged naruto skin for sims 1. naruto. how. how. how?
is gimp a program able to make 'gameable' skins?
you have to know that by now ive posted on many forums.
everyone stays silent at this but i know they know the know.
thats why i came here.

should also mention that i havent been able to find the fabled body warp program yet. sites say they have it but ive only got loops so far leading to naught.


This tutorial is for making body hair ONLY, which in Sims 3 is a separate overlay to the sim skin. The skin is used only as a background to position the hair. It says at the beginning of the tutorial that it will not teach you how to use GIMP or do texturing. It is also for Sims 3, not Sims 1, and they are totally different so I don't have a clue how to do what you want and am not even sure what you're talking about. I'm not aware of any active modding communities for Sims 1 but you can Google it.

mokbokox
2nd Jul 2012, 09:57 PM
''am not even sure what you're talking about''



..no. you do. your just saying whatever comes to mind. sorry i asked for help from.. well not anything alive.
oh and google. wow.. didnt think of that onel0l.
enjoy the stick end of 2012 and a happy halloween to you .

simsample
3rd Jul 2012, 12:11 PM
mokbokox, we don't have a Sims 1 modding section on this site, so you'll have to ask your questions elsewhere.

Please try to be polite in your replies, CmarNYC was perfectly civil to you and did not deserve your reply.

Navetsea
16th Jul 2012, 02:21 AM
CmarNYC,
thanks for the great Tutorial, I use photoshop so I didn't follow yours here although in concept it is not that different.
However I got a problem where my created hair looks very fine in CAS but then turn blotchy when going back into game, the most white of the alpha channel showing while the subtle edges totally dissappear/ not showing unlike in CAS, but when I zoom into the sim untill it goes semi transparent when the camera starts being to close, there my hair layer shows properly in full detail again, yet when I zoom out, it turns bad again.
http://i.imgur.com/TVYlr.jpg
I have tried DXT5, even 8.8.8.8 RGBA with huge file size but it doesn't solve the issue,

Do you know a tip to work around this?
I have all details set to high in TS3 option
thanks
navetsea

BloomsBase
16th Jul 2012, 10:48 AM
Hi Nav :)
It is related to the alphamaskthreshold i think.
With objects you can play with these settings, setting it higher makes it more crispy while lower gives you a smoother alpha channel but tends to dissapear when zooming out..
Might be the other way arround tho :P

I haven't tested this with CASp tho as clothing doesn't have that material setting, i dont know about hair.
But, in TSRW's meshtab you can open the materials and add the line alphamaskthreshold.
Set it low(30 or 40) to begin with, with a bit of luck this might improve the transparancy of the alpha channel.(value=0-200)

CmarNYC
16th Jul 2012, 02:29 PM
This is why I never uploaded the set of light body hair I spent weeks working on some time ago. No, light or detailed hair just seems to do this and I have no clue how to fix it. The EA hair does the same thing - maybe that's why most of it is so crudely drawn. Seems to be a rendering thing in the game. However, your noticing that the quality appears high like in CAS when zoomed very close is interesting. I'm going to take another look, maybe compare to the way accessories are constructed - possibly there's a setting or something that can be tweaked.

Bloom, I tried your suggestion but it made no difference. :( I didn't really think it would since that's a mesh setting and the body hairs don't have meshes.

Navetsea
16th Jul 2012, 11:29 PM
Hi Bloom :) it's been awhile
Hi CmarNYC

thanks for the replies
BTW since it shows detail when super close and get ugly when on distance, I tried to play around with mipmap filter setting, disable gamma correction, etc that I thought might play part of it, still no improvement so far.
next I'm going to try 2048x2048 or 4096x4096 and see if the game can auto resize higher resolution or not,
if it can, then I will try to use solid brushes to shape the individual hairs and solid alpha, without relying much on semi transparency soft edges that can't be handled well in game.

Marcos08
12th Sep 2012, 01:26 AM
HI I am a fan of yours :gjob: , I have a question for you as you make them look so realistic body hair? I have a hp laptop windows 7 and when I put body hair in the sims 3 hair gets fuzzy and not yours it was very realistic.
you help me please? idk if it is the graphics card or something else. :D

CmarNYC
12th Sep 2012, 03:38 AM
Body hair just isn't rendered very well in the game. I've found it only looks good if it's fairly heavy with fairly sharp edges. It's not easy to do.

somby2
18th Dec 2012, 07:23 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/gimp-brushes-tutorial-how-to-modify-and-create-brushes-in-gimp/


I know this was a while back, but where do I put these so I can use them?