FANDOM


Resource overview for how to use human models created by the MBLab add-on in the game engine Unity 3D.

MBLab to Unity YouTube playlist here (by paddywwoof):

https://www.youtube.com/playlist?list=PL95wMwybFOWC-4_QctOwCz_l_g2CYne_L

  1. https://www.youtube.com/watch?v=cl36ZxHiXz0 In blender save MBL character as fbx with shape keys intact and occlusion map
  2. https://www.youtube.com/watch?v=KKLPg_Ew8Ss In Unity 3D import character and get armature working and shaders using relevant textures
  3. https://www.youtube.com/watch?v=zbEICqmHsV0 In blender import animation, export as fbx then import in Unity and apply to character
  4. https://www.youtube.com/watch?v=ZjfMNQz7kCs In blender fit clothes using proxy to standard figure for modification to derived characters with vertex weights and shape keys
  5. https://www.youtube.com/watch?v=v5Nzcc9j2X0 In blender export fitted clothes and add materials to character mesh to hide parts under clothes, also adding MBL combo shape keys so they can be exported (expressions, breathing, swallowing etc)
  6. https://www.youtube.com/watch?v=4VDDZGKcWic In Unity import clothes and animate combo shape keys

Written tutorial (might not match above videos) Edit

In Blender Edit

  1. Select ManuelBastionLAB tab
  2. Select: Any model you like
  3. Unity 3D doesn't have (good) support for muscles, so leave at the default:
    • (Unchecked) Use Inverse Kinematic
    • (Unchecked) Use Basic muscles
    • (Checked) Use Cycles materials
    • (Optional) Use portrait studio lights
  4. Click: "Init character"
  5. Do your stuff --> under "Finalize tools" make sure "Save images and backup character" is checked --> "Finalize with textures and backup" --> save in location you remember.
  6. Do normal Blender stuff and optional: under "ASSETS" --> matching hair asset --> "Load element from library" --> Select hair and created MB model --> under "PROXY FITTING" --> "Fit Proxy" (this will create a Shape Key that at max value fits the hair to your model).
    • Shape Key for hair means the hair doesn't fit the model when imported in Unity, so we're making it the default without Shape Key / Blend Shape.
    • Select hair --> Data (triangle) --> Shape Keys --> select "Basis" --> Delete (minus sign) --> select "mbastlab_proxyfit" --> rename to "Basis".
  7. Export: File --> Export --> FBX (.fbx) --> (Left bottom menu) under "Export FBX", select Geometri --> uncheck "Apply Modifiers" (with apply modifiers we don't have Blend Shapes for facial animation) --> save.

Note: Look here if you need to know how to extract / generate extra maps for your MB character: Generate model maps

In Unity 3D Edit

  1. Copy .fbx file and [...body_derm.png] and [...body_displ.png] (and things like ambient-occlusion if you made those) to something like Unity 3D project folder/Assets/Objects.
  2. In Unity 3D --> select MB prefab --> Rig --> change Animation Type "Generic" to "Humanoid" --> Apply --> Configure --> make sure properly rigged --> Done
  3. Drag prefab into your scene.
  4. In the case that the model is not facing the camera properly, set the Transform's rotation on the Y axis to 180.
  5. Make sure to change the resulting 'body_displ' texture as a Normal Map.
    NormalMap-0
  6. Double click the model in the scene and remap the texture to each material accordingly.
    Materials1
    Materials3
    Materials2
    HairMat
    * Hair normal map by ditney (https://ditney.deviantart.com/art/Hair-Texture-370393426).

* Create a copy of the 'body_derm' texture in Grayscale for the '_fur' material.

* Alpha from grayscale shader by Jessy (https://forum.unity.com/threads/unlit-with-adjustable-alpha.115455/)

  1. Place a Reflection probe on the scene that covers the model, in order to a better look to the reflection of the eyes. On it's settings, change the type to 'Realtime'.
  2. Place lighting freely on the scene.
  3. Optionally, place a Post-Process Volume freely on the scene.
Community content is available under CC-BY-SA unless otherwise noted.