How to add usemtl to an OBJ file

An OBJ can not contain any material info. But it can contain entries to identify which materials to use for different groups of polygons. These entries read "usemtl". Many applications write these usemtl entries into the OBJ. This enables OBJ2FACT to use .mtl files and to create a default .mtl file for them.

In a regular OBJ file it looks like this:

g Head_skin < name of the group
usemtl Head_skin_material < name of the groups material
v -356.267914 301.538208 -481.447479 <- list of groups vertices
v -354.695862 303.513947 -480.933502
v -352.458679 305.628601 -480.545502
...

If the OBJ you would like to use does not contain these entries you will not be able to use .mtl files with this file. However, if you are not afraid to edit the OBJ with a text editor you can add usemtl entries manually :

BEFORE:

g Head_skin < no usemtl entrie
v -356.267914 301.538208 -481.447479
...

AFTER:

g Head_skin
usemtl Head_skin_material < usemtl entry added manually
v -356.267914 301.538208 -481.447479
...

After this edit OBJ2FACT will know that the OBJ wants to use a material called "Head_skin_material" and write it down to a default .mtl file for further use.