Thursday, March 26, 2015

Make Human to Blender to UE4

I'm prototyping an FPS in UE4. I need/want a non-epic-blue-dude. I've got a good enough handle on Blender for performing basic tasks for assets, but nothing actually artistic.

So what do I do?

I created a pipeline from Make Human, to Blender, to UE4. This allows me to generate a great (albeit generic) human model that is rigged and all setup for UE4 animations. I then take it into Blender for any mesh adjustments I'd like to make. Then, I finally bring it into UE4. There, I make use of animation re-targeting. This allows me to copy/paste Unreal's free animations pack into my own model.

Essentially, I'm able to generate a model with ~60 quality FPS animations w/o actually creating any art assets! That's re-diq-you-lass.

Step-By-Step

Make Human
You need to download their latest "unstable" version. As of the time of this writing, that was the only version supporting UE4 Epic rigging.
  • Tweak your human.
    • UE4 normal person height = about 183cm. 
Make Human Exporting
  • Pose/Animate > Skeleton > Tag Filter > Game: Yes.
  • Pose/Animate > Skeleton > Rig Presets > Uengine.
  • Pose/Animate > Pose > T-Pose.
  • Export > Mesh Format > Filmbox(fbx)
  • Export > Options > Scale units > centimeter.
  • Export to UE4.
    •  Export > Options > Binary FBX: No.
  • Export to Blender.
    •  Export > Options > Binary FBX: Yes.
Importing TO Blender
  •  Export from Make Human as a "FBX Binary".
    • Blender needs it as a binary. UE4 needs it as ASCII. Remember that difference.
  • Set Scene>Metric>Degrees: 0.01
    • It's in the right-side panel (by default). Google up "Blender Set Metric Degrees".
  •  File>Import>FBX
Adjusting IN Blender

Blender will fudge things up a bit. So here's how you un-fudge it.
  •  Make sure you are in "Object" mode.
  • Select the model.
    • In the scene explorer it should be the top level of the model's hierarchy.
  • Press "N" with your mouse in the big scene view in the center of your screen (default).
    • This brings up the transforms.
  • The scale will probably be something dumb like "0.001" or w/e. Set these scales to "1.0".
  • Apply the transformations as the default to the model.
    • Crtl+A > Apply Rotation and Scale.
    • Important! Apply the Rotation AND Scale.
Exporting FROM Blender
  • File>Export>FBX.
  • Select ONLY Mesh + Armature.
  • Scale = 1.0.
  • Leave Forward/Up alone.
  • Uncheck "Default Take".
  • Toggle the pull down to ASCII and NOT Binary.
  • Everything else should be fine as is.
Importing to UE4
Only a few things to handle here...
  • Open your UE4 project.
  •  Drag your FBX file you exported INTO UE4.
  • A prompt will pop-up.
  • Mesh > Import Mesh: Yes
  • Mesh > Import as Skeletal: Yes
  • Mesh > Skeleton: None
  • Mesh > Use TPose Ref: Yes
  • Mesh > Normal Import Method: Import Normals and Tangents
  • Mesh > Create Physics Asset: No
  • Animation > Import Animations: Yes
  • Press Import All
  • Check out your imported mesh to see if it's looking right.
Re-Targeting Animations
Make sure you have the free animations pack. If you don't, download it from the Epic browser.
  • Add the animations to your project.
  • Part 1.
    • Open the HeroTPP model.
    • Select it's skeleton.
    • Open "Retarget Manager".
    • Manager Retarget Source > Current Skeleton > HeroTPP
    • Set up Rig > Select Rig > Humanoid
    • Save Pose.
  • Part 2.
    • Open your imported model.
    • Select it's skeleton.
    • Open "Retarget Manager".
    • Manager Retarget Source > Current Skeleton > None.
    • Set up Rig > Select Rig > Humanoid
    • Save Pose.
  • Part 3.
    • Find/Select the HeroTPP animation you want to steal.
    •  Right Click > Retarget Anim Assets > Duplicate Anim Assets and Retarget.
    • Pop-up.
    • You should see the HeroTPP in the left window.
    • Select the name of your model.
    • You should see your skeleton in the right window.
    • "Select".
    • Check out the new animation applied to your model!
Thoughts

 The feet and hands get to look pretty f'd up? Also, the neck can be quite stretched out with the head way in front of the chest and the shoulders pulled back. So lol, yea, be aware of that.

No comments:

Post a Comment