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 ThomasL » Thu May 03, 2012 2:23 am

Maia1003 wrote:E.g, I tried to import the model to Blender with Helper geometry as you suggest: the helpers disappear when rendering with Blender, but when exporting to another format (osg), they are exported and must be deleted manually with the diamonds. The clothes don't follow either.


Sorry, I expressed myself in an unclear way. I asked you to import the helpers to debug your problem. Do the helpers move when the bones are moved? If not, that would explain why the clothes don't move.

The helpers are used by the exporters, both mhx and collada. Clothes inherit vertex groups from the base mesh, including helpers. Once the clothes have got their vertex groups, the helpers are not needed anymore and can be discarded. This happens at export time for collada and at import time for mhx. But if a helper does not have vertex groups for some rig, any clothing associated with that helper will not move.

So, import the character with or without helpers. That does not affect how the clothes behave in Blender.

Anyway, the main question is: do the clothes move in Blender? If not, there is something wrong with the MH-Blender pipeline, and it is our problem. If they do move in Blender, the problem has to do with export from Blender.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Creating a clothes library: some technical aspects

Postby Maia1003 » Thu May 03, 2012 2:15 pm

Hi,

Maybe I wasn't clear enough but my main concern is about duststrom'clothes not following the body as basic ones (green sweater, etc.) do.
In that example, with the helpers, the jeans_game does not follow the body while the green sweater does, once exported in OSG.

As you explain, the main difference is that you introduced the helpers and those follow the body, but once the clothes are ready, why those ones do not behave as the old ones ?

Is there a way to "correct" that for my needs ?

Some people suggest to have one mesh for the whole, etc. but there must be a lot of work to be done (delete mesh, baking texture, etc...). I find it frustrating that I am near to get the dressed model to work with OSG without modifying the imported model (the OSG exporter only exports the visible mesh, so I don't even need to delete the mesh under the clothes as they are not exported to osg).

Thank you,
dressed_wb_withHelpers_OSG.png
Model exported in OSG
Maia1003
 
Posts: 27
Joined: Thu Mar 01, 2012 9:42 pm

Re: Creating a clothes library: some technical aspects

Postby Maia1003 » Thu May 03, 2012 2:28 pm

duststorm wrote:
Maia1003 wrote:Someone replies that it would be a nightmare !

I wouldn't be offput too much by someone's personal opinion which is not backed with proper explanation or experience. It's actually very logical that you would attempt such a thing if you were serious about getting MH characters into a realtime engine.

Look at my reply in the respective topic, I have posted some general directions and a tutorial video.

As for polycount and such, since I have quite a bit experience with realtime rendering engines, I have picked up a few good guidelines here and there. Deciding on polygon count, texture resolution, amount of different materials, ... really is a decision you should make taking into account the intended audience and the power of the machines that will be running it.

A good way of determining the detail you want to aim for is to look at video games. Look for a game which performance requirements you want to equal and find out what restrictions it uses. For example recent games have polycounts of 5000 to even 10000 for important characters. If you don't want to force your public into buying recent hardware, you might want to lower this number, and compare to somewhat older games for example.
A very important aspect for graphics performance these days is the tradeoff between number of polygons and amount of batches. A batch is a set of polygons that is rendered for one object with the same material. So a MH character with 5 different materials would result in 5 batches. The number of batches that are visible on one screen in one frame translate linearly in the time needed for the graphics card to process the image. (they are processed one by one in screen space)
Since modern graphics cards are fairly fast in processing lots of triangles, the optimal tactic is to group a good amount of polygons within one batch. Wasting a batch with only few geometry is not good for performance, but having too large batches might not be good either (since you will lose the advantages of culling unneeded geometry out of the picture, are limited on texture size, etc)
I don't have any good reading links handy, but I might have dropped some useful links in this thread if I remember correctly.
There are however a lot of indications on batchcount/polycount usage to be found on the net, along with comparisons from other games.

Again, how you should create your content depends for a large part on the specifics of the engine you are using. Have a look around for specific information for OSG.


Hi duststorm,

Thank you very much for these info.
One thing I missed to mention is that the osg exporter can only export the visible mesh (as an option), therefore, I dont't even need to delete the mesh under the clothes or those overlapping mesh for the clothes if I wish to. Therefore, using the imported model as is is still possible for osg (though I didn't tried yet very complicated animated model).
Maia
Maia1003
 
Posts: 27
Joined: Thu Mar 01, 2012 9:42 pm

Re: Creating a clothes library: some technical aspects

Postby Maia1003 » Thu May 03, 2012 2:36 pm

Hi,

Another point to mnetion is that the blendeg to OSG exporter can import animation.
Maia
Maia1003
 
Posts: 27
Joined: Thu Mar 01, 2012 9:42 pm

Re: Creating a clothes library: some technical aspects

Postby duststorm » Thu May 03, 2012 7:29 pm

Maia1003 wrote:One thing I missed to mention is that the osg exporter can only export the visible mesh (as an option), therefore, I dont't even need to delete the mesh under the clothes or those overlapping mesh for the clothes if I wish to.

Be mindful of that. It says the mesh (as in, whole mesh, not polygons part of a mesh that are hidden from view).
This means if you hide objects in blender object mode (so not when editing) by selecting them and pressing the H key they will not be exported. There is a similar option called "export selected" which only exports the selected object.
In fact this option doesn't help you anywhere, and you will still have the possibly intersecting geometry of the body with clothes.
The file you export to OSG will probably contain a few separate meshes: the body, and one for each clothing piece if you export it without altering from blender.

If you think about it, automatically determining which polygons are hidden is not such an easy thing to do. It is possible for one image from a certain viewpoint. It's also doable (but a lot harder) if you assume that you have watertight meshes. None of these applies for a MH mesh. Even if it would be possible, I don't think it would help much. Consider the case I mentioned a few pages back in this thread: viewtopic.php?p=9043#p9043
Image
The skin under a loose shirt is clearly visible from some angles. Yet these polygons would typically be the ones you would like to remove because they can cause intersections. The only solution I could think of would be to fix the shirt so it fits on the trousers tightly (watertight) so there is no gap left. But this would again require manual intervention, and might not be suited for all scenarios. Which is why I think it's best to leave this type of decision up to the artist.
If you assume that your model probably won't be viewed from these types of unusual angles you can probably safely ignore this issue.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2566
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby duststorm » Fri Oct 05, 2012 5:23 pm

I want to post a short update to this thread to mention that these clothes have been included in the official MH release.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2566
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Creating a clothes library: some technical aspects

Postby JuergenPB » Mon Oct 08, 2012 12:09 pm

I just tried the tshirt-longsleeves.
There are no …mask files. :cry:
Attachments
clothtest.png
clothtest.png (25.11 KiB) Viewed 4066 times
Regards
Juergen
JuergenPB
 
Posts: 31
Joined: Fri Apr 27, 2012 10:52 am
Location: Paderborn/Germany

Re: Creating a clothes library: some technical aspects

Postby ThomasL » Wed Oct 10, 2012 3:24 am

Masks and normal maps added in svn.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Previous

Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 2 guests