Sync mesh for blender

Works in progress and technical screen shots.

Moderator: joepal

Sync mesh for blender

Postby joepal » Thu Jun 02, 2016 3:45 pm

I've been playing around a bit with speaking directly with MakeHuman from outside applications instead of having to export files. Results so far are two plugins:

One for makehuman for opening a socket server on 127.0.0.1:12345. This server accepts some very basic commands. I'll expand the list of commands it understands eventually.

One for blender which connects to the server and asks about vertex positions and then updates the selected object with those positions.

syncmesh.mp4
Demo of how the plugins work together
(7.85 MiB) Downloaded 752 times


The code works basically, but is pretty primitive so far. If you want to test it, it's available on github at https://github.com/makehumancommunity/community-plugins
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Sync mesh for blender

Postby Aranuvir » Thu Jun 02, 2016 4:22 pm

That's what I call a great new feature. Really amazing. And I had feared the development would finally die after release 1.1.0 ...

Does this also work with mhx-imported models in Blender?
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: Sync mesh for blender

Postby joepal » Thu Jun 02, 2016 7:24 pm

Aranuvir wrote:That's what I call a great new feature. Really amazing. And I had feared the development would finally die after release 1.1.0 ...

Does this also work with mhx-imported models in Blender?


Given our previous track record, I doubt there will be any new major release of the core program for the foreseeable future. Which is probably a good thing. The way I see it, 1.1.x is a now a very stable platform to build on, which means it is now more viable to focus on expanding the set of plugins, assets and online services. These things bring more user value anyway, and are not dependent on any release cycle. Personally, I will most likely focus my effort on this anyway.

Concerning the sync mesh thing: I didn't test, but I presume that MHX2 preserves vertex order, so it should work. What most definitely won't work is operating on a proxy. Also note that changing vertex positions is all it does: specifically it doesn't move, for example, eyes or eyebrows in accordance to shifts in the facial structure. Nor will clothes etc adapt to fit the new shape.

The immediate use I see for it now is in developing clothes or targets for specific toons. If you have an elaborate toon in makehuman you can now easily move around the makeclothes/maketarget base mesh, so that you know that the clothes/targets will fit the end character.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Sync mesh for blender

Postby Aranuvir » Thu Jun 02, 2016 8:46 pm

Well, did some tests with mhx. Primarily it works. It didn’t really like feet on ground and refused to work with the ik-rig 'exported mhx'. An import of the base mesh with default rig and with unchanged import settings worked, too. Of course the rig wasn't scaled. It would be great if the tool could be combined with Thomas' rigging script.

Certainly there are further benefit for this tool, not only for makeclothes.
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: Sync mesh for blender

Postby joepal » Fri Jun 03, 2016 5:13 am

Yes, the plan is to expand the tool in the future to sync more things than just low-level vertex by vertex coordinates, but for now it'll wreck rigging, clothes positions etc if you change too large details. Smaller changes such as increasing the ear size will obviously not have such implications though.

Anyway, another purpose I have with this is trying to interest more people in plugin development, so the next thing I'll do is spending some effort on writing verbose code comments.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Sync mesh for blender

Postby badwolf » Fri Jun 03, 2016 7:19 pm

can you jot down a suggested known working setup (and other how toish stuff)
badwolf
 
Posts: 272
Joined: Fri Feb 06, 2015 12:41 am

Re: Sync mesh for blender

Postby joepal » Fri Jun 03, 2016 7:25 pm

For how to install these things?

Download the repo as a zip from https://github.com/makehumancommunity/c ... master.zip

Assuming windows, copy "mh_sync_mesh" dir to [your blender dir]\[your blender version]\scripts\addons. Copy 8_server_socket to [your MH dir]\plugins. In blender go to user preferences, filter on "mh" and enable the plugin. In MH I think the plugin is auto-enabled, but if not go to settings->plugins and enable it.

In MH go to utilities->socket and check the box to start the server.

In blender select a human mesh, and click the sync button in the makehuman category of the toolshelf.

I didn't actually test any of this in windows. But what are users for if not testing stuff for you? :-)
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Sync mesh for blender

Postby Aranuvir » Sat Jun 04, 2016 9:37 am

More playing around with this handy tool in MakeClothes, this brings up a more general question to me: Obviously MakeClothes average female with helpers != MakeHuman start up mesh with 100% female?
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: Sync mesh for blender

Postby joepal » Sat Jun 04, 2016 7:53 pm

Aranuvir wrote:More playing around with this handy tool in MakeClothes, this brings up a more general question to me: Obviously MakeClothes average female with helpers != MakeHuman start up mesh with 100% female?


Yes, they're different. Startup mh female has, for example, 33% each of asian, caucasian and african applied.

You can achieve the same by loading each of those targets via maketarget, but that's kind of cumbersome.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Sync mesh for blender

Postby wolgade » Sun Jun 05, 2016 10:53 am

Cool plugin. Very useful for making clothes for a specific character, but probably also a great help if you want to create targets.
wolgade
 
Posts: 795
Joined: Wed Jan 30, 2013 6:50 pm

Next

Return to WIP (Work In Progress)

Who is online

Users browsing this forum: No registered users and 1 guest