Recruiting for Makehumans Future!

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

Re: Recruiting for Makehumans Future!

Postby tomcat » Thu May 16, 2024 10:26 pm

punkduck wrote:Well to visualize an animation made from BVH would not do or help much for game developer.

If we can add animations ourselves maybe.

Yeah, I mean, it would be nice to be able to assign animations to MH models and exporitize with it to the game engine.

Until I found out to make an average angle between two bone-poses can only be calculated by the use of quaternions. :geek: :ugeek:

At least tomcat might know that. :mrgreen: That way is called slerp (spherical lerp) in Godot (well not only there).

Well, I've heard of that. The first thing aspiring game developers are taught is to stay away from Euler and use quaternions.
So if your partner is smiling at you and also changes mouth to give a kiss there are two combined poses involved.
The partner usually does that without thinking too much about it -- well mostly at least :lol:

But we unfortunately need to figure out how to combine rotations on the same bone.

The engine just mixes animation:

Image
  • and change back to Euler

Why go back?
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: 467
Joined: Sun Sep 27, 2015 7:53 pm
Location: Moscow (Orcish Stan), The Aggressive Evil Empire

Re: Recruiting for Makehumans Future!

Postby tomcat » Fri May 17, 2024 12:33 pm

punkduck wrote:Until I found out to make an average angle between two bone-poses can only be calculated by the use of quaternions. :geek: :ugeek:

At least tomcat might know that. :mrgreen: That way is called slerp (spherical lerp) in Godot (well not only there).

Using 3D transforms

Image
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: 467
Joined: Sun Sep 27, 2015 7:53 pm
Location: Moscow (Orcish Stan), The Aggressive Evil Empire

Re: Recruiting for Makehumans Future!

Postby punkduck » Sat May 18, 2024 8:25 pm

Hi

Go back to Euler? Unfortunately yes, at least atm.

Poses in BVH files are defined in Euler angles ... and with an additional order (XRotation, YRotation, ZRotation or any other order given in that file).

Btw: here, there is no gimbal lock, because the bone starts in a pivot point, but depending on the bone-axis the other two directions of course create different results when you do bone-axis rotation first or in the end.

The rest matrices and pose matrices had to be calculated from these BVH files. Maybe I can change the skinning matrices so to use quaternions, but atm I am not sure.
This math still gives me some headaches here and there, although I learned that more than 30 years ago at university (and 30 years are a long time) :roll:

Disadvantage of quaternions + (s)lerps ... they usually flip at 180 degrees (pure mathematics). The reason I normally use Euler for root bone in Blender (to allow e.g. a pirouette).

Btw. I started with gltf as the first exporter. Whereas it is a good exporter for all game engines meanwhile (and I will eventually leave out fbx), we need a second one when we want to keep geometry. The reason is inside the format:

https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-mesh-primitive

It is not a wonder, since khronos created the file format to support graphic cards mainly and these 7 primitives are the ones I also use (triangles). Quads are no longer in use. A format for blender to keep geometry would be designed to keep blender happy and should be usable as a normal file or a socket. Of course one could send tri-meshes to blender as well. But try to add a new loop-cut in a tri-mesh ;)

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

Re: Recruiting for Makehumans Future!

Postby punkduck » Tue Jun 04, 2024 7:22 pm

Meanwhile I fixed my biggest headache and the posed characters do not form pretzels anymore (or folded chairs) ..
Reason for my headaches ... well try to understand the old euler_matrix code in line 1064 here:

https://github.com/makehumancommunity/m ... mations.py

For me a rotation matrix itself is not the problem.

But this code handles a bunch of cases (we only need half, we don't have repetion) and the index swapping and changing of parity makes it really simple :mrgreen:
Yes that version is memory efficient, but a missing "-" somewhere or even a mixed column and one can produce funny images ... :lol:

Anyway it looks like this.

boneaxis_problem_fixed.png
no more pretzels or folded chairs


And here is a mesh exported with new glTF (glb, binary format), no smoothing ("vertex-normals") yet and no textures added.
That is the result after a week. And it was mostly understanding the way they do it.

The technique is pretty similar to the openGL format we use inside. We have positions, UV-positions, vertex-normals + indexes for all used triangles.

I did not even have to organize extra buffers ...

glTF is just a JSON-blob for the description including lengths and offsets + all buffers appended byte by byte as a second blob. (blob = binary large object). For a quick test was okay, but the buffers I need to change in the end, because hidden geometry is also exported at the moment. And then one also does not need positions and UV positions of unused vertices.

Yes glTF ,... I promised that to Tomcat a time ago ;)

gltf.png
gltf export + screenshot in Blender


I have a list of about 20 smaller topics (conflicts etc.) then I will open the repo for those already interrested. 1 month maybe?
User avatar
punkduck
 
Posts: 1255
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby punkduck » Tue Jul 09, 2024 8:52 pm

repo is open to public.

Of course still far away from what should be there in the end. Be careful when installing not to destroy old stuff (e.g. use v_env on Linux).

I still need to write a lot of stuff, so please keep in mind: issues like "xyz is not yet realized" I will delete ;) I know what I need to do the next months.

The version comes with no assets (except a pair of eyes). Assets are downloaded from our server by a script. Own assets must be moved in new folders. If you do that: mhpxy and npz files are no longer existent, mhclo files and obj files will be compressed into one file named .mhbin, Rest stays identical.

I need to write a detailed documentation of course. But not to write everything twice I need to finish stuff before. Look and feel is also not final.

Smallest possible screensize is around 1200 x 800 which might not be that good when one have zillions of assets.

resolution.png


https://github.com/makehumancommunity/makehuman-pyside6
User avatar
punkduck
 
Posts: 1255
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby wolgade » Sat Jul 13, 2024 3:00 pm

For those who are not so familiar with git, python and venv, here are some instructions for Ubuntu:

Clone the repo.
Code: Select all
git clone https://github.com/makehumancommunity/makehuman-pyside6

This will create a new directory called "makehuman-pyside6" and download the repo.

Code: Select all
cd makehuman-pyside6

to move to the new directory.

Check for updates:
Code: Select all
git pull


Create virtual environment:
Code: Select all
python3 -m venv venv


Activate virtual environment:
Code: Select all
source venv/bin/activate

Your prompt wil change.

Install required packages. These files will be placed under "venv".
Code: Select all
pip install -r requirements.txt


That's it.

Start Makehuman:
Code: Select all
python3 makehuman.py


Read the instructions and expect trouble!

Of course, you don't have to repeat the steps for further launches of the program. You just "cd" to the right directory, activate the environment (see above) and start the program.

@punkduck:
What kind of feedback is useful for you?

Trouble with Intel Graphics? Yes, we have!
Funny ways to teminate the program?
wolgade
 
Posts: 798
Joined: Wed Jan 30, 2013 6:50 pm

Re: Recruiting for Makehumans Future!

Postby punkduck » Sun Jul 14, 2024 7:26 pm

@wolgade:

When working with venv, of course not the complete git procedure has to be repeated.

Usually when continuing you should of course "cd" to the folder makehuman-pyside6. Then maybe do a
Code: Select all
git pull


and you always must activate the environment, otherwise python will normally not find OpenGL and stuff.

Code: Select all
source venv/bin/activate


We both need to communicate via email (since we do that anyway). Intel, but not only Intel has some problems. The typical "dance" between PySide6 and OpenGL is the same as with QT5 before. And not only Wayland has problems. The famous latebind.py kinda sucks everywhere and not only in MakeHuman. My example of today:


File "/data/punkduck/build/new_makehuman/lib/python3.8/site-packages/OpenGL/latebind.py", line 43, in __call__
return self._finalCall( *args, **named )
File "/data/punkduck/build/new_makehuman/lib/python3.8/site-packages/OpenGL/wrapper.py", line 678, in wrapperCall
raise err
File "/data/punkduck/build/new_makehuman/lib/python3.8/site-packages/OpenGL/wrapper.py", line 671, in wrapperCall
result = wrappedOperation( *cArguments )
File "/data/punkduck/build/new_makehuman/lib/python3.8/site-packages/OpenGL/error.py", line 230, in glCheckError


latebind.py/wrapper.py is the layer between openGL-C and python OpenGL. Weird enough I only listed the names with "local GL Information" in the Help menu. So ASCII on screen, nothing really graphical. Then I listed them again and the error was gone.

Of course it is kinda generic and seems to be the base for looong discussions .. here is one example, enjoy reading
https://github.com/LinuxCNC/linuxcnc/issues/1599

:roll:

Some of the solutions and texts look like pure fantasy. Debugging the wrapper/latebind.py of course also does not help, because the layer behind is in C and therefore perfectly hidden.

I still need to put your venv documentation to the readme.md in github and should also add sth. similar for windows.

At least now everyone can follow what I do by reading the commit messages.

One of the topics now really works better than before, here is my collection of dresses, easy to find by pressing one button, when one changes / adds missing tags with the asset editor included. This does not change the files, it adds the comments into a database which then is taken instead of the orignal tags. Of course an own thumbnail can be added as well.

progress.png
Dresses galore


Along way to go tbh. and a lot of stumbling blocks on that way as well ... :?
User avatar
punkduck
 
Posts: 1255
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Recruiting for Makehumans Future!

Postby wolgade » Mon Jul 15, 2024 10:42 am

punkduck wrote:@wolgade:

When working with venv, of course not the complete git procedure has to be repeated.


I know, but don't expect this from anyone. You grew up with computers in text mode. Younger people grew up with smartphones.

We both need to communicate via email (since we do that anyway). Intel, but not only Intel has some problems. The typical "dance" between PySide6 and OpenGL is the same as with QT5 before. And not only Wayland has problems.


Wayland? Things may go from bad to worse. Nvidia doesn't support Wayland yet. If you use the binary drivers from Nvidia, you still use X11. As a matter of fact, nvidia replaces most parts of your x-server with their own stuff. This is not true for Intel.


Of course it is kinda generic and seems to be the base for looong discussions .. here is one example, enjoy reading
https://github.com/LinuxCNC/linuxcnc/issues/1599

Well, one trick here is to force X11 compatibility. In an ideal world this shouldn't be necessary, but linux graphics is quite the opposite of an ideal world.
wolgade
 
Posts: 798
Joined: Wed Jan 30, 2013 6:50 pm

Re: Recruiting for Makehumans Future!

Postby wolgade » Mon Jul 15, 2024 11:15 am

Ok, a few minutes later, I have to correct most of the stuff I wrote.

My notebook with Intel graphics still uses X11.

https://www.tuxedocomputers.com/en/Whats-the-deal-with-X11-and-Wayland-_1.tuxedo

Why not switch to Wayland? I tried. Let me put it this way: It was a funny graphical experience. Makehuman on drugs with a sky box being transparent instead of black. :lol:

@punkduck: Forget about issues related to Wayland. None of us is using it.
wolgade
 
Posts: 798
Joined: Wed Jan 30, 2013 6:50 pm

Re: Recruiting for Makehumans Future!

Postby punkduck » Tue Jul 23, 2024 7:05 pm

Hi folks

Meanwhile I am working on two export/import systems the same time. One is glTF and second one is a special blender method. The blender one will work with JSON + "value buffers" and the buffer technique rather identical to glTF.

Why not 100% identical?

  • glTF is triangle based, so the exported geometry is often different to the original one.
  • Afaik glTF is limitied to 4 weights per bone.
  • In blender bones are shown different (with an end-point). In principle this point is not needed for calculation.
  • Maybe I will allow a few different materials later. Although I will try the openGL PBR concept (also in Makehuman2, but at least when exported).

I will add a material editor to allow new parameter for mat-files with e.g. "metallic". A lot of other parameters might disappear. At least I need a concept for this editor.



As an example: this is a blender export (gltf identical, but tris) in case material would use "metallic" already ;)
blenderexport.png
makehuman to blender



Wolgade and I, we both struggle with that Mesa-Stuff. Atm it only seems to run with nvidia.
User avatar
punkduck
 
Posts: 1255
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

PreviousNext

Return to News from the crew

Who is online

Users browsing this forum: No registered users and 1 guest