Baking face animations

The preferred way to create facial animations is to add face shape drivers to the armature. In this way you can access the face shapes also when the character is linked into another blend file. However, it appears that drivers don’t work with the BGE, and they will definitely not work if you export the animation outside of Blender.

To fix this problem, I added a way to transfer face animations directly to the mesh shapekeys. Or actually, two ways;

  1. On import, select Face Shapes but unselect Face Shape Drivers. The buttons in the Visemes panel now affect the shapekeys directly, rather than rig properties. So you can use the visemes buttons to create a shapekey animation directly.
  2. Select both Face Shapes and Face Shape Drivers, and create a face animation in the old way. Before using the animation in the BGE (or exporting it to some other app), press Bake Face Animations in the Visemes panel. This button transfers all face animations to the mesh shapekeys and removes the drivers and the rig properties.

bake

To access this feature, download the unstable version from https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/downloads.

Publicerat i Okategoriserade | Lämna en kommentar

DAZ Importer

Daz importer

As I hinted in my previous post, I have now crossed over to the dark side and written an importer for native DAZ Studio files. Or whatever. Anyway, DAZ Studio is a powerful program and many skilled modellers, both professional and amateurs, pour out assets frequently, so it is a pity that it has been so difficult to transfer them to Blender.

For more information about the importer, see my new blog: http://diffeomorphic.blogspot.se/2016/08/daz-importer.html.

Publicerat i Okategoriserade | Lämna en kommentar

MHX2 has moved

For a long time I have been unhappy with the user name ThomasMakeHuman. I first chose the name when I investigated how Collada export from MakeHuman worked in Second Life. In order to access Second Life I had to sign up for a Bitbucket account, and that user name made sense at the time. Soon thereafter MakeHuman moved from the old svn repo to a new hg repo on Bitbucket, and I reused the account that I already had. However, already when I started the MHX2 project I felt that my user name was unfortunate, since MHX2 is a project independent from MakeHuman, although it of course only works in conjuction with it.

But in the last year or so I have been working on things that are completely unrelated to MakeHuman, and it feels strange to put this stuff under the label ThomasMakeHuman. In particular, an importer for native files for Daz Studio (.duf, .dsf) is close to completion. For this reason, I have changed my user name at Bitbucket to something more neutral: Diffeomorphic. The new path to the MHX2 repo is thus https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange and the place to download the zip file from is https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/downloads. The paths to the stable versions have not changed; they are still hosted in my dropbox and are not affected by this move.

Documentation for the Daz importer will eventually be hosted on my new blog, http://diffeomorphic.blogspot.se/, although it is just a placeholder at the moment. The reason why I switched from WordPress to Blogger is that it is appearantly impossible to open multiple blogs connected to the same email address, and since I have used the same Hotmail address for the past fifteen years I don’t really want to change that. The new blog is not exclusively going to be a host for software documentation, but I might write from time to time about other things that interest me, like physics, history or languages. Incidentally, the name of the blog has nothing to do with 3D graphics but reflects my interests in physics.

In the future the content of the present blog may be moved to the new place, but this will not happen overnight and maybe never.

Publicerat i Okategoriserade | Lämna en kommentar

Stable version 0.27

A new stable version 0.27 of MHX2 is available. It can be downloaded from here.

Changes compared to the previous version 0.26:

  • New deform rig. This affects all rigs created by the MHX2 importer. The deformation is hopefully better but it is in any way different. This implies some differences also for the control rigs, e.g. there is only one control bone for the shoulder.
  • New control rigs based on the Default rig (with and without toes) exported from MakeHuman. These control rigs are called Exported MHX and Exported Rigify, and as the names imply they are similar to MHX and Rigify. However, there are minor differences because a control rig can not be made totally independent of the underlying deform rig.
  • Export of expressions and poses from MakeHuman. Poses only work with the Exported rig (because that bone hierarchy is needed), but expressions also work with the Exported MHX and Rigify rigs (because they also have the facial bones).
  • New genitals which have been extracted from the disappeared genital proxymeshes. AFAIU the license allows me to do this, but if somebody disagrees please contact me.
  • Various bugfixes.

The new version has been tested with Blender 2.74 and MakeHuman, both v 1.02 and the current unstable version.

Publicerat i Okategoriserade | 5 kommentarer

Control rigs for the official MakeHuman rig

All current rigs for the MakeHuman mesh derive from two fundamental deform rigs. The deform rig defined by the MHX2 importer originates from work that I started with around 2010, and it has evolved continuously since then. For various reasons, in 2014 it was  replaced as the official MakeHuman rig by the Default skeleton that you can export from MakeHuman. There are some reasons why you might prefer to use the official rig, e.g. that the weighting is better (so they say, anyway). More significantly, the face bones are only part of the Default rig from MakeHuman, so if you want to do facial animations with face bones, you must use it. Facial animation is still possible with the rigs defined by MHX2, but it must be done with shapekeys rather than bones.

A significant drawback of the official rigs is that they lack interesting control structures like inverse kinematics. The plan was always to add a control rig with a Blender script, but this has not happened yet due to lack of resources. Now I have addressed this problem within MHX2. Designing a good control rig from scratch is not a trivial task, so I wanted to reuse the existing codebase and adapt the imported rig so it fits in there. The result are two new rigging options, which I call Exported MHX and Exported Rigify, which essentially behave like the MHX and Rigify rigs, but are based on the Default deform rig.

There are some minor differences though, because the control structure is not entirely independent of the underlying deform rig. Above all, the new rigs have the facial bones, so you can use the expressions described in the previous post with them.

To use the new rigs, you must first export them from MakeHuman. Select one of the skeletons with Face bones, i.e. Default or Default no toes. The latter is strongly recommended, because the toes in the Default rig do not interact well with complex foot rigs.

100-expr-skeleton

Export the character as mhx2, including Expressions among the export options. In the MHX2 importer, there are two new rig types: Exported MHX and Exported Rigify.

110-import

The Exported MHX character has almost the same bones as the original MHX, apart from the face bones on the Head layer. In the MHX2 tab we see both the panels associated with the MHX rig as well as the Face Units and Expressions panels.

120-imported-mhx

There are some additional minor differences compared to the original MHX, e.g. that the shoulder consists of two bones and that the hand bones are very small.

130-posed-mhx

In the Exported Rigify rig the face bones are placed on layer 2, which is unused by Rigify. Note that you must toggle visibility of this layer directly in the armature context; the Rig Layers panel does not know about the face bones since they were not created by the Rigify plugin.

140-imported-rigify

Other difference compared to the original Rigify are new bones on the Torso layer (layer 3). The shoulder consists of two bones, there are breast bones which deform the chest, and pelvis bones that affect the deformation of the hip.

150-posed-rigify

Publicerat i Okategoriserade | Lämna en kommentar

Expressions and Poses

Since some time MakeHuman has expressions and pose libraries. They can now be exported to Blender with MHX2. You need to use the development versions of both MakeHuman and MHX2 for this.

To include expressions and poses, we must first make sure to equip the character with a rig that can handle them. Select one of the rigs with facial bones, i.e. Default or Default no toes. I generally prefer the latter, because I have never had any need for detailed toe poses, and it works better with control rigs.

100-expr-skeleton

Then go to the MHX2 exporter, select Expressions and Poses in the Options box, and press Export.

110-expr-export

Next import the mhx2 file into Blender. There is no special option to control import of expressions and poses. If they are included in the mhx2 file, and we select a rig which has the required bones, they are automatically loaded. This means that the exported rig must also be imported, either by unchecking the Override Exported Data option, or by selecting the Exported rig in the Rigging group. Expressions will also work with the new Exported-MHX and Exported-Rigify rigs, but poses will not because the bone names differ.

120-expr-import

Several new panels now become visible in the MHX2 Runtime tab. Face Units contains sliders that drive the facials bones.

130-expr-face-unit

The Expressions panel contains buttons for more complex expressions. Note that this panel consists of buttons rather than sliders – the expression buttons set the sliders in the Face Units panel. However, you can reduce the effect of an expression with the Expression Strength slider at the top of this panel. This is useful for expressions like a little bit angry. Reducing the expression strength may also be necessary to avoid breaking the face of extreme characters like the baby.

140-expr-expression

In the Poses panel we find buttons with the same poses as in MakeHuman. However, the poses probably don’t look quite as good in Blender as in MakeHuman, because the corrective shapekeys are not exported. Expressions and poses can be mixed, so the character can have an angry face while the body is fighting.

150-expr-pose

Publicerat i Okategoriserade | 10 kommentarer

New stable MHX2 version 0.26

Update April 22:

Apparently I didn’t test this release as thoroughly as I should have, because it contained two serious bugs: clothes did not scale correctly when exported with units other than decimeters, and exported did not work at all with MH 1.0.2. Both bugs have now been fixed, both on bitbucket and in stable 0.26. The download link remains the same: https://www.dropbox.com/s/jrscejsv9uk8ch5/mhx2_stable_026.zip.

Original post:

A new stable version 0.26 of MHX2 is available. It can be downloaded from here.

Compared to the previous version 0.25 a number of minor bugs have been corrected. The new version has been tested with Blender 2.74 and MakeHuman unstable.

For the past half year, I have worked very little on this project, so the unstable version of MHX2 has de facto just been a bug-fixed version of the stable build. This may change in the future, because I am really not very happy with the deformation properties and plan to redo the rigging at some point. As a result, the unstable version may become more experimental and buggy.

Publicerat i Okategoriserade | 1 kommentar