FBX Export / Skeleton issue

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

FBX Export / Skeleton issue

Postby fortuna » Fri Jul 16, 2021 1:39 pm

There is some issue with FBX export.

i replied to the problem posted here: viewtopic.php?f=7&t=19631
(read first)

... and intend to find a workaround for it now in MakeHuman python fbx exporter.

The next thing i found out is that is seems not no be related to the mesh. Without Skeleton, 3D viewer shows FBX model correct and
with skeleton messing with mesh_orientation in fbx_header has no effect.

Another thing is that, different skeletons have different orientation overruling the mesh orientation.
Attachments
skeleton-o.jpg
fortuna
 
Posts: 22
Joined: Mon Jan 18, 2021 12:12 pm

Re: FBX Export / Skeleton issue

Postby fortuna » Fri Jul 16, 2021 5:17 pm

CMU rigs produce correct fbx for the 3D-viewer and can be imported into Unreal.
So MakeHuman FBX import is not the cause. It is the data! :o

I will compare uengine (306) and cmu (497); maybe i can see the difference. ;)
fortuna
 
Posts: 22
Joined: Mon Jan 18, 2021 12:12 pm

Re: FBX Export / Skeleton issue

Postby fortuna » Fri Jul 16, 2021 5:37 pm

The head and tail of the root bones are the cause some rigs fail.

I have read the documentation at http://www.makehumancommunity.org/wiki/ ... n:Basemesh
What I understood so far...

rigs:
CMU mb and CMU Default Hybrid a rooted by hip based on vertices from joints range.
uengine use vertices from ground range.

base mesh: values are decimenter (dm).
+x contain left body parts. x range is regualary between -5 ... +5
+y contians upper body. y range is regulary between -9 ... +9.
+z should be front side.

According to data\3dobjs\base.obj i guess these are the coordinates of vertices uengine uses:
v -0.2658 -8.4488 0.2658
v -0.2658 -8.4488 -0.2658
v 0.2658 -8.4488 -0.2658
v 0.2658 -8.4488 0.2658
v -0.2658 -7.9173 0.2658
v -0.2658 -7.9173 -0.2658
v 0.2658 -7.9173 -0.2658
v 0.2658 -7.9173 0.2658
head and tail are mixed.

cmu has
v -0.0372 0.6896 0.1817
v -0.0372 0.6896 0.1073
v 0.0372 0.6896 0.1073
v 0.0372 0.6896 0.1817
v -0.0372 0.7641 0.1817
v -0.0372 0.7641 0.1073
v 0.0372 0.7641 0.1073
v 0.0372 0.7641 0.1817
v -0.0372 1.1496 -0.0590
v -0.0372 1.1496 -0.1335
v 0.0372 1.1496 -0.1335
v 0.0372 1.1496 -0.0590
v -0.0372 1.2241 -0.0590
v -0.0372 1.2241 -0.1335
v 0.0372 1.2241 -0.1335
v 0.0372 1.2241 -0.0590
the first 8 are head the lower 8 tail.

values look pretty clean in both cases -> seems to be the reason it works.
median of x is zero.

I need help from an expert to replace root head and tail in rigs by something meaningful that can be used to spawn the
correct coordinate system at origin. the numbers seem to reference index of locations ?! ty.

i did not yet understand how the list of vertices of head/tail are affecting the calculation.
fortuna
 
Posts: 22
Joined: Mon Jan 18, 2021 12:12 pm

Re: FBX Export / Skeleton issue

Postby punkduck » Sat Jul 17, 2021 12:56 pm

Hi

I guess I should do a documentation about the skeleton files ... those are also ASCII or to be more precise JSON files. So one can change and edit them.

The information of what is tail and head is stored in these files. Btw.: is a wavefront obj able to handle skeletons itself? I think not.

Look for default,mhskel and the cmu...mhskel in the directory data/rigs. Open it with an editor and look for "root".

Code: Select all
        "root": {
            "head": "root____head",
            "parent": null,
            "reference": null,
            "rotation_plane": "root____plane",
            "tail": "root____tail"
        },


Next is to search for root____head. You will see only one vertex, because for the default the head starts on the skin, This is one of our problems btw. If one changes the buttocks the character is tilted if you use poses from other characters, because the head of the root bone changes position. The tail is formed by a cube inside the body. Use the meridian of the cube, that is the position. It is no rocket science. I tried a bento with that method.

Code: Select all
        "root____head": [
            4223
        ],
        "root____tail": [
            13622,
            13623,
            13624,
            13625,
            13626,
            13627,
            13628,
            13629
        ],


Now try the same with the cmu skeleton. These are the vertex-numbers, Compare that with the obj ... that's it.

Be careful not all systems consider Y as "up". Some use Z. I work with UE and standard skeleton, of course no pre-made animations can be used then. But it works. When you use CMU and if your character looks like his arms are bent, there is a method to recalculate the bone chains in UE. This is because of the dimensions of the mannequin. And UE is able to handle every skeleton! But the use of Mixamo for animations often demands to use other skeletons as our standard. You will find hundreds of videos of smart guys :lol: being able to download and click some buttons in YouTube. But if you want to find out how it really works you will find one or two with a lot of luck.

I added a file called UE demo here (click on next link), when I discussed the topic with Woodcat. He wanted to use it in engine Godot with less overhead (UE IS complicated but I also started with it).
I use the standard skeleton without toes, own animations to e.g. allow a step aside or a rotation by 90 degree and an overlay to speak. It works. But it is more a test simulator in my case, so do not wonder.

http://www.makehumancommunity.org/forum/viewtopic.php?f=3&t=19728

(inside the Jukebox in my demo is another skeleton, that also works and you can see the record player work, so UE is really good for this)

Skeleton-View UE: It always starts from the ground. so it is normal the root bone is "connected". For the default skeleton, the arms are not connected to the spine but UE also connects them with an "extra" bone. I guess these are simply the parent/child relations. These are not real bones. If it is possible to displace bones by position (e.g. jiggle bones do that) it is a way to simulate it with a bone in between with rotation + scaling instead of positioning the child bone.

Because I do the animations in Blender, normally the character is exported to blender first. I do some corrections there and then I use the export in Blender ... and there I have to enter the correct Y/Z direction.
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: FBX Export / Skeleton issue

Postby fortuna » Sat Jul 17, 2021 1:19 pm

Hi,

thank you for the reply and all this information!

I'm working on unreal, especially getting makehuman bodies smoothly running in the free pack "advanced locomotion system (ALS)". i got lot of the base anaimations running by doing a animation retargeting. using an extended uengine skeleton from makehuman als mass import works fine from makehuman without going over belder.

because the "ALS" pack is pretty advanced, a couple of things do not work this way regarding climbing animations or helding objects, and foot adaption to landscape. So i want to find out what is the root cause and how can i help to get things running more smoothly.
fortuna
 
Posts: 22
Joined: Mon Jan 18, 2021 12:12 pm


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest