Skeleton from Scratch

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Skeleton from Scratch

Postby chriku18 » Sat Aug 29, 2020 3:55 pm

I'm sorry if this was asked before, but I found nothing so here I go (probably) again:
After too many sleepless nights hating AGPL, I tried to use the obvious solution:
I modeled my own basemesh around a completle independent template and started creating my own clothing, simplified by the fact that MakeClothes2 (I think its called that) can use a complete independent basemesh and is not tied to hm08.
Everything works fine, but I have still one AGPL piece unreplaces: My current skeleton is the Makehuman skeleton (as there is only one real one, the others are using this as a base (As far as I found out)), converted using a few horrible 5min scripts. While trying to create my own skeleton the question popped up: How was this one made? Do I have to guess all my vertex indices and rotation planes by hand and restart makehuman for every change, are there any hints for writing my own blender plugin or is there already a tool for that? All I found in this forum are mentions of "secret developer tools" and a dead bitbucket link (https://bitbucket.org/MakeHuman/makehuman-utils/src (I seem to be a few days too late)).
chriku18
 
Posts: 8
Joined: Sat Aug 01, 2015 5:18 pm
Location: Stuttgart, Germany

Re: Skeleton from Scratch

Postby punkduck » Sat Aug 29, 2020 9:20 pm

chriku18 wrote:I'm sorry if this was asked before, but I found nothing so here I go (probably) again:
After too many sleepless nights hating AGPL, I tried to use the obvious solution:
I modeled my own basemesh around a completle independent template and started creating my own clothing, simplified by the fact that MakeClothes2 (I think its called that) can use a complete independent basemesh and is not tied to hm08.
Everything works fine, but I have still one AGPL piece unreplaces: My current skeleton is the Makehuman skeleton (as there is only one real one, the others are using this as a base (As far as I found out)), converted using a few horrible 5min scripts. While trying to create my own skeleton the question popped up: How was this one made? Do I have to guess all my vertex indices and rotation planes by hand and restart makehuman for every change, are there any hints for writing my own blender plugin or is there already a tool for that? All I found in this forum are mentions of "secret developer tools" and a dead bitbucket link (https://bitbucket.org/MakeHuman/makehuman-utils/src (I seem to be a few days too late)).


Yes, we try to make most of the tools mesh-independent (also maketarget uses tables now for symmetrizing etc.). I try to move most of the parameters to configuration files which can be exchanged.

I did one skeleton for bento but I tried it with my own methods. It was an experiment, in the end I even got wings working ... ;)

http://www.makehumancommunity.org/forum/viewtopic.php?f=7&t=16927

Best is to create the weights in Blender and then export an own .mhw file and append that to your skeleton. You have to test everything in Blender anyway. And unfortunately I also did a lot of things manually, so I e.g. created end-points for the bones, but these have to be on the basemesh and not on the proxy. Otherwise the targets of makehuman will not change the bones.

But after export you will have your own skeleton and own proxy without APGL.

I created some tools, it includes an .mhw exporter. I used it and it worked. I will improve this soon, it was one of my first programs before I joined the team:

https://github.com/black-punkduck/MakeHuman-Helpers/tree/master/blender2_8

And some documentation here:

https://github.com/black-punkduck/MakeHuman-Helpers/wiki/blender279weightplugin.md

I hope it helps at least a lil' bit
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Skeleton from Scratch

Postby chriku18 » Sun Aug 30, 2020 12:27 am

Thank you for the quick reply... I have not yet reached the mhw or proxy stage, but oof... I already played with the JSON before, and hoped that there would be an alternative, so this will be a very fun time...
But it won't be as bad as your example: After reimplementing the core logic of makehuman (basemesh transformation, rig and proxy „fitting“) three times by now I found enough flaws to break the compatibility (I haven't really used the python gui for years by now (tahts why I am only ogling the base mesh, skeleton and modifier database in this thread viewtopic.php?f=19&t=15079&start=20)): My basemesh has less polygons (as it is just for a game and the loadscreens are bad enough already) and I cut the head off, as it is more flexible to model it seperately, so I have much less bones in the basemesh. Also I have forked your blender tools, rotatet the axis to Z-Up (after my brain nearly exploded) and started exporting normals with my proxies, allowing for simpler imports of sharp edges, etc.
For the topic of weighting: I plan to weight each proxy in blender, as e.g. armors should only deform for the shape key part (modelling tab) and not the posing part. For this I will probably just allow using both basemesh and the proxy as source for the indices, then I should be able to bypass this issue altogether.
But thank you anyway, because I will need the weights to allow simple import and basemesh conversion of clothes from makehuman (converted works nearly 30% of the time already) and future surprises.

EDIT: After too much aggression with the JSON-File I gave up and uglied a python script to automatically find the best combination of the surrounding vertices for the joints and a fitting rotation plane. It just needs a blender armature and a mesh and after importing and exporting into makehuman it produces a vaguely similar armature with correct rotations. I will fine-tune it the next days and am ready to share if anyone is interrested.
chriku18
 
Posts: 8
Joined: Sat Aug 01, 2015 5:18 pm
Location: Stuttgart, Germany

Re: Skeleton from Scratch

Postby chriku18 » Tue Sep 01, 2020 9:38 am

First of all: One image says more than a thousand words, so:
Image
Both custom targets are working on the hen, but the pose tab is behaving very strange...
The steps, to reach this point were:
  • Get chicken from blendswap: https://www.blendswap.com/blend/13803
  • Remesh the triangles into Quads, realize then that clicking on triangulate would have also worked
  • Export as .obj (keep vertex order!)
  • Change makehuman/core/mhmain.py, as it assumes the basemesh is "good", but mine isn't, so the maxFaces of 5 is not nearly enough and who cares about speed... ?
  • overwrite default.mhskel using my script
  • overwrite default_weights.mhw using your plugin
  • edit base.obj to include joint-ground to stop massive console spam
  • export the texture as skin
I hope, that I didn't forget a step in this list...

My script aligned all bones, as they should be (I hope):
Image
The pose tab is broken anyway, but as makehuman isn't my main target, I won't search for the issue there (sorry). Same is for the modeling tab, as only custom modifiers seem to work.

If anybody is interested, I will upload my script and these files, but I see this as a success that creating a different basemesh is possible. This took me less than seven hours, but I think the next ones should go a lot faster, as it could be possible, that I have eliminated most of the bone-rotation-issues by now.

EDIT: Forgot to include a image of the final result (with skin)
Attachments
3.png
2.png
1.png
chriku18
 
Posts: 8
Joined: Sat Aug 01, 2015 5:18 pm
Location: Stuttgart, Germany

Re: Skeleton from Scratch

Postby RobBaer » Fri Sep 04, 2020 8:02 am

:D @Joel. Reminds me of your April Fool's "Make Cow" post. Guess all good ideas "come home to roost" :lol:
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Skeleton from Scratch

Postby punkduck » Mon Sep 07, 2020 8:17 pm

Hi

Without joking: this was exactly what I figured out 18 months ago. With some more configuration files describing a basemesh and less constants inside we can also do chickens, cows etc.
Some parts of the program logic simply must be placed in tables or configuration files.

Best is, that you exactly showed us that it is possible with the system. I guess you had the same problems, finding the lines to figure out what is done where in the code etc.

Of course if someone wants to have about 50 different parameters for that chicken, then we have to do the targets. So it is always a lot of work but the concept itself stays the same.

I like it. Maybe I will also try that with the horse or cat I created. :mrgreen:
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Skeleton from Scratch

Postby chriku18 » Mon Oct 26, 2020 3:18 pm

The 50 Targets will probably take some time to create but I'm on it.

But then, what would be the bast way to distribute them?
My current ideas were:
* Publish the files and let the file manager replace the folders inside. None of my usual file managers support replacing folders, all merge the folders so that new and old files are next to each other. So it wouldn't work well on all platforms.
* Publish the files and let the file manager merge the folders together. But this would mean that the old targets are still there.
* Publish the files to replace the whole data Folder. This idea got shot down in another thread, as the repo containing the new data folder would have to be AGPL
joepal wrote:Shaders are source code files, and are supposed to be AGPL. Shaders are only related to what is drawn on the screen inside MH, they are never exported.


Meaning: I found two ways to distribute new "content"(?) (under non-AGPL):
* A list of folder requiring careful cleaning of the data directory before installing
* Changing makehuman to clearly separate the assets from the non-asset internal data.

The second one would be preferable, but as I am only here for the assets and not the Software, this change it is far to big for my schedule. Cleaning the data directory on the other hand could fail in spectacular ways. Is anybody thinking about splitting the data directory or even allowing multiple "human"/chicken/cow directorys? Could a fork of makehuman with "clean" data directory be maintained? Did I overlook something obvious and spam everybody needlessly?

(About overlooking: I opened a merge request on community-plugins-makeclothes. Do I have to mention it somewhere or do I just need to wait a bit longer?)
chriku18
 
Posts: 8
Joined: Sat Aug 01, 2015 5:18 pm
Location: Stuttgart, Germany


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron