Difference between revisions of "Documentation:Features of new Blender plugin"

From MakeHuman Community Wiki
Jump to: navigation, search
(Produce clothes)
Line 160: Line 160:
 
[[File:Mc2_tagselector.png]]
 
[[File:Mc2_tagselector.png]]
  
* '''zdepth''': determines the order of clothes. Lower values are used for clothes near the body, higher values for parts far away. This will be used to hide clothes near the body.
+
* '''zdepth''': determines the order of clothes. Lower values are used for clothes near the body, higher values for parts far away. This will be used to hide clothes near the body. A rule of thumb is to start with underware at 31, normal clothes (pants, t-shirt, shoes) use a default value of 50 and clothes like a coat usually use high values like 63. The following illustration shows the effect for a character equipped with ballet clothes. It also demonstrates what is happening when all values are equal.  
  
<values have to be explained later>
 
  
* '''scaling''': select the part of the body which are important for the scaling. Most likely torso for a t-shirt, head for a hat etc.
+
[[File:Mc2_zdepth.png]]
  
* '''delete-grou'''p: it is a good method to delete vertices on the body if clothes are not transparent. This avoids bleeding through, that is, that vertices that should be "inside" suddenly appear outside of the clothes. All vertices not to be displayed should be selected on the body (not helper) and assigned to a vertex on the human. The name of this group must be inserted in the box. If more than one piece of cloth is created, they all can have a different delete-group on the same human.
+
* '''scaling''': select the part of the body which is important for the scaling. Most likely torso for a t-shirt, head for a hat etc.
 +
 
 +
* '''delete-group''': it is a good method to delete vertices on the body if clothes are not transparent. This avoids bleeding through, that is, that vertices that should be "inside" suddenly appear outside of the clothes. All vertices not to be displayed should be selected on the body (not helper) and assigned to a vertex on the human. The name of this group must be inserted in the box. If more than one piece of cloth is created, they all can have a different delete-group on the same human.
  
 
* '''use MakeSkin''': without MakeSkin a simple material is saved for the piece of cloth (white base color). Otherwise the material file of the plugin MakeSkin is used
 
* '''use MakeSkin''': without MakeSkin a simple material is saved for the piece of cloth (white base color). Otherwise the material file of the plugin MakeSkin is used
Line 173: Line 174:
  
 
* '''subdir''': the directory inside where the clothes will be created.
 
* '''subdir''': the directory inside where the clothes will be created.
 
 
  
 
== Materials ==
 
== Materials ==

Revision as of 13:11, 6 July 2020

Caution: this file is under construction :)

Makeclothes Version 2

Makeclothestitle.jpg

MakeClothes2 is used to create clothes for MakeHuman characters. The term "clothes" is not really correct, the program creates any kind of mesh which can be used for a character generated by MakeHuman. This also includes hair and different tongue or a new proxy. To use MakeClothes in Blender knowledge of Blender itself is needed.

Notation

To understand the process, a short summary of terms used in MakeHuman:

  • base mesh: The base mesh is the standard body mesh used in MakeHuman. It has an exact number of vertices and each vertex has a number, starting with number 0 to 13379.
  • helper mesh: The helper mesh is used to create all parts not directly attached to the body. This includes body parts like teeth, tongue and eyes and (male) genital, but also is used for generation of clothes (tights and skirt) and hair. The helper mesh is also deformed invisible in MakeHuman, when you change the character. The helper mesh comes with the base mesh.
  • proxy: in a way all meshes projected on the body are proxies. Also the clothes are proxies, but in this case proxies should only be alternative meshes for the skin of the body
  • smoothing: MakeHuman may use smoothing on a base mesh. This results in a mesh with 4 times as many vertices. This mesh cannot be used for MakeClothes.
  • clothes: clothes will be all meshes MakeClothes is able to create. Hair and body proxies included.
  • posing: the standard "unposed" base mesh is presented in an A-Pose. Other poses are T-Pose or a pose which is user generated. Typically these poses are created with the standard skeleton. Shapekeys can be used as a special pose too.
  • weighting: when a character is posed the skin but also the clothes should follow the bones. So weights are added to each vertex. These weights determine how much a bone will be followed. MakeClothes uses a similar construction, since the clothes follow vertices on the helper or base mesh.

Mc2 meshes to use.png

Only base mesh and helper can be used to create clothes.

Limits

Makeclothes has certain limits according to the internal structure of MakeHuman

  • The mesh for the clothes can either be done with quad or with triangles. No mixture allowed. Advantage for quads is a smoother design with a later usage of subdivision surface algorithm (smoothing). Triangles are normally used for e.g. sculpting or when you work with 3rd party meshes.
  • only one material for one piece of cloth is allowed in MakeHuman
  • each vertex of a piece of cloth uses 3 vertices on body or helper to find its position according to the human created in MakeHuman
  • each vertex of a piece of cloth needs to be in one (and only one) vertex group. A group of the same name must be created on the human
  • it is possible to create more than one piece of cloth with one human
  • only one human is allowed when clothes are created. So only one object is "marked as human". So if you need more than one base mesh, all others can be marked as clothes


Mc2 makeclothes2.png

How to load a human

MakeHuman uses a mesh called hm08. Makeclothes is prepared to deal with other meshes as well for future versions. When the mesh is changed it must be changed in MakeHuman as well. So this documentation will only consider the hm08 base mesh.

To create clothes you can create them directly on the body or on the helper mesh. For underwear the nude body is best choice, but for a coat the helper mesh will be used. A good method for e.g. a skirt or coat is to design the piece of cloth on the nude body and then use the helper mesh for weighting in the end.

There are currently a few possibilities to load a human:

not yet in master


  • Load a predefined human

Blend-files which are in the directory <name> can be used directly. When MakeClothes starts these blend-files are scanned once and names are presented in a menu. The selected mesh is appended by pressing the "Import predefined human" button.

Mc2 loadpredef.png

In case of a helper mesh, the parts of the mesh are assigned to different vertex-groups to allow an easy selection and use different colors.

After the mesh is loaded these buttons disappear, because one human is already loaded. The loaded mesh is automatically marked as a human. To load another human either delete the human or mark your human as clothes.


  • Load the human via MPFB

<to be written>

  • Load normal base.obj file

This is the way using the predefined base.obj file which can be downloaded from github. MakeClothes reads the wavefront file. Vertex groups are created according to the .obj file. Disadvantage: this mesh is neither male nor female.

An exported wavefront mesh made by MakeHuman can be used as well (no proxy, do not use smoothing and delete the extra eyes). It is possible to export it including the helpers. Unfortunately it has no vertex groups assigned. This must be done in Blender later.

  • Load an mhx2 file

The body (no proxy, do not use smoothing and delete the extra eyes) used by mhx2 export can also be used as a base mesh. In this case no helpers are available.


  • Delete helpers

If a mesh is loaded and the helpers are not needed, the helpers can be deleted. In this case a vertex-group "body" is expected, all vertices belonging to other groups are deleted. If body is not available, nothing will be done.

Tell MakeClothes the type of the object

Mc2 customprops.png

To create clothes, one object must be marked as human and at least one as clothes. If you work with more than one human, all others must be marked as clothes temporarily. When you mark one object as human a previously marked human will automatically be marked as clothes. The custom properties of the object will held this information.


Create simple clothes (extract from helper)

In case a helper mesh is available it is possible to use the helpers as a first try. Especially for beginners (but also for the advanced for a good weighting) this could be helpful.

<more text to be written>


Test the human mesh

The human loaded with one of the methods usually should not have problems. Nevertheless there is a small test available to check the human. This test is also automatically done when clothes are created.

  • the number of human objects must be one
  • there must be one vertex group on the human
  • no vertex belongs to an non-existing group

Mc2 checkhuman.png

Test the clothes

Clothes need a bit more testing.

  • clothes should not have stray geometry. These are single vertices or edges. If this problem appears, change into edit mode. The vertices are pre-selected. Simply delete them or change geometry otherwise.
  • maximum number of vertices per face is 4. If you have more than this, these faces are selected and must be changed.
  • clothes can be quad or triangle meshes. A mixture is not allowed. The process assumes a mesh type and selects the faces to be changed.
  • the process tests if at least one vertex group is available
  • all vertices must belong to one vertex group. Vertices belonging to no group are selected and can be changed in edit mode.
  • all vertices must belong to only one vertex group. Vertices belonging to more than one group are selected and can be changed in edit mode.
  • no vertex belongs to an non-existing group
  • a test is done, how many edges belong to one vertex. Typically quad meshes with a low pole-count will have better geometric qualities. This is only a warning. The vertices with more than 8 neighbor vertices will be selected and can be changed in edit mode.

Mc2 checkclothes.png

Common settings

The common settings will provide the license and the name of the author, which will be used for all the clothes generated with this file.

  • Overwrite existing files is switched off. The name of the piece of cloth is used as a filename. If it is necessary to overwrite an existing object, the box must be marked.
  • Modifiers are allowed. Typically the mirror modifier may make sense. Be careful with e.g. subdivision surface, because it may produce a huge number of vertices. When the clothes should be designed with subdivision surface but created without, switch off "Allow Modifiers"


Produce clothes

The main features of creating clothes are:

  • name: this is the name of the piece of cloth, also the filename
  • comment: a short optional description
  • tags: a list of predefined and own tags as a search criteria for MakeHuman

Mc2 tagselector.png

  • zdepth: determines the order of clothes. Lower values are used for clothes near the body, higher values for parts far away. This will be used to hide clothes near the body. A rule of thumb is to start with underware at 31, normal clothes (pants, t-shirt, shoes) use a default value of 50 and clothes like a coat usually use high values like 63. The following illustration shows the effect for a character equipped with ballet clothes. It also demonstrates what is happening when all values are equal.


Mc2 zdepth.png

  • scaling: select the part of the body which is important for the scaling. Most likely torso for a t-shirt, head for a hat etc.
  • delete-group: it is a good method to delete vertices on the body if clothes are not transparent. This avoids bleeding through, that is, that vertices that should be "inside" suddenly appear outside of the clothes. All vertices not to be displayed should be selected on the body (not helper) and assigned to a vertex on the human. The name of this group must be inserted in the box. If more than one piece of cloth is created, they all can have a different delete-group on the same human.
  • use MakeSkin: without MakeSkin a simple material is saved for the piece of cloth (white base color). Otherwise the material file of the plugin MakeSkin is used

<more specific text will follow>

  • subdir: the directory inside where the clothes will be created.

Materials

Most of the clothes will need a texture. Before the texture can be used the piece of cloth must be unwrapped. Best way is to create seams in Blender, where the real seams are.

Unwrap the clothes in any case. The output of this process is a UV-Map, which will be used to determine the coordinates of each vertex on the texture.

<will be changed later with information about makeskin and some advice how to do good textures etc.>


Creating of own clothes

To create clothes select the piece of cloth and press produce clothes. The tests "check clothes" and "check human" are processed and also an additional test about matching vertex groups is done. If everything is okay, the clothes can be loaded in MakeHuman.

<will contain a lot of tips & tricks later>

Special poses, heels etc.

<works with a special target in MakeHuman and a pose changed with shape key in MakeClothes>

Importing existent clothes

It is possible to load an existent mhclo-file from the data folder of MakeHuman. Best is to load the human mesh before. When clothes are imported, Most of fields are filled in by the process and the delete-group is marked on the human (in case it is loaded).

~