Face Shape Keys

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Face Shape Keys

Postby smonbrogg » Tue Aug 21, 2018 8:15 pm

Hello

Can someone give me a hint about where to edit Face Shape Keys?

I'd like to change them to correspond with the Blend Shapes used by Apples ARKit: https://developer.apple.com/documentati ... pelocation
My goal is to be able to animate exported characters with the iPhoneX in Unity.

I've just started looking through the code and thought perhaps someone can point me in the right direction.. Are the Face Shape Keys that get exported to Blender stored in .target files somewhere?

Thanks for any help!
And also a big thanks to the developers of this project! Impressive work!
smonbrogg
 
Posts: 16
Joined: Tue Aug 21, 2018 7:36 pm

Re: Face Shape Keys

Postby RobBaer » Thu Aug 23, 2018 9:23 am

Not quite sure what you are asking about, but the expressions saved by utility | expression mixer are saved to C:\Users\%USERNAME%\Documents\makehuman\v1\data\expressions by default on Windows.
User avatar
RobBaer
 
Posts: 911
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Face Shape Keys

Postby smonbrogg » Thu Aug 23, 2018 6:01 pm

Thanks for the reply!

I'm trying to export the Targets / ShapeKey / BlendShapes / Expressions or whatever you'd like to call them ;-) The things that deform mesh to a given extreme.

I think they are called Targets in Makehuman.
The Expressions in Makehuman are a combination of targets.

In Blender they are called ShapeKeys.
In Unity (and probably also in FBX) they are called BlendShapes.

The way I managed to export the face targets from Makehuman is to export to mhx2, then I get the face targets as BlendShapes in Blender and can export them further to fbx.

I checked the mhx2 export code and found the function addShapeKeys in import_runtime_mhx2/shapekeys.py
As far as i understand it generates the BlendShapes from data/hm8/faceshapes/faceshapes.mxa

What I dont understand is how the faceshapes.mxa is generated.
There is a subfolder with all the .target files that get converted to BlendShapes, but I dont understand how I can replace them with my own set of .target files because as far as i can tell only the .mxa file gets parsed by the exporter.

Basically I am trying to replace the set of facial targets (31 files: brow_mid_down.target, brow_mid_up.target.....) with my own set of targets that would correspond to Apple ARKit facial BlendShapes.

This would then allow animating the face with the iPhoneX face camera using the source code available in this blog post by unity: https://blogs.unity3d.com/2018/08/13/fa ... g-with-ar/
smonbrogg
 
Posts: 16
Joined: Tue Aug 21, 2018 7:36 pm

Re: Face Shape Keys

Postby michaelg » Fri Oct 05, 2018 7:21 pm

Hello, smonbrogg, I have exactly the same problem. Did you find the solution to create this mxa file ?
I think this is a transformation of selected target files for the coordinates of blender embed in a json file but what is the formula ?

f(target) = mxa but sin cos tan ???

Thank you.
michaelg
 
Posts: 4
Joined: Mon May 01, 2017 11:53 am
Location: France

Re: Face Shape Keys

Postby smonbrogg » Fri Oct 12, 2018 6:06 pm

hey michaelg
I havn't had the time to look further into this, but am happy to hear that I'm not the only one with this problem!
As I'll post here as soon as I find some time and find some solution.
cheers, Simon
smonbrogg
 
Posts: 16
Joined: Tue Aug 21, 2018 7:36 pm

Re: Face Shape Keys

Postby michaelg » Sun Oct 14, 2018 10:40 am

Hi smonbrogg, after a litlle investigation, I think that a good way to use MH avatar with unity will be to finish the export function of shapekeys inside the collada export plugin dae_geometry.py .

Code: Select all
def writeShapeKey(fp, name, shape, mesh, config)

wich is used by
Code: Select all
dae_controller.writeLibraryControllers(fp, human, meshes, skel, config, SHAPEKEYS_LIST)

and
Code: Select all
dae_geometry.writeLibraryGeometry(fp, meshes, config, SHAPEKEYS_LIST)

but flagged as None in actual source code.

Finish something like that (or in the fbx) will be a great advanced for MH software and the Unity coder community.

Michaël
michaelg
 
Posts: 4
Joined: Mon May 01, 2017 11:53 am
Location: France

Re: Face Shape Keys

Postby Henryward » Sun Oct 21, 2018 6:07 am

Nice topic. I think it's help me.
Henryward
 
Posts: 2
Joined: Sun Oct 21, 2018 5:59 am

Re: Face Shape Keys

Postby blindsaypatten » Sun Oct 21, 2018 12:50 pm

I don't know about the .mxa files but could you do the replacement once the shape keys have been imported into Blender instead?
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Face Shape Keys

Postby michaelg » Wed Nov 07, 2018 12:11 am

blindsaypatten wrote:I don't know about the .mxa files but could you do the replacement once the shape keys have been imported into Blender instead?

Hello, it is not as simple as that because we can not use maketarget for example on a complex model exported from MH into blender whatever the format you use (the mesh is not the same).
The better way would be to have a possibility to export the targets used as shapkeys for example in the collada format which is more simple to handle than the fbx one.
As I mention it before there are some functions inside the export plugin for collada that are not finished yet.
If someone as some skills in 3d programming he is welcome.
michaelg
 
Posts: 4
Joined: Mon May 01, 2017 11:53 am
Location: France

Re: Face Shape Keys

Postby blindsaypatten » Wed Nov 07, 2018 3:05 am

michaelg wrote:Hello, it is not as simple as that because we can not use maketarget for example on a complex model exported from MH into blender whatever the format you use (the mesh is not the same)


If you export using the default topology then the mesh is the same and you can import targets using maketarget. If you are using one of the other topologies then it won't work.

If I'm not understanding the issue then just ignore me.
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Next

Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 1 guest

cron