For ThomasL: Help needed with MHX2 to Blender to Unity5.6.0f

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

For ThomasL: Help needed with MHX2 to Blender to Unity5.6.0f

Postby Shaba1 » Thu Jun 29, 2017 9:05 pm

Thomas.

I am taking a Makehuman character and importing it into blender with the mhx2 rig. Then animating it with a combination of fk and ik. Saving the animations out as actions then exporting the whole model to fbx for import into unity. All of that does not work perfectly but after much trail and error I have gotten it to almost work ( I am going to write and publish a tutorial latter this summer on the pitfalls and tips that others might encounter)

Once you bring the fbx file into the unity project folder all the actions show up as animation clips. And they PREVIEW in the object inspector perfectly. The problem is mapping the Makehuman`s character's bones to what Unity thinks the bones should be. I wll included 3 screenshots of what I mean. There needs to be some defintion of which bones actually make the mesh deform in a mhx2 rig. Which is that I "Think" Unity's Mecanim system wants to know.
capture_001_29062017_125305.jpg
Attachments
capture_007_29062017_125542.jpg
capture_006_29062017_125530.jpg
capture_005_29062017_125519.jpg
capture_003_29062017_125432.jpg
capture_004_29062017_125501.jpg
capture_003_29062017_125432.jpg
capture_002_29062017_125411.jpg
Shaba1
 
Posts: 164
Joined: Wed Mar 05, 2008 3:21 pm

Re: For ThomasL: Help needed with MHX2 to Blender to Unity5.

Postby Shaba1 » Fri Dec 01, 2017 11:30 pm

I have discovered that the problem is that MHX2 uses 3 rigs with copy rotation and location constraints between them. One rig is for IK bones, one is for FK and the third is a visual link for the user to go between the two others. So when you export to fbx only the "visual link rig" is exported. All the bones in that rig are not connected which is why Unity' s Mechanim system cannot see it as a Humanoid rig.

There are two answers that I have found so far:

#1 Use Mechanim's generic type rig. The downside of that is that you will not be able to share animations between models.

#2 Import into blend using the game or xitonic rig in the import settings dialog of the MHX2 importer in blender. That will ingore whatever rig you have given the model in MH and use either the game or xitonic rig instead. The two are very simple skeletons and should be good for most game needs. You will have to set up any IK bone constraints yourself inside of blender and maybe make and FK<-->IK switch using drivers yourself ( MHX2 does both of these for you automatically) But you will have facial animations and visemes if you choose those on import.
Shaba1
 
Posts: 164
Joined: Wed Mar 05, 2008 3:21 pm

Re: For ThomasL: Help needed with MHX2 to Blender to Unity5.

Postby joepal » Sat Dec 02, 2017 11:13 am

Did you read this? http://www.makehumancommunity.org/wiki/ ... them_there

If you need to go via blender, you might still want to use the game rig rather than the MHX2 rig. Downside is you lose FK. Upside is it maps perfectly on top of mechanim.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: For ThomasL: Help needed with MHX2 to Blender to Unity5.

Postby Shaba1 » Wed Dec 13, 2017 2:08 am

joepal wrote:Did you read this? http://www.makehumancommunity.org/wiki/ ... them_there

If you need to go via blender, you might still want to use the game rig rather than the MHX2 rig. Downside is you lose FK. Upside is it maps perfectly on top of mechanim.


I had not seen that page thanks. I was exporting using fbx from blender. I am using the game rig. But I do not "lose" FK. If you mean not being able to manipulate the armature bones inside of unity then I think I know what you mean. I do all my animating inside of blender then export each action into unity. This makes each action and animation clip inside of unity. The only problem is having to set up a driver inside blender to switch between FK and IK when making keyframes and poses. But I learn how to do that after many many weeks of viewing video tutorials.

BTW I am going to make a very long WRITTEN tutorial on this whole process once I get it completely finished.
Shaba1
 
Posts: 164
Joined: Wed Mar 05, 2008 3:21 pm

Re: For ThomasL: Help needed with MHX2 to Blender to Unity5.

Postby Paulprog16 » Tue Jul 30, 2019 11:06 am

Shaba1 wrote:
joepal wrote:Did you read this? http://www.makehumancommunity.org/wiki/ ... them_there

If you need to go via blender, you might still want to use the game rig rather than the MHX2 rig. Downside is you lose FK. Upside is it maps perfectly on top of mechanim.


I had not seen that page thanks. I was exporting using fbx from blender. I am using the game rig. But I do not "lose" FK. If you mean not being able to manipulate the armature bones inside of unity then I think I know what you mean. I do all my animating inside of blender then export each action into unity. This makes each action and animation clip inside of unity. The only problem is having to set up a driver inside blender to switch between FK and IK when making keyframes and poses. But I learn how to do that after many many weeks of viewing video tutorials.

BTW I am going to make a very long WRITTEN tutorial on this whole process once I get it completely finished.


Hello Shaba1.

Did you manage to get this to work in the end?
Paulprog16
 
Posts: 4
Joined: Tue Jul 30, 2019 10:48 am


Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest