MB Lab Internals - animate1978/MB-Lab GitHub Wiki
MB-Lab Modules
MB-Lab is composed of several Python scripts and JSON data files, as well as a blend file and texture image maps.
_ init _.py
This is the core of MB-Lab.
- Function calls
- UI Elements
algorithms.py
Contains various functions for every engine.
animationengine.py
Handles the animation import and assigning to skeleton
- Retargeting
- Identifies Bones
- Loads BVH files, saves and loads poses.
humanoid.py
- Builds The Character
- Handles much of the character changing functions including Auto-Modelling.
materialengine.py
- This is where the image textures get loaded and applied to nodes
morphengine.py
- This is where the morphs of the character are loaded from JSON files
proxyengine.py
- Handles the Proxy Fitting functions
skeletonengine.py
- Loads and applies the skeleton (either FK or IK) to the character
The Auto-updater consists of several python files
addon_updater.py
- The functions for the auto-updater
addon_updater_ops.py
- The MB-Lab specific settings
preferences.py
- The UI element for the auto-updater
utils.py
- Various utilities for MB-Lab
facerig
WIP
MB-Lab Data
The data of MB-Lab contains a library of JSON files that contain measurements, morphs, vertice locations and more. This is also where the main blend file and texture maps are located, the new animation BVH files as well. Some of the data has been converted to human readable format, others are too big to process at this time.
humanoid_library.blend
Contains the following
Mesh
- MBLab_human_female
- MBLab_human_male
- MBLab_anime_female
- MBLab_anime_male
Armatures
- MBLab_skeleton_base_fk
- MBLab_skeleton_base_ik
- MBLab_skeleton_muscle_fk
- MBLab_skeleton_muscle_ik
Shaders
Realistic Shaders
- MBlab_pupil
- MBlab_human_teeth
- MBlab_fur
- MBlab_generic
- MBlab_human_eyes
- MBlab_cornea
- MBlab_human_skin
- MBlab_iris
- MBLab_tongue
Cell Shaders
- MBlab_toon_black
- MBlab_generic
- MBlab_anime_skin
- MBlab_anime_eyes
FaceRig
As of MB-Lab 1.7.5 the Face Rig is now independent of humanoid_library.blend
- Face_Rig_widgets
- Phenome_rig
- MBLab_skeleton_face_rig
WARNING! Editing humanoid_library.blend can cause irreversible damage! Do not edit unless you know exactly what you are doing!
The current Dev file has been rebuilt using Blender 2.80.74, this can cause errors if using an earlier Blender 2.80 build (such as Blender 2.80.45).
characters_config.json
The base models, textures and JSON data are referenced from this file
- Example Female Caucasion data entry
retarget_knowledge.json
Retargetting data
anthropometry
Contains measurement data for male and female base models
assets
Contains the demo asset files, as well as associated texture maps.
bboxes
(?) Bounding Box?
expressions_comb
Contains human readable expressions
expressions_morphs
joints
Contains some kind of data related to joints between bones of the armature, is called by skeletonengine.py
measures
Contains measurement data
morphs
pgroups
Polygon Index
- Data = Polygon Index
phenotypes
Morphs for each base model that change the character based on geographic location
- Example euroartic.json
poses
Pose JSON files for each base model
- Example glamour02.json
presets
Morphs to describe different body types
- Example type_common01.json
textures
The texture maps for MB-Lab
Contains the following -
-
Albedo map
-
Bump map
-
Displacement data (Red = Details, Green = Age factor, Blue = Tone factor, Alpha = Mass factor)
-
Anime albedo
-
Eye texture (legacy for export to other rendering engines)
-
Example human_female_albedo.png
transformations
vertices
Contains vertex information for the base mesh.
-
Example - Female Caucaisan
-
Data = vertex index at XYZ
vgroups
Contains vertex group data
-
Example - Human Female Base VGroups
-
Data = Vertex Index, Weight Value