Search Unity

Workflow for MakeHuman to Blender to Mecanim

Discussion in 'Editor & General Support' started by jmatthews, May 24, 2013.

  1. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    I've been experimenting with MakeHuman to Blender to Mecanim and I'm finally getting the workflow down. I was curious if anyone else has tackled this and if you want to exchange notes.

    I've tried exporting each of the possible rigs and they all have some issues mapping to mecanim. The two best so far has been the GameRig and the SimpleRig. I've settled on the SimpleRig because it provides more detail on the face area and I'm in the process of trying to perfect the .HT file so you'll have a mappable and rigged toon just using the provided workflow.

    Anyone else have experience with this? Or anything else they can add?
     
  2. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    I'm getting closer.




    As you can see, the teeth are attached to the wrong bone somehow, which is tough because they use a separate piece of rig. I can just delete them but if I can get this last part then I'll have a guy rigged well enough to do face close ups with a wider range of emotions and lip synching.

    Anyone tackled this before that could give advice?
     
  3. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    Got it, I can bust out a mecanim compatible humanoid model in roughly 30 minutes now. The fix was just to get in blender and manually paint some of the vertices that weren't in a vertex group. Unity will give you a count of the vertices as a hint. For me it was the teeth. I still have about 45 vertices that aren't in a group but i haven't been able to detect an issue and don't feel like cleaning it up at this late hour.

    I'd post a new video but it's largely the same minus the teeth flying around.
     
  4. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    A quick update. The Make Human mapping is tried and tested now and I've begun a very basic attachment system for adding modular equipment to the rig. I hope to eventually get some clothes on this kid.

     
  5. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    Finally. Pants for everyone!



    The pants are rigged like the body parts it covers and I match bones at runtime to bind the equipment and synch the movement. Kind of a pain to have to rig all of the equipment but the proof of concept is solid, even if my artwork isn't.
     
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    No, Unity should stick to making its game engine better and better and not add a bunch of bloated features to accommodate the lazy or inept. Clearly it can be done already. If you want this feature added to Unity YOU do it.
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Blender got support for it because the developers of MakeHuman implemented it.
     
  8. jmatthews

    jmatthews

    Joined:
    Jul 27, 2011
    Posts:
    199
    It's complex enough to represent a good unit of work. I plan on doing another pass on it soon and may push it out as an add on. This type of work always beats me because my modeling skills are bunk, and throwing junk in my test bed agitates me even when I should know better. So i end up modeling mediocre gear and getting distracted.
     
  9. Staross

    Staross

    Joined:
    Jan 6, 2013
    Posts:
    51
    I'm also using makeHuman with blender and unity, I think I'm using the simplest rig though. I had some problems at first but it wasn't so bad at the end.
     
  10. Steviebops

    Steviebops

    Joined:
    Apr 9, 2013
    Posts:
    132
    I've been trying to get my rig compatible with Mecanim.
    Unfortunately I have ik on the arms->hands that means the hand is not a child of the forearm it's attached to.
    It's making it hell to get into Mecanim.

    I can make the hand a child of the forearm, but then the process of animation in Blender becomes a pain.

    I wish the mecanim hierarchy wasn't so strict. It's really stumping me.
     
  11. brian_yx

    brian_yx

    Joined:
    Jul 26, 2013
    Posts:
    1
    can you send me what you have so far, whether just instructions or files like the .ht? i'm starting work on a game in unity, and planning to use makehuman to do the characters. i'd rather not re-implement the wheel. PM me for more contact info.
     
  12. Bukyja

    Bukyja

    Joined:
    Jul 7, 2013
    Posts:
    31
    I'm using makehuman, i can say with simple rig its working nice in every software i use (motionbuilder, blender, unity udk etc etc), the only one problem is than you ve to create more bones in the hands, remove teeth bone and re weight. Another one problem i ve found when i use it in unity, characters dont preservevolume exporting from blender, still if i apply modifiers, any suggest?
     
  13. Baka87

    Baka87

    Joined:
    Oct 27, 2013
    Posts:
    14
    Its too bad make human doesn't work natively with mechanim.
     
  14. lcairco

    lcairco

    Joined:
    Nov 19, 2013
    Posts:
    1
    The Xonotic rig works pretty well for Unity if you're just looking for the most simple bones. Also, I made a custom skeleton file for Unity. If you put this file:

    https://www.dropbox.com/s/jd7lc9jf2ato5rk/unity3d.json

    into

    \makehuman\data\rigs

    from the SVN-checkout of makehuman, this skeleton template is automatically recognized by Mecanim without any fiddling, and it includes the face and finger bones that Xonotic leaves out.
     
  15. Holographic

    Holographic

    Joined:
    Dec 28, 2013
    Posts:
    11
    Hey guys.. I'm trying to get into this workflow. would absolutely love to get a makehuman rig into unity. Can I add that skeleton file into makhuman 7 and that fires out a rig that will work in blender and unity? ie I can animate in blender but also use mocap in mechanim. I've already tried it and obviously doeasnt work. Another dude on here wrote a script for the rigify rig in blender and it worked a charm.. but the beauty of the makehuman rig is the facial constraints.. can anyone run me through the process? Regards
     
    Last edited: Jan 15, 2014
  16. Holographic

    Holographic

    Joined:
    Dec 28, 2013
    Posts:
    11
    Ah I see the rigs in the options. is it the simple rig or the game rig i need to export?
     
  17. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    wow, necro thread :) Holographic... you might try bringing the rig into Blender first. Blender has a plugin that's disabled by default but you can turn it on and it allows you to import MakeHuman files... you could then save as .blend or export to FBX and use within Unity.
     
  18. Holographic

    Holographic

    Joined:
    Dec 28, 2013
    Posts:
    11
    Ach!! thought I had a work around by appending the hand done animation from the mhx rig into the simple rig version. its recognoising the animation but not all the bones are confroming.. bummer!
     
  19. Holographic

    Holographic

    Joined:
    Dec 28, 2013
    Posts:
    11
    Heya Dustin. ah yeh i've been bringing it into blender alright. but the fbx export wont work properly in mechanim/unity. I want to use hand done animations as weel as use mo cap in unity and mix them up while keeping the facial rig.
     
  20. Mikie

    Mikie

    Joined:
    Dec 27, 2011
    Posts:
    367
    When I export from Blender(2.69) I get a bounce of blank mesh files and a lot of GZM.?? files. Is there anyway to eliminate these files from the fbx export?
     
  21. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    I wasn't sure if I should start a new thread or go with this one. I'm trying to work with a MakeHuman to Blender to Unity workflow and I still have two main issues.

    1st my custom animations are not quite right. I have one animation in Blender where the character shifts her weight over to one leg but in Unity it shows up as the legs moving under the body. I'm sure that this is an easy fix somewhere but I can't figure it out.

    2nd the mesh doesn't deform properly. I get funny deformations especially around the elbows and knees.

    I'm exporting from MakeHuman with the blender exchange format and the rigify rig. I make the animations in Blender and keyframe LotRotScale for the whole armature for each keyframe. I then export as fbx ascii into my Unity folder. I do have the Unity Rigify asset downloaded as well. Any help would be greatly appreciated.
     
  22. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  23. Steviebops

    Steviebops

    Joined:
    Apr 9, 2013
    Posts:
    132

    Are you using the current 2.71 Blender? I had a similar problem in Blender itself. At the top of the window, check if you have an error message. Something about reloading an older version if I remember.

    If that's there, go into user preferences and make sure Auto Run Python Scripts is enabled under the File tab.
     
  24. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
  25. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    Thanks, I had already turned on Auto Run Python Scripts.
     
  26. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    Small update. For some reason the animations stopped getting exported so I tried a nightly build of Blender. With the nightly build, the generic animations and mesh were flawless. When I converted it to a humanoid rig, the mesh on the animations went all screwy. I went back to MakeHuman and exported my character with the simple game rig, imported it into Blender and put it into a t-pose and exported it into Unity. I could then use the animations from the rigify version on my game rig version. It almost works perfectly except in one of the animations the legs move under the body instead of the body moving over the legs. Anyone have an idea how to fix that? Would an ik constraint or something work?
     
  27. Deleted User

    Deleted User

    Guest

    I tried to use MakeHuman and frankly Mocap does not work well with the models. Forget it when it comes to sites that offer "rigging" the bones for free. Unless you like distorted unnatural characters.
     
  28. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    Workflow:
    In makehuman select unity skeleton.
    From makehuman export to mhx2.
    Import mhx2 to blender.
    Rename ALL materials to something short (otherwise fbx importer will freak out).
    Export from blender as fbx.
    Import fbx into unity.

    makehuman.jpg