Transforming targets into shape keys (or custom properties)

Discussions about MakeHuman and Blender. It is ok to ask for general Blender support here, even if it isn't directly related to MakeHuman

Transforming targets into shape keys (or custom properties)

Postby pepo » Wed Jul 22, 2020 8:58 pm

When importing MHX2 in Blender, I can enable getting some face targets (e.g. brow_squeeze or mouth_wide) as custom properties in the amature object. Those are probably converted to shape keys. (These targets are actually regular .target files. Interestingly, these targets do not show up in MakeHuman, but I installed them as custom targets so I can use them there, too.)

Is it possible to also get MakeHuman targets there? In particular, I am interested to control laugh-lines (Face/Mouth features) and pupils_grow/pupils_shrink (from community assets) to be able to animate them.
pepo
 
Posts: 13
Joined: Thu Oct 03, 2019 12:03 am

Re: Transforming targets into shape keys (or custom properti

Postby nomorecookies » Thu Nov 05, 2020 3:29 am

Those targets are built into MHX2 importer and are seperate from the MakeHuman targets.

Since the license was just changed, i think it is ok to discuss how to get MakeHuman targets in to Blender now

This is a rather old post asking this question, so i will wait a couple of days to make sure the folks making MakeHuman are ok with sharing the procedure.
If this post does not get a no-no response from the team, i Could write out detailed instructions on how to do it.

But as a quick pointer, look towards MakeShapes and MakeTarget addons
nomorecookies
 
Posts: 35
Joined: Thu Jul 30, 2020 1:34 pm

Re: Transforming targets into shape keys (or custom properti

Postby joepal » Thu Nov 05, 2020 3:08 pm

Since targets are CC0 in recent builds of MakeHuman, I see no problem with importing them as shape keys in blender.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 3874
Joined: Wed Jun 04, 2008 11:20 am

Re: Transforming targets into shape keys (or custom properti

Postby nomorecookies » Fri Nov 06, 2020 7:42 am

joepal wrote:Since targets are CC0 in recent builds of MakeHuman, I see no problem with importing them as shape keys in blender.


That really is excellent news! Thank you all again. I am sure once this information propgates, the user base will increase. which is obviously a good thing.

A Screenshot based ro video tutorial is a possibility in the future, but i am going to be concise here, as i need to get back to work.

A quick overview of getting Targets in to Blender as Shape Keys:
Remember to check and comply with all assets licenses
Note: we will remain in object mode throughout this procedure.
If the Target is a custom target from the community, it is already in target form in the MakeHuman documents folder. In this case, you simply need to import the target into Blender. AssetDK offers this plugin, which is an extension of the MakeTarget plugin.
https://github.com/AssetDK/makeshapes
With this, simply import the target you downloaded and it will become a Shape Key for your MakeHuman model.
If you used MHX2 to import your model, you may need to use the MakeClothes plugin to define the imported model as a MakeHuman valid model to enable the application fo the Target as a Shape Key. otherwise, the option may be greyed out in MakeShapes.

If you wish to transfer a built in shape from MakeHuman, lets use Face/Mouth Features/Dimples as an example.
First, using the MakeHuman Plugin for Blender (MPFB) under Settings/Presets, select MakeTarget and press load.
This setting would prefer your blender to be set to metric, and Decimeter. So, go ahead and set your units that way. I.e. Unit Scale 0.1
Now, go ahead and import your model from MakeHuman by clicking Mesh, which is the the left of the Settings tab you just loaded MakeTarget presets in.
and click Import. Your model should now be in front of you in blender. (If you are lost at this point, please go review all the basic usage tutorials.

Now, back in MakeHuman head on over under modeling to Face, then select the Mouth Features category. Adjust the dimples slider all the way to the right or left. Now, back to blender and import again, with you already imported model still there in the same session. Right after import, the new model with the adjusted dimples is highlighted. Press G then X then 1 then Enter. You newly imported model with the dimples should now be to the side of your originally imported model. While the New model is still selected, hold down Shift and select your original model.
Click the 'Object Data Properties' tab if it is not already active. You know, this is the tab over on the right where the shape keys and vertex groups are listed. In the shape keys section, click the 'Shape Keys Special' arrow, it is right there below the +-.
As long as your models are selected as described earlier, you can click the "Join as Shapes" under that arrow/Menu.
Go ahead and rename the newly created key as Dimples, or whatever. Do not rename the "Basis" shape key. infact until you know exactly what you are doing, just entirely leave that alone. Well, that is it. you now have a Shape Key in Blender transfered from MakeHuman. if you are so inclined, you can now use MakeShapes to export this as a Target, and then you can import it directly back into blender for any MakeHuman model you have in Blender.

Let me know if you have any questions.

nomorecookies user, a member of the Hunanbean Collective
nomorecookies
 
Posts: 35
Joined: Thu Jul 30, 2020 1:34 pm

Re: Transforming targets into shape keys (or custom properti

Postby pepo » Thu Nov 19, 2020 11:56 pm

Thank you for writing such a detailed reply.

You wrote:

> If the Target is a custom target from the community, it is already in target form in the MakeHuman documents folder.

I do not understand. I have both custom targets as well as MakeHuman targets in the *.target file format. Does the MakeShape tool need a different format? I quickly tried loading a *.target file with the MakeShape plugin you mentioned, but it gave a red error about some missing Scene property, so I couldn't test that.

Regarding the "MakeHuman Plugin for Blender", I had hoped I could avoid this, and keep using the "Export MHX2 in MakeHuman and Import in MHX2 in Blender" workflow, mostly because importing MHX2 adds some very useful rig and face properties, and avoids keeping both programs in memory at the same time.
pepo
 
Posts: 13
Joined: Thu Oct 03, 2019 12:03 am

Re: Transforming targets into shape keys (or custom properti

Postby nomorecookies » Tue Nov 24, 2020 7:23 am

If you want to use the MHX2 workflow, you must use MakeClothes plugin to set the MHX2 with a tag that allows MakeShapes to recognize it as a valid mesh to import a '.Target' onto.
Basically, on the MHX2 model you have imported, select the Body mesh only. Click MakeClothes2, and click 'Mark as Human'
again, all of this is done in Object Mode. As far as the desire to not keep both plugins resident, that may not be an option until you get to a point of having all of your targets imported to your MHX2 model.

Let me know how this goes for you, as you will probably hit a different series of issues later.
nomorecookies
 
Posts: 35
Joined: Thu Jul 30, 2020 1:34 pm


Return to Blender

Who is online

Users browsing this forum: No registered users and 1 guest