esperesa: (Default)
Yuxi ([personal profile] esperesa) wrote2000-01-01 01:38 pm

[Part 2 of 3 ] Male-to-female hair conversion guide

This is a quick draft for anyone who already knows what they're doing in Milkshape. I'll elaborate later with more screenshots and more instructions.



*) Import the extracted mesh using the Unimesh import thing-o, then import Dr. Pixel's female base as an OBJ so we can see what the hell we're doing. I find it handy to select the 'Coloured Groups' option (Right-click).
To import an .obj file, to to File > Import > Wavefront .Obj.

*) Use alt+click to select vertices in the main screen. Also, don't work on 'full screen' as you'll need the windows to the left to move things. Mess around a bit to get to know the program if you've never worked with it before.

*) Male heads are bigger than female heads and if you don't edit the back of the hair_alpha layers the style will sit unnaturally on the head in the back. Usually I select the entire hair minus the scalp (the scalp's fine - make sure not the edit it unless you haven't been replacing it) and size it down a tiny bit using 'Scale', then grab the back and resize it more. After that, I tend to move the back to the neck and the front to the forehead. Then I edit things by hand by selecting individual vertices to fit the female head better and to iron out any weird shapes I caused this way, until I am satisfied. Take your time, it's not a race.

Of course, I don't know what mesh you're fiddling with, but if it's not a Maxis mesh, seriously: Don't just move the thing forward or backward. It looks bad from behind.

*) If the mesh allows for simple scalp-replacing, great.

Elaborating on scalp-replacing:
- Copy the comments of the 'hair' layer of the original mesh.
- Paste them in the comments for the 'Example_scalp' layer of the imported .obj model
- Rename 'Example_scalp' to 'hair'.
- Delete the original 'hair' layer.

Remember to assign the entire scalp to the head (select nothing but the scalp, go to Vertex > Sims 2 UniMesh Bone Tool > joint 7, weight 100%), and then the the 5 vertices on the bottom of the back to the neck for 50%, e.g.: 50% - 7 - head, 50% - 6- neck:



Make sure you don't move the scalp in subsequent editing, or you'll get gaps.

MAXIS HAIR
(or simply hair with a 'hair' layer you can't just replace)

*) Import the female base if you hadn't already done so. Move the hair layer(s) and rotate it a bit so it fits the female head a bit better, then select a vertice of the hair and the nearest vertice of the model's head - deselect the head, then move the hair-vertice to the previously-selected vertice on the head in each of the two windows. And... repeat for every vertice on the scalp.
I've yet to find an easier way than this, but hey, it works. Dude, right. Extended manual edit. Got it.
(Clarification + screenshots will come)


*) When you're done, delete the example_body and example_face layers, export the hair model using Unimesh, go to your mesh package, right-click and replace the old mesh with the edited version, then hit commit and save.

I don't use the BaseGameStarter because it fucked up my game's language settings, so I usually move my download folder somewhere else, only put a single model, the new mesh and the original mesh in it and then alternate between genders in Bodyshop to see where it needs more editing (and to check if the hair doesn't sit too high/low, etc). Because hair sitting too high is my biggest freaking peeve.

[identity profile] sixtylilies.livejournal.com 2008-11-24 04:42 pm (UTC)(link)
If I might bother you for a moment, I'm having a bit of trouble with the meshing part of this. The front of the mesh looks fine, but from the side and the back there's a rather huge gaping hole. I assume I did something wrong and the mesh is not actually attached to the head. So far no amount of fiddling with individual vertices has been sufficient to fix it. Is there something major I'm missing, or must I keep on with the fiddling?

[identity profile] esperesa.livejournal.com 2008-11-26 02:20 pm (UTC)(link)
Hm, huge gaping hole you say? Do you have a screenshot, perchance? If it looks fine in Milkshape but no amount of fiddling decreases the gap, chances are it's a bone assignment issue. Or maybe there are some stray vertices that mess everything up.

[identity profile] sixtylilies.livejournal.com 2008-11-26 08:40 pm (UTC)(link)
Well, I'll be honest, part of the problem is that I really can't tell if it looks all right in Milkshape, because I've only really done objects until now. From what I can tell of the model it looks fine, but I'll get a screen of it in Body Shop: http://i35.tinypic.com/29c5fm.png

(I think this may just be beyond me for now, because I don't really understand bone assignments. Or anything relating to them.)

[identity profile] esperesa.livejournal.com 2008-11-28 04:02 pm (UTC)(link)
*stabs LJ's lack of notification*

Ah, so it's the scalp. Bone assignments for the scalp are actually extremely easy, but I'm not sure if that's the issue. Would you like me to have a poke at it so I can say what's causing it (and how to fix it) for sure?

[identity profile] sixtylilies.livejournal.com 2008-11-28 04:27 pm (UTC)(link)
That would be great, if you don't mind. I just rared up the folder for you, because I'm not sure whether you want my Milkshape file or the .simpe files. Here 'tis (http://www.sendspace.com/file/bi5ucb). Thanks so much. :)

[identity profile] esperesa.livejournal.com 2008-11-28 05:12 pm (UTC)(link)
Alright, good news - it's very easy to fix. I added some more instructions above yesterday, but all you need to do at this point is this:

- Copy the comments from the 'hair' layer to the comments of 'example_scalp'. It's usually the same for every mesh:
ModelName: hair
Opacity: -1
HasTangentArray:
NumSkinWgts: 3

- Rename 'example_scalp' to 'hair'.
- Delete the old hair layer, example_face and example_body.
- Select the new scalp.
- Assign it to the head, like so:

Image

Image

Don't forget to assign the bottom 5 vertices to the neck to prevent gaps for 50%, as described above.

You'll notice the textures are now slapped on the scalp in BS, which needs to be remapped (which I obviously forgot to mention in this part, meh). It's a pretty straightforward process: Go to the Materials tab, click on one of the buttons, select the texture for this hair, select the scalp only in the 'Groups' tab and hit 'Assign' in the Materials tab again. Then go to Window > Texture Coordinate Editor, select 'hair' from the drop-down menu and move things around. I tend to just try and replicate the original mapping, or move the scalp to an empty spot on the textures.