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 Shaba1 » Thu Mar 29, 2012 2:24 am

duststorm wrote:
robertltux wrote:as far as doing the Nightly its not all that bad ...

On linux it's three commands:
Code: Select all
svn update (or checkout at first)
mv Makefile.Linux Makefile
make

A lot easier ;)


Just a comment. Not everyone in the world uses linux. And not everyone that uses makehuman is confortable with the command line and svn.
Shaba1
 
Posts: 164
Joined: Wed Mar 05, 2008 3:21 pm

Re: Creating a clothes library: some technical aspects

Postby joepal » Thu Mar 29, 2012 6:27 am

Just a comment. Not everyone in the world uses linux. And not everyone that uses makehuman is confortable with the command line and svn.


For reference, this is how you build on windows: http://www.makehuman.org/node/193
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4473
Joined: Wed Jun 04, 2008 11:20 am

Re: Creating a clothes library: some technical aspects

Postby duststorm » Thu Mar 29, 2012 12:50 pm

Shaba1 wrote:Just a comment. Not everyone in the world uses linux.

Of course, I'm just teasing a bit ;)
But it's really ironic how sometimes the OS that people believe is the easiest to use makes things so incredibly hard while they can be so simple.
I think the build environment for windows is really the hardest and most boring to maintain, something most developers like to stay away from.

But this is all just the rantings of a programmer. Don't you mind them. ;)
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 Maia1003 » Mon Apr 23, 2012 6:19 pm

duststorm wrote:What version of makehuman are you using?

Just double click it in the library, your view should change to the human again and he should be clothed.
What happens in your case?


I am sorry for replying too late, I missed your post.

I installed the last version of MH (nightly builds of 22 april 2012) and everything is great. Thank you so much for this wonderfull work.
Maia
Maia1003
 
Posts: 27
Joined: Thu Mar 01, 2012 9:42 pm

Re: Creating a clothes library: some technical aspects

Postby mflerackers » Tue Apr 24, 2012 12:18 am

duststorm wrote:
Shaba1 wrote:Just a comment. Not everyone in the world uses linux.

Of course, I'm just teasing a bit ;)
But it's really ironic how sometimes the OS that people believe is the easiest to use makes things so incredibly hard while they can be so simple.
I think the build environment for windows is really the hardest and most boring to maintain, something most developers like to stay away from.

But this is all just the rantings of a programmer. Don't you mind them. ;)


A programmer staying away from a problem instead of trying to solve it sounds like a contradictio in terminis :p.
MakeHuman project Developer
mflerackers
 
Posts: 636
Joined: Thu Feb 05, 2009 11:53 am
Location: Kyoto

Re: Creating a clothes library: some technical aspects

Postby duststorm » Tue Apr 24, 2012 11:16 am

mflerackers wrote:A programmer staying away from a problem instead of trying to solve it sounds like a contradictio in terminis :p.

Not necessarily. Most literature teaches to stay away from those rat holes and avoid strategies that are guaranteed to get you into trouble.
That's why frameworks and middleware are so popular in system designs.

I don't believe it's a programmers' job to be shoulder deep in a puddle of mud struggling to tackle a problem, only to uncover a new one everytime he manages to struggle through. That's what you want to avoid so one can concentrate on making real innovation happen. Of course this is in an ideal world ;) Instead we live in a world where terms like proprietary, platform-specific and vendor lock-in are rule instead of exception.

Of course that doesn't mean that finding elegant strategies for overcoming such problems is not a noble cause. :)
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 Maia1003 » Mon Apr 30, 2012 5:15 pm

Hi duststorm,

Thank you again for your work and for sharing with us. Thank you also for all websites that you provided, really wonderful.

My actual problem is about the exportation of a MH model to a 3D engine. I guess it depends almost only on the plug-in to the engine (I use Openscenegraph which has a Blender exporter to a native format .osg), but after trying several approaches and reading several posts here, I think it is not only related to the exporter.

First, I can export nude model to OSG but have some issues for dressed ones. To be able to export the nude model, I had to save the texture files to .png otherwise I got no texture (the exporter does not accept tif format). I read somewhere on this forum that all MH textures files should be in .png in the future so this is not a really problem. Also, I need to delete the eyebrows and eyelashes meshes otherwise I get black areas there. I read same issues while exporting the model to Unity. It would be great if option checkboxes related to png texture and eyes lashes and eyebrows are added for mhx export (as for .obj export).

Second, when I tried to export dressed models, I just got the external cloth (the sweater) exported and the rest is black (see Images as exported to OSG ).

As a solution, I experienced several approaches and the only that seems to work is to put the same z_depth to all clothes, and unlinking the clothes masks on the body mesh. I got this result (see image ).

Now, I experienced the pose in Blender and export to OSG, and then I don’t understand what is happening: when I use the basic clothes as those that come with MH (sweater, jeans), everything is OK (see Image), but when trying to do the same thing with your clothes, these latter are not behaving as the body. To make the underlying skin not to poke through the clothes, the meshes under the clothes must be deleted (as you or someone else suggested for performance).

I wonder if this is related to masks: the Blender T-shirt as the shoes have no mask, but I am not sure because the jeans_game has one and it doesn’t work either.

So, my concern is about the correct steps to be followed to make clothes as those basics ones (sweater, jeans) coming with MH. It seems that something was missed when creating the jeans_games, the shoes and t-shirt since your clothes do not behave as those basic ones.

Could you please have a look what would be the problem ?
I can share with you my blend file too.

Thank you very much,


PS: I have the last version of MH (nightly builds of 23 april 2012) and I have release version Blender 2.61, Windows 7-32 bits.

Maia
Attachments
dressed_wc_posed.png
With the same z_depth (=50), and unlinking the masks associated to the sweater and the jeans. The skin is exported well.
test_09_pose_unlinked.png
Correct pose for the jeans, nor for the t-shirt (no mask associated)
dressed_boy_unlinked_posed_without_masks.png
A texture is not exported and the "color" of the skin is "wan". The clothes do not behave as the body.
Clothed_woman.png
Only external sweater (z_depth =50) is exported, z_depth(jeans) = 40.
Clothed_woman.png (9.11 KiB) Viewed 6191 times
Maia1003
 
Posts: 27
Joined: Thu Mar 01, 2012 9:42 pm

Re: Creating a clothes library: some technical aspects

Postby duststorm » Mon Apr 30, 2012 8:03 pm

To clarify things, you are experiencing those issues in your 3D renderer, right (so in openscenegraph).
In Blender everything works as it should, correct?

Probably something is configured wrong in Blender, making the exporter you are using do things you don't want.
The best thing to do is trying to understand what settings the blender OSG exporter needs for things to work. Best to look for manuals or help files, or ask help in the community forums of OSG.
I'm not familiar with OSG or its exporter (only the Ogre mesh exporter)

What I can tell you that it is pretty reasonable that you have to solve a few problems before being able to export complex models properly using any blender exporter. The main problem is that firstly these exporters sometimes don't have all features blender has, often because the formats or engines they export to have these limitations (this could be things like: not having multiple texture coordinates, having strict rules on skeleton formats, or maximum bone counts, not allowing certain texture formats, ...) These are the things you need to know about the engine or exporter you are using in order to make good decisions.

Some general things I would consider (these are general remarks for realtime use):
- Try merging everything as one mesh, both clothes and body, remove all geometry that is not needed. Maybe OSG only supports animating of one mesh.
- Try limiting the number of different materials used (for example by remapping uv coordinates to one texture). The more materials in one model the higher the batchcount will be the slower your framerate. (and some engines might even not support multiple materials)
- Be careful with transparency. Don't assume it will just work, figure out how to make it work on your specific engine.
- Mind the poly count. If you are going to be using the MH model in a complex scene or together with a lot of characters, don't just use the base mesh. It's too high poly. Try using one of the proxies instead. Try to stick at least below 10.000 polygons (that is tris, a quad consists of two tris. Since MH meshes only use quads you need to multiply the count by two to know the polycount in the engine)

I suggest to read up on the exporter you're using and what OSG supports, and what blender features the exporter translates into OSG features. If you're new to using that particular exporter it's not such a good idea to start with a MH mesh. Since MH uses a lot of blender features it makes it hard to figure out how to make it work with the exporter. First experiment with a very simple model, animate it, and move on from there.

For example, the old Ogre exporter used vertex groups as submeshes (which can have a different material) for a mesh. But MH uses vertex groups in blender just to group vertexes that belong to a part on the body (this is twhat it was intended for in blender). Just exporting a MH mesh without reducing the vertex groups would lead to a bad export because the mesh had way too many submeshes, above the maximum allowed in Ogre. Same for the skeleton: you cannot use the MH or rigify rigs because they have too many bones. In Ogre, bone count is limited I believe to 256.
These are things you need to be mindful of.

Next to trying to understand the exporter better, try following my general advice and see if it solves your problems.

Without knowing the details, a possibility why exporting the clothes doesn't work with animation could be: you export separate meshes which are rigged to the same armature (this is how the MH setup is in blender) Maybe OSG expects one mesh to be coupled with one armature. And by exporting them separately you actually have two meshes in OSG with separate skeletons, which you need to animate separately.
So, just try merging the body and clothes into one mesh, apply one single armature modifier to the whole, then export it to OSG.

Just remember that blender has some very specific features that only work in blender internally, and which can differ a lot from any other engine. Any blender script can only export a specific subset of these blender settings, and sometimes does this in different ways than you would initially expect. One thing is for sure: there exists no blender exporter that makes an exact 1:1 export of blender data to another program. The blender format is just too specific for that. That's why it's important to read up on what features are available in the tool you're exporting to, and how your exporter maps these features from blender features to the exported format.

Like I said, I cannot be very specific since I don't know OSG. I can only give you general pointers. Try the OSG community if you need more specific help.
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 » Tue May 01, 2012 5:12 am

What happens if you import the character with the Helper Geometry option selected? The original clothes were made before the helpers were introduced, so they follow the body, whereas I think duststorm's clothes follow the helpers.

helpers.png


Edit: Hm. But that cannot affect the shoes, since there are no helpers around the feet. Nevertheless, this is the only major difference compared to the original clothes is that I can think of.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Creating a clothes library: some technical aspects

Postby duststorm » Tue May 01, 2012 10:23 am

ThomasL wrote:What happens if you import the character with the Helper Geometry option selected? The original clothes were made before the helpers were introduced, so they follow the body, whereas I think duststorm's clothes follow the helpers.

Good point. Though I don't think it's the cause. Linking to an armature in blender is done by assigning vertex groups to bones right?
Anyway, it's important to know whether it works in blender or not.
I still think it's an issue with the OSG exporter. Some limitation it can't get past.
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

cron