Recruiting for Makehumans Future!

Locked forum where the devs and staff post news about the makehuman software

Re: Recruiting for Makehumans Future!

Postby punkduck » Tue Jan 07, 2025 9:05 pm

Hi

Happy new year to all :D And it already successfully started with a nasty cold in my case which reduces brain capacity when programming complicated stuff :shock:

Yes the channel order in my version is not yet flexible and still uses Blender standard, the output in old MakeHuman is XYZ for location and rotation.
You get a message when reading a file with a different order.
I am aware of it and will fix that, when other more important stuff is ready to go.

I managed to get animations back to Blender meanwhile using the bvh lines from my makehuman version. So Blender exporter is nearly completed (well no face-expressions still, but I use a different concept for that).

BVH: One needs additional information for that. The rest pose must be given at least. Then the so-called rest-matrix of each bone must be decomposed (we are in global space) and then it must be used as a correction matrix.

I have to admit, that I needed to understand the mhx2 importer from Thomas Larrson for that. He first calculated a correction matrix.
Then this correction matrix is used to calculate the animation in Blender for each bone. Here is the code for the bone-rotations: I change to Euler and do not use quaternions, because I wanted to allow 360 rotations like a pirouette. (Maybe I change it back to quaternions as an option in the importer, but NOT for root bone).

Code: Select all
euler = Euler((radians(m[6]), radians(m[7]), radians(m[8])), 'ZYX')
if name in self.bonecorr:
       cmat = self.bonecorr[name]
       mat = cmat.inverted() @  euler.to_matrix() @ cmat
       rot = mat.to_euler()
       pbone.rotation_mode = 'XYZ'
       pbone.rotation_euler = (rot.x, rot.y, rot.z)


gLTF is next. There the animation is used with buffers (translation and scale as VEC3, rotation in quaternions as VEC4) per bone. One or more input buffers for timeframe, then all the values in output buffer per bone ("channel"), the buffer pair they call a sampler. For a classical "step animation" (or baked animation) input buffer will be 1/24 equidistant time values (that is, what blender creates). This might be configurable but usually game engines allow to change the speed anyway. The output is a lot of smaller binary buffers then, scaling I will not add in the beginning, but it might be supported later, atm. we do not have jiggle bones and even dislocation is not used except for the position of the root bone.

Usually I will struggle with the correct values for quaternions ... :?

I wrote/improved a glb-file (binary gltf) analyzer in between. Maybe I will add this tool also in our repo or contact the person who wrote the original, there was no skeleton and animations so far. Maybe that helps other people as well.
User avatar
punkduck
 
Posts: 1252
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby punkduck » Sun Jan 26, 2025 7:51 pm

socketcom.png
first steps with socket communicator


Meanwhile I created a socket communication. Internally it uses the exact same way as the mh2b format. There is no difference reading a file or a bytestream ;)
The character is transported using two calls, one for a JSON description and one for the binary buffers (the concept glTF uses as well).

Here is the code which works for binary connections and files:
Code: Select all
     
 if isinstance(inputp, bytearray):
            buf = inputp[self.bufferoffset:self.bufferoffset+length]
 else:
            buf = inputp.read(length)
 self.bufferoffset += length


The transport for animation is still buggy, just learnt that is does not work for hidden vertices ... and Noelia jumps up and down. Bad floor calculation. But that is typical in the beginning :roll:

Greetings
Punkduck
User avatar
punkduck
 
Posts: 1252
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby RobBaer » Mon Jan 27, 2025 11:35 pm

Very nice. Your image also gives us some sense of how your environmental lighting is working, I guess. It didn't seem to move into Blender. Intentional?
User avatar
RobBaer
 
Posts: 1226
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Recruiting for Makehumans Future!

Postby punkduck » Sun Feb 02, 2025 8:57 pm

Hi

At the moment the socket is only a second way to import the character. There will be a few more features. But not everything makes sense. For example one can import different characters or replace an existing one. So a "keep in sync" would not always be, what is wanted. There is also a problem with definition, where the textures should be in the end. When one saves something from blender, paths should be relative etc.
Blender Eevee should give similar results, yes.

In between I did these measurement targets, which create a visual representation inside makehuman. It is an OpenGL overlay of lines always in foreground. The vertices are now defined in the target description and will be no longer inside program code. I found some unused code to calculate cup sizes. Well, so I decided to generate a character info, with a bunch of values as shown in the image below. As long as you have a female older than 8 (that's what I found in the internet, although usually it starts with 11 to 14) cup sizes are calculated. Size are from AA to O, last one would be boobs-on-a-stick, because of bust/underbust ratio calculation. Today I started with randomization.

measurement.png
measurement and information


After randomization, different order of bvh files will be tested. At the moment brain capacity is limited to the easier stuff. :?

Greetings, Punkduck
User avatar
punkduck
 
Posts: 1252
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby punkduck » Sun Feb 09, 2025 8:14 pm

Hi

Meanwhile I discovered: real cupsizes are only calculated, when the breast-distance slider is like -50 ... otherwise mostly DD-F models will appear :mrgreen:

Anyway I tried with the random-generator meanwhile. One can really create creepy characters, like the one on the left side. With symmetry some look rather cute. And when I change them only a little and set ideal factor (which is proportions) to higher value + start with a character (here 100% female, breastsize= +50%), and NO reset to standard it seems to be quite okay.

weirdos1.png
from weirdos to non-weirdos


So without reset, now one can use an existing character. So I loaded Leska and dressed her with elvs nice undies.
I change her by approx 15% and 75% ideal, 90% symmetric and "female only". Similar characters will appear.

weirdos2.png
changing an existent character


Last test is with the same values, face only.

weirdos3.png
change the face only


The idea would be to call these functions by socket from blender as well. I think this way is more helpful than the old randomizer.

(most of the rules (like pregnancy only for females) and which groups are changed are configured in the base.json file to allow similar features with other names on different characters / meshes in the future)

Punkduck
User avatar
punkduck
 
Posts: 1252
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby tomcat » Mon Feb 10, 2025 2:04 pm

Excellent work!
punkduck wrote:Anyway I tried with the random-generator meanwhile.

Is it possible to optionally enable random generation by Gaussian distribution instead of uniform?
Foreigners' reactions to Russian "Bird's Milk" candies
— Are your birds being milked?
— In Russia everyone is milked. Here even the zucchini is used to make caviar.
User avatar
tomcat
 
Posts: 452
Joined: Sun Sep 27, 2015 7:53 pm
Location: Moscow (Orcish Stan), The Aggressive Evil Empire

Previous

Return to News from the crew

Who is online

Users browsing this forum: No registered users and 1 guest