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/watch?v=cl36ZxHiXz0 In blender save MBL character as fbx with shape keys intact and occlusion map
- https://www.youtube.com/watch?v=KKLPg_Ew8Ss In Unity 3D import character and get armature working and shaders using relevant textures
- https://www.youtube.com/watch?v=zbEICqmHsV0 In blender import animation, export as fbx then import in Unity and apply to character
- 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
- 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)
- 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
- Select ManuelBastionLAB tab
- Select: Any model you like
- 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
- Click: "Init character"
- 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.
- 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".
- 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
- 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.
- In Unity 3D --> select MB prefab --> Rig --> change Animation Type "Generic" to "Humanoid" --> Apply --> Configure --> make sure properly rigged --> Done
- Drag prefab into your scene.
- In the case that the model is not facing the camera properly, set the Transform's rotation on the Y axis to 180.
- Make sure to change the resulting 'body_displ' texture as a Normal Map.
- Double click the model in the scene and remap the texture to each material accordingly.* 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/)
- 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'.
- Place lighting freely on the scene.
- Optionally, place a Post-Process Volume freely on the scene.