Documentation:File formats and extensions

From MakeHuman Community Wiki
Revision as of 09:50, 12 November 2015 by Duststorm (Talk | contribs) (Create first version)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MakeHuman stores some of its art assets and definition files in a custom format. This article contains an overview of these formats


Proxy files

Offset and bounds

MakeClothes uses a bounding box for scaling the offsets. It's controlled by the Offsets option in MakeClothes.

This is how this data is stored in the proxy file, so you can modify by hand if desired. In the mhclo file at the top, these values appear as

 x_scale 5399 11998 1.4340
 z_scale 962 5320 2.0001
 y_scale 791 881 2.4098


Allowed values are:

 x_scale
 y_scale
 z_scale
 shear_x
 shear_y
 shear_z
 l_shear_x
 l_shear_y
 l_shear_z
 r_shear_x
 r_shear_y
 r_shear_z


scale options follow the format:

 x_scale v1 v2 den

with v1, v2 vertex indices on the human basemesh, den a denominator with which the scaling value is reduced which results in the construction of a scale matrix that is applied to all the offsets of the proxy. eg.

 [xscale 0 0 0]
 [0 yscale 0 0]
 [0 0 zscale 0]
 [0 0 0      1]

where xscale is determined from the option x_scale v1 v2 den as: xscale = abs(coord_pos(v1).x - coord_pos(v2).x) / den

analog for yscale and zscale (.y or .z components of the position vector will be used instead)


shear options follow the format:

 shear_x v1 v2 x1 x2

which result in the creation of a shear matrix instead of a scale matrix (I don't know of any instance where this is used) uses numpy's affine_matrix_from_points method to calculate a transformation matrix that fits all selected points didn't go into detail understanding this, because it doesn't seem too relevant. Read the code if interested.

scale overrides shear which overrides l_shear which overrides r_shear, only one of them is used (so you either specify scale, shear, l_shear or r_shear but no combination of them) If you specify one, it is expected you define the other 2 of the same type as well.


max_pole

Proxy files can specify the pole count, which is the maximum number of edges that a vertex in the proxy mesh (the OBJ file) can have. If all faces around this vertex share their edges, this number also coincides with the maximum number of faces per vertex. If not specified, MakeHuman assumes this number is 8, which is a reasonable standard (more than 8 edges per vertex is probably a sub-optimal topology). For example, the MakeHuman basemesh, which was modeled with high consideration of pole count, has a maximum of 5 edges per vertex.

MakeHuman intentionally is conservative about pole count to benefit performance (of the subdivision algorithm for example), for the same performance reasons it will not check the pole count when loading an OBJ, and instead relies on the user, or creation tool (MakeClothes) to set this number appropriately (at the moment MakeClothes does not do this).

Similarly, you can improve performance of MakeHuman by lowering this number if your proxy mesh has lower pole count. Eg for some meshes this can be set to 6 or 7

Proxy files have a property max_pole to change this number from the default setting of 8 to something else:

 max_pole 9


Meshes

MakeHuman stores its meshes in the standard Wavefront OBJ format. It supports quad-only meshes, and by default allows up to 8 edges per vertex. This number can be increased (see proxy format).


Material files

TODO


Poseunit files

TODO


Target files

TODO


Modifier and slider definitions

TODO