Detailed tutorial on making mix n match targets

A place for unofficial tutorials posted by MH users

Moderator: joepal

Detailed tutorial on making mix n match targets

Postby jujube » Sun Jul 16, 2017 3:05 pm

**Edit: Important message from something I discovered as I was making this: it seems you have to enable the helpers in maketarget any time you make a target that could affect an item of helper geometry in any way. My current "anti-base" and "startup morph" targets shown in the screenshots are broken. I'll be making replacements shortly. **
Edit 2: Fixed versions are uploaded as new assets, under "anti-base (fixed)" and "startup morph (fixed)". Basically, ignore posts 3 and 4.

Grinsegold requested that I post a tutorial on how I make my targets. I'm including lots of detail and screenshots, so hopefully new users (to makehuman and/or blender) can understand as well. There's also a 7 step condensed version in the comments here: ... _body.html

The "base mesh" you see in maketarget is not the same as the 50% everything base mesh you see when you start makehuman, so people are often confused why their target doesn't look the same in makehuman as it did in blender. So I've been doing stuff to get around that.

First, download the makehuman source code from here ("Download repository"): ... =downloads
The targets that make up the macro tab are found in /makehuman/data/targets/macrodetails/
(You can download individual targets from the website ... at=default)

In maketarget, choose "base mesh" from the dropdown.
1.png (14.02 KiB) Viewed 4414 times

1 point 5.png
Load target file.
1 point 5.png (6.01 KiB) Viewed 4414 times

Browse to where you unzipped the repository.


In this case, I used my custom target that mixes each race/gender to look like the default mesh you see when makehuman starts up.
base_test.PNG (3.17 KiB) Viewed 4414 times

Shapekeys and vertex groups are located here. When you create/load a target, it appears on the tab on the side of the 3d window, but it also appears here in the shape keys area.

Enter edit mode and select the vertices you want to use. Here I used alt+shift+right-click to select the neck edge loops, then hit B to box select the head.

Press the plus button to create a vertex group. In edit mode with the vertices selected, click assign. Then with the target selected in the shape keys section, add the vertex group to Blend.

Vertex groups should appear in this pop-up.

Your human should look like this now. Now the base_test target is affecting only the head and neck.

This is where it gets weird. You'd think you'd be able to save your target normally, but you can't. Either it will appear in makehuman or not do anything, or else maketarget won't save it at all. 10 attachments is the maximum, so I'm continuing in the next post.
Last edited by jujube on Mon Jul 17, 2017 11:56 pm, edited 4 times in total.
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Detailed tutorial on making mix n match targets: part II

Postby jujube » Sun Jul 16, 2017 3:23 pm

Part 2 of my detailed maketarget tutorial.
In shape keys, click the triangle and choose "new shape from mix".

This adds a new target that works like the old one, without needing the vertex group.
14.PNG (15.87 KiB) Viewed 4411 times

Now things get slightly convoluted, as we must duplicate the human object (via shift+D).

On the duplicate mesh, with the new shapekey set to 1.00, remove all the shapekeys. The new shapekey must be removed last.
15.PNG (7.86 KiB) Viewed 4411 times

removing shape keys is weird but harmless.PNG
Applying shape keys makes the mesh look slightly different, and nobody knows why, but it seems to be a blender bug. It's harmless, as the geometry hasn't changed.

Select the duplicate mesh, then shift+select the original (shown here with target turned off). Click "Load secondary from mesh".

This removes the duplicate mesh and creates a new target on the original. Now you can finally "Save Target As".

(Note that before loading from mesh, you may want to create yet another duplicate, in case you want to make more changes later, like if you find it doesn't function well in makehuman.)

This is what the target looks like in makehuman, with the starting macro mix, and no other targets applied.

This is my "anti_base" target. (Get it at "undo race (revert to basemesh)" in the user contributed assets site.)

Combining the two produces the correct result.
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Detailed tutorial on making mix n match targets: part II

Postby jujube » Sun Jul 16, 2017 3:51 pm

Part 3 of my tutorial.

my anti_base is broken.PNG
Unfortunately, there seems to be something wrong with my anti-base. The clothes don't fit the body.

my head test is ok.PNG
But my head target works with clothes, so I know my general procedure for vertex group targets from mesh works fine.

The other method of creating correct targets is:
1) load my startup morph (or whatever macro target you want from the source code) from file
2) Click "New Secondary Target"
3) Edit the target, in edit mode or sculpt mode, *with the first target set to 100%*
4) When it's time to save, change the first target to zero.
5) It will temporarily look incorrect, but it will produce the correct result in makehuman. It prevents the macro target from being applied twice.

This method still works with with vertex groups + load from mesh procedure. Get your vertex groups target to look correct, with the macro target on, and then turn the macro target off when it's time to create new shapekey from mix.

Or, that was how I did it before, but it turns out there's a quicker way:
1) Load target file -> default macro mix
2) Apply targets
3) Set as base
4) New target

This uses the default macro mix as the new point of reference.
It seemed to work fine on a head target. Then I tried it on a body target and found the clothes didn't follow it.
Then I tried method 1 of this post, and that didn't work either!! Do you really have to use the helper mesh and alter the clothes too, every time you do anything? (This happens with targets created in either edit mode or sculpt mode.)
It seems you do. And it seems both my startup mesh and anti-base targets are broken, and don't include the helper geometry.

goofy arms set as base.PNG
using the set as base method, I created a test target

goofy arms fail.PNG
How it looks in makehuman

So for now, this tutorial is incomplete, and I'll have to redo all my mix n match work with the helpers enabled. Dang!!
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Detailed tutorial on making mix n match targets

Postby jujube » Sun Jul 16, 2017 3:59 pm

Part 4: A quick test to make sure clothing behaves correctly when using the helper mesh.
This should also work identically with the apply macro target -> "set as base" method.
quick helper test target.PNG
Quick target, african female
helper target af0.PNG
Saving with african female off
helper target af0 in mh.PNG
Looks as expected on african female in MH
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Detailed tutorial on making mix n match targets

Postby blindsaypatten » Mon Jul 17, 2017 1:55 pm

I hesitate to put commentary into a tutorial thread, but this can be deleted later so...

It's a matter of personal preference and style but I like it when tutorials have a short introductory high level description of the goals and what will be accomplished.

In this case, I think the tutorial addresses three cases:
1) when you have a specific final mesh you want to achieve in MakeHuman,
2) when you only want the target to change specific parts
3) when you want to incorporate targets from makehuman, such as gender and race.

For the first case where you have a completed mesh that you want to import into MakeHuman, like Grinsegold did, you need to have a starting point to which you apply the target. The three obvious choices correspond to the three load mesh options:
1) Average female is the startup config with sex set all the way to female and race set to 100% Caucasian
2) Average male is the startup config with sex set all the way to male and race set to 100% Caucasian
3) Base mesh, which can be reached using an available target on the default startup config (this really ought to be included in the program somewhere)
If your character is male or female loading the male or female mesh is likely the easiest.

I would summarize the process as:
1) load the base or female or male mesh
2) do whatever you want to it, being careful to treat the helper geometry appropriately*
3) when you have your finished mesh load another copy of the mesh you originally loaded, likely using MakeClothes
4) use Load target from mesh to generate a target that performs the morph you want.
By appropriate treatment of the helper geometry (the little boxes inside the mesh and the eyelashes etc.) I mean these should maintain their position relative to the mesh. For example, if you scale the height of the mesh include the helpers in the scale.

In addition you could explain here how to build the revert to base target into the target.

Once the reader understands how to set a starting point and produce a transform to the end point you can deal with how to use vertex groups to only affect part of the mesh.

The final concept is using the transforms from the source code.

And then I guess there is an additional question of how to handle clothing helpers, which I haven't looked into.
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Detailed tutorial on making mix n match targets

Postby jujube » Mon Jul 17, 2017 10:10 pm

Nah, your commentary is fine.

I prefer concise tutorials too. I tried to do that kind of high level summary in my comment in the user assets, and then grinsegold asked for pics, and then I decided to just take a bunch of pics and make it really detailed, imagining the blender newbies that may be reading. Or just for troubleshooting purposes, for whoever's having trouble and needs to see a specific step.

But maybe it's kind of a misguided direction anyway, since there's a huuuuge gap between the various blender skill levels. (the first level being the ultra beginner who is learning where the basic features and hotkeys are, and needs the screens showing where things are. but for low-intermediate level users, having a lot of screenshots of stuff you already know gets in the way of seeing the big picture and getting to the part where you can absorb the new stuff.)
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Detailed tutorial on making mix n match targets

Postby blindsaypatten » Tue Jul 18, 2017 8:42 pm

I didn't intend to suggest taking out the pictures, just adding an introduction so that users know conceptually what they are doing, and then the pictures show in detail how each step is accomplished in Blender.
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests