Hair texture tutorial - p.2.
Hello! Today I wanted to share the second part of this tutorial, specifically how to dye hair texture to achieve results like this:
As I said earlier, we can color textures in several ways - in graphic editors (for example, Photoshop or Gimp) or directly in the blender. Today I'm going to show you how to do it in Blender, because this method is more interactive and has instant feedback, so you can see what you're doing right away.
As always, open the model file and go to the shader editor. I hope you haven't forgotten about the texture we baked at the end of the first lesson - we'll need the texture we're made in first lesson.
Oh dear! What is this?
Don't worry, it can be fixed! Go to the shader editor and select our texture. Now go to the texture paint window - just right near shading (I hope you use standard blender ui). I think you already know how to move between modes, so here we switch to edit mode and press 3 on the row of numbers at the top of the keyboard to select only faces. select the “ugly” sides and return to texture paint mode. Here, enable paint mask so we could paint only on selected faces and press alt+shit+z to turn off overlays. Use Finger or Shift+x shortcut (without clicking!) to eyedrop correct colours and paint over.
looks better, isn't it? turn on overlays by pressing alt+shit+z again.
Important! Save your texture again by pressing shift+alt+s and resaving it at the same directory! Or else blender may reset it and you will loose what you had painted.
Now, you need... sims 4 studio! Follow this tutorial to batch export textures from any hairstyle you chosen, it doesn't matter - we just will replace them when saving our textures.
Usually, i use this ponytail as reference - it has pretty good colors. You can choose anything else.
In blender, return to shader tab and open hair texture. I've already done few swathes so I'll begin from the 6th.
Create color ramp and plug into it your texture you did bake before. In the color ramp, press into the color and use eyedropper to choose darkest and lightest color from reference texture. Then chose 2 middle tones and tweak their position on color ramp until you'll like the result. To add new colors to color ramp, press + icon.
Press shift, click and hold the pos field and move your mouse left and right to adjust the value more precisely.
Looking already good, isn't it? Oh, I almost forgot!
Plug your color ramp into the principled bsdf - because hair model will exist in lighting setup. Change your world color (i've told how in the part one) to something like #E8E8E8FF. Go bock to object shader mode and set up principled bsdf.
This time it's easy - set Roughness to 1 and IOR back to 1. Plug texture's alpha into the alpha channel and apply same material to the head model if you like me had drawn scalp texture behind the scenes (and enable it for the render)
You also can use more complex world setup - just put here any good neutral hdri texture. You can find them easily at the internet. This setup can give you some better results for previewing, while not too much rendered.
When you're satisfied with the material, create an empty image texture node with a size of 1024*2048.
! Go into render tab anf choose color mode "standard"! Also in film select transparent. copy this node setup and plug result into output:
Select BOTH head and hair model in any order, select empty hair texture and bake them. Now blender will render it two times.
Here's result:
It has transparency, so don't worry. Save the texture instead that only you're had exported from s4s and keep baking textures to that one image texture node. You still may need to fix margins in image editors so it won't overlap with any other texture spaces.
for gray hairs use other setup:
you'll need ready brown and black hair textures. Rebake, in my case, is grayscale texture, but you can use white as well is you already did one. Into uv put your texture uv's. Bake it as you did before.
You're done!




















