Axis problems with rigged makehuman models through blender->dae

Level design, models, animations, physics, etc.
28 posts Page 1 of 3
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Aug 14, 2016 8:14 pm
So, this weekend I finally tackled the subject of importing a rigged makehuman model to T3D... and am ready to ask for help.

I made some very impressive nightmare demon monsters though!

Image

My problem boils down to the skeleton coming in on the wrong axis (I think). Be default it ends up rotated 90 degrees around the X, ie face down on the XY plane. The stretched out mesh is a problem I've seen many times before, signifying a cumulative error in node positioning, ie adding the error of the parent to each child and so on.

Here's the working figure in blender, with the "game" skeleton rig from makehuman:

Image

But, backing up a bit: I first tried just saving collada files directly from makehuman. For some reason, this resulted in an invisible mesh, and I never did figure out exactly what was wrong with it, but it seems there are no materials at all. In any event, the bones seem to end up behaving the same as the ones from blender, so...

I soon moved on to exporting from makehuman to blender, using first mxh2 format and then just collada. From blender, I export to collada and import the results into T3D. In a model with no bones, this works more or less perfectly, in terms of mesh, textures, UV maps etc.

Here's an unrigged model, with the same pose but some clothes thrown in. It has some weird lighting issues (flickery lighting, and the fact that the clothes don't cast shadows, only the skin mesh does) but other than that he looks reasonably okay.

Image

However, with a skeleton, the default pose pictured above in blender ends up like this after import:

Image

In the shape editor, you can see the skeleton orientation. I played around with the override_upaxis option, and that did rotate my skeleton but didn't solve the main cumulative (read: demonic monster from the depths of hell) problem. Note that in addition to the overall rotation of the skeleton, there are also major issues with the pose itself, especially the arms.

Image

Here is a basic TPose, in the mission:

Image

And here's the same pose in the shape editor:

Image

I'm remembering some sketchy methodologies in the collada importer when it came to fixing up axis / handedness, and am afraid it's going to come down to a full-on engine problem here, but before I go there I'd love to know if there's just some setting I missed somewhere.

Anybody doing this every day and willing to share their system?
Duion
Posts: 813
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun Aug 14, 2016 8:50 pm
You have to rotate the skeleton properly in blender before exporting. I also have written a feature request on makehuman issue tracker to add an export option for T3D so you don't have to rotate the skeleton manually.
Janders
Posts: 44
Joined: Wed Sep 02, 2015 12:41 am
by Janders » Sun Aug 14, 2016 9:32 pm
I ran in to the same problem trying to animate the Torque dummy.

As Duion said the bones need to be aligned with the mesh, also the first frame of every animation needs to be in the base pose (or T pose in most cases), then you have to adjust the animation length in the animations tools inside Torque.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Aug 14, 2016 10:19 pm
Hmm, okay... any quick advice on how you do that? It _seems_ properly rotated to the naked eye, as in my second image, where you can see the skeleton with fingers etc. looking like they are in the right position relative to the mesh.

Is it an export to collada issue, or is the skeleton rotation something I have to do to the model in Blender itself before the export process begins?
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Aug 14, 2016 10:20 pm
And also, what parameters do you set in makehuman before you export? Y up versus Z up? Bones with local = global rotation? Babe in the woods here.
Duion
Posts: 813
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun Aug 14, 2016 10:50 pm
You did export wrong, your skeleton is on the floor, it should stand upright. If you do that your skeleton will face negative y axis, so you need to rotate it to face the positive y axis in blender. Make sure you are in the right editor, I think you need to rotate the whole thing in the object editor, not the mesh in edit mode.
My character using the makehuman skeleton works fine and I just rotated it.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Mon Aug 15, 2016 1:14 am
So @
User avatar
Duion
, what do you use for your orientation setting in makehuman? Z up or Y up? And then do you make bone orientation local = global?
Duion
Posts: 813
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Aug 15, 2016 1:24 am
No idea what I used, I tried until the guy was standing upright, probably Z up, only weird people use Y for the Z axis.
I just took the whole thing in object editor and rotated it 180 degree. You will have -180d rotation on Z axis for the whole object then in your right inspector panel.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Mon Aug 15, 2016 3:05 am
Well, I've clearly got something different going on here. Rotating my character resulted in the same mess, only rotated 180 degrees:

Image

Messing with the bone orientations in makehuman (along local x, along local y) definitely changes things, but not in a way you could describe as better:

Image

Thanks for confirming this does work for somebody, though! Definitely good to know it can work without serious engine changes. It's probably just some global/local checkbox somewhere...
Duion
Posts: 813
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Aug 15, 2016 11:04 am
Posting more of those creepy images isn't going to help...
Ok I dug out the export options I used:
-feet on ground
-Z up, face -Y
-scale units: decimeter

Format: Blender exchange (mhx)

Then you have to rotate the thing in object editor 180 degree around the Z axis so it faces the positive Y axis.

That should be all that is needed, very simple.

PS: Here is the feature request I posted on the makehuman project to support Torque3D: http://bugtracker.makehumancommunity.org/issues/984
With that change you could export to Torque3D directly without having to rotate it, which is the only thing you need to do to make it work for Torque3D.
28 posts Page 1 of 3

Who is online

Users browsing this forum: No registered users and 1 guest