Creating a clothes library: some technical aspects

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sat Feb 04, 2012 9:04 pm

Here I am again for a new round of doll dressing.

I started doing a Tshirt for the MH character. It's a pretty tight fitting one available in two models: long sleeves and short ones. Also there are currently two textures available that are freely swappable, since both versions of the shirts share the same UV map.

Unlike the jeans, where I started from the default jeans model that was available in MakeHuman, I started off from scratch. The reason for this was that the topology of the sweater that comes with MH by default was not ideal. Ideally I like to have a straight quadmesh with simple edgeloops. It's important that the geometry is all quads and that all polygons are of comparable size. This is to allow better sculpting of folds on it, and make subdivisions of the mesh come out better.
The sweater, however, has complex geometry around the breast area which it inherited from the basemesh. This will soon become a mess if you subdivide it a few times (there will be polygons in that area that are very small compared to the rest) which would result in uneven and difficult sculpting.

This is the topology of the basemesh (the one I didn't use):
sweater_bad_topo.jpg
Less than optimal topology on the sweater


This is what I ended up with:
topo.jpg
My first attempt at the shirt topo


I did the mesh by creating a block around the bashemesh and subdividing it using the loop cut tool. Then I applied a shrinkwrap modifier to fit it around the mesh, and did some manual tweaking. I always work in a low poly resolution and subdivide it later to suit my needs, or not if I want low poly.
The critical viewer might have detected the two triangles in my topology (at the shoulders). As you can see, when subdivinding it there is a strange irregular area. This is not optimal yet and I will need top improve it, but it's not always easy to find a good topology.
Last edited by duststorm on Sat Feb 04, 2012 10:57 pm, edited 1 time in total.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sat Feb 04, 2012 9:23 pm

I made some progress. The topology is fixed now:
shirt_topo.jpg
The topo

I still don't fully like the hole for the neck, but it's hard to fix at this low poly count. At the moment it doesn't fit the back of the neck too well.

I started sculpting the folds, and this is a pic of the work in progress:
sculpt.jpg
Sculpt W.I.P.

The folds are subtle, because the shirt is supposed to fit pretty tight, and because I want it to be generally applicable. With that I mean that it will work on different body types and poses without looking too odd or having too much distracting details. The model is supposed to be a good starting point for a character you are creating, sharing the same principle as MakeHuman itself. An artist could use an exported base mesh to add additional details and tweak the result to his liking.

This is the final result of the scultping:
tshirt_longsleeve.jpg
Long sleeve sculpt

tshirt_shortsleeve.jpg
Short sleeve sculpt


As you can see, I created two different versions, one with long sleeves and one with short ones. I also made two textures to go with them, paying both a tribute to Blender and to MakeHuman. The textures are interchangeable since both shirts share the same folds and UV map.
It should also be possible to create new textures fairly quickly. I will explain this in a future post.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby dmbasso » Sat Feb 04, 2012 10:00 pm

Very nice, man! Keep up the good work. :)
dmbasso
 
Posts: 21
Joined: Sat Apr 30, 2011 3:06 pm

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sat Feb 04, 2012 10:12 pm

On with the next step: I baked a normal map and Ambient Occlusion map from the high resolution sculpt. Additionally, following a remark from Manuel, I rendered a Displacement Map for each LOD using blender. This displacement map would allow getting high geometric detail of folds at lower polygon resolutions thanks to the use of shaders. All of these are however on my wishlist and not actually available in MH.
Note that while normal map and AO are only made from the highest LOD and are reusable for all LOD meshes, a displacement map needs to be made for each LOD specifically, by comparing it to the high resolution mesh.
Again AO is applied to the diffuse texture immediately using a program like photoshop or the Gimp, displacement and normal map can be used together in a shader to render the model.
displacement_maps.jpg
Displacement maps of different LODs

Remember that I can generate all these from one model in a blend file thanks to the wonderful "Multires" modifier in the new Blender. I only need to change the level of the "Preview" slider and render to texture.

This is one of the textures I made for the shirts:
texture.jpg

To create a new one you would just have to open its design template (psd or xcf) in photoshop or the gimp, and change the color layer and add any drawing you want. Leave the AO layer with shadows on top of it with blend mode to "multiply". There's also one other layer to introduce some additional textile texture detail on top of it.
For the lowest LOD mesh, if you don't use advanced shaders, you might opt to fortify the effect of the AO layer a bit so it gives you a little more shadow detail.

Now, armed with the wonderful MakeClothes script made by Thomas, I converted the meshes to MH clothes. I made good use of the new trick I've learned: select the shirt mesh, and click "Auto vert groups", then edit the vert group associations in case necessary. I did the same with the base mesh: select it and press "Auto vert groups".

Because this shirt was tight fitting I had some problems with the very high resolution mesh:
high_res_errors.jpg
Errors at very high polycount mesh

This picture is of the high resolution version, exported to MH and imported to blender again using MHX. I believe the problem is that it alternatingly matched vertices to the body of the base mesh, and to the clothes helper geometry.
A fix for this would probably be to change the vertex groups on the basemesh so that I exclude the clothes helpers from the Left, Right and Middle vertgroups. Because this is a tight shirt I want to match to the basemesh.
I must add however, that this error only seems to occur on very high resolution meshes. It seems that the in-between polycount level works best with the MakeClothes script and MH clothes in general (these being the game or medium versions of my clothes)

To conclude, here are some screens of the shirts in MH:
shortsleeve_high.jpg
High resolution shirt in MH

shortsleeve_low.jpg
Low resolution shirt in MH

You can see that in the first the shirt pic the shirt is tucked in, and in the second its over the jeans. I haven't gone into making masks for it yet, but it would be nice to have control over whether I want the shirt on top or under the jeans.
I might make the bottom of the T-shirt a bit more interesting, as it is very straight at the moment, making the non tucked-in version of the shirt not very interesting to look at.

Interesting detail:
The polycounts (in quads) of the different shirt meshes are as follows.
Longsleeve:
Low: 260
Game: 1040
Medium: 4160
High: 66560

Shortsleeve:
Low: 160
Game: 640
Medium: 2560
High: 40960

You save a lot of geometry with the short sleeves, but remember that in return the character will need to have more of the arms showing, which will compensate out.

It's a start. I will make work of sharing the models as well as the source files soon.
Maybe I should look into finding more permanent ways to host them than my own webspace and forum attachments.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sat Feb 04, 2012 10:53 pm

Before I go to sleep: one more shot of the other shirt in MH
mh_shirt.jpg
Longsleeve shirt in MH

And here is how it handles posing in Blender:
dressup.jpg
Posing the shirt in Blender
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby ThomasL » Sun Feb 05, 2012 1:52 pm

Hi duststorm. I downloaded your jeans today. It taught me a lot, e.g. what happens if the object name contains spaces and if the mesh has no materials when the mhclo file is exported. In the medium resolution jeans, there is some misassignment of vertices at inside of the thighs. This is exactly the kind of problem that the vertex groups are there for. It also looks like the mask extends a little bit too high, so one can actually see where the body is cut off.

There has been quite a bit of changes to the makeclothes script recently, see http://makehuman.blogspot.com/2012/02/making-skirt-with-makeclothes.html.

jeans_medium.png
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sun Feb 05, 2012 5:08 pm

Hey thomas.
Thanks for finding out about the mismatched vertices! :) I remember seeing it too but wasn't sure if it was on one of my experiments or on a final model.
Because I'm maintaining 4 different versions it's a lot of work to test everything thoroughly, and sometimes faults slip through.
I will put it on my list of things to fix.

There are some more things that I still have to complete, like making decent mask mappings for them. I've read your blog post, it's great! I think I understand most concepts of clothes making, I only need time to experiment with it some more.

It's a good thing that the blend file can be used to experiment with and can be improved upon.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Sun Feb 05, 2012 6:19 pm

For those who are interested in the shirts, here they are.
I've made packs with low,medium and game res version for MH, the high versions are too high to fit the forum size limit so they are here:
http://duststorm.ulyssis.be/mh/mh_tshir ... eves_h.zip
http://duststorm.ulyssis.be/mh/mh_tshir ... eves_h.zip

Here is the blend file: http://duststorm.ulyssis.be/mh/mh_tshirt_blend.zip

This pack contains the texture sources and maps baked using Blender (both photoshop and gimp format included):
http://duststorm.ulyssis.be/mh/tshirt_textures.zip
You can use it to create new textures.
Attachments
mh_tshirt_longsleeves.zip
Long sleeves MH shirts (low, medium and game res)
(1.11 MiB) Downloaded 433 times
mh_shortsleeves.zip
Short sleeves MH shirts (low, medium and game res)
(1.14 MiB) Downloaded 424 times
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Fri Feb 10, 2012 3:34 pm

How about some shoes?

To finish up my first fully clothed character, I made some shoes. I started with a basic quad topo shoe form, that can be subdivided once to get a smooth shape, and that fits the foot of the MH basemesh.
shoe_fit2.jpg
Wireframe fitting foot


To get it to fit the size of the foot well, I made sure it was not matched to any helper geometry. Thanks to the new features in the makeClothes script this could be done using only one button.
This time there are only two versions, being a 160 quads lowpoly one, and a 326 quads highpoly one. Of course you need to take this number twice for two shoes.
shoe_wire_low.jpg
Wireframe low poly version

shoe_wire_h.jpg
Wireframe high poly version


Using this same base form I made three different texture variantions using texture projection painting in Blender. The first is made using some pictures made of my own shoes, but because the lighting and camera used were pretty bad it's a bit washed out. It's probably good enough in most cases where the shoes won't take up a large part of the screen though. For the other two I had better reference pictures.
texturemaps.jpg
Three texture variantions

variations.jpg
The result: three texture variatons, two LODs

As you can see, using the same baseform I can quite easily get a lot of variation. I will probably make some other shoe baseforms in the future to create some different shoe types.
Even from one texture you can get lots of variation, here is a red version of the blue shoe:
red_variation.jpg
Red texture variation by changing hue/saturation in the Gimp


There's only one shoe and the second one is a mirrored version of the other. This, however, gives us one slight problem. If there is any text on the shoe, you will notice it because the right shoe will contain mirrored text.
mirrored_text.jpg
Problem when mirroring textures with text

But the only solution to this would be either to remove all the text or have a separate texture for left and right shoe, effectively doubling the required texture size.

I still have some work on them. I need to create normal maps from the images and define matching mask textures and UVs. This together with some other pieces which still need some attention. Unfortunately the fixing up is the less interesting work...
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Fri Feb 10, 2012 3:53 pm

I will provide you with some other screens showing it in context.
shoe_f.jpg

shoe_b.jpg

shoe_t.jpg

These are pictures of the shoes, exported from MH again along with a human model and the jeans.
This illustrates something I talked about earlier: after getting my basic dressed character in Blender I touched it up a little to make it look better. Here I changed the ends of the jeans so they fit more convincingly around the shoes.
jeans_edit.jpg
Editing low poly subdivided jeans

It's relatively easy to edit the few vertices of the low poly version. Select the edge loops around the legs and scale them, and fit the ends around the shoes.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

PreviousNext

Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 1 guest