About Store Forum Documentation Contact



Post Reply 
Maya import problem.
Author Message
smashthewindow Offline
Member

Post: #1
Maya import problem.
How it looks in maya:
[Image: 2vWvM]

How it looks in the engine:
[Image: 2vWyA]

Any idea why it might be doing that?
Original file is also attached.

File

Thank you.
04-08-2013 12:43 AM
Find all posts by this user Quote this message in a reply
ronalmb Offline
Member

Post: #2
RE: Maya import problem.
EE uses a different joint orientation set up than maya. What I had to do, in maya, was make sure that the x-Axes on my joints pointed down the joint chain to the child. The if a joint has no child (such as the top of the head), or it has multiple children (like hips, shoulder) I had to make sure that the X axis in this case points up. You can do this with the Orient Joints tool but it may require you to break apart your skeleton in some cases, align the joints, and then put them back.
(This post was last modified: 04-08-2013 02:45 AM by ronalmb.)
04-08-2013 02:44 AM
Find all posts by this user Quote this message in a reply
smashthewindow Offline
Member

Post: #3
RE: Maya import problem.
Coming from a programming background, we're having trouble following your directions. Is there anyway we can find an example maya mesh with skeleton to view as a reference?
04-09-2013 12:47 PM
Find all posts by this user Quote this message in a reply
ineffable Offline
Member

Post: #4
RE: Maya import problem.
(Not trying to thread-jack you here, but...)

I'm experiencing the same issue in Blender currently.

[Image: 2wYY3]

[Image: 2wZ2a]
04-09-2013 07:52 PM
Find all posts by this user Quote this message in a reply
smashthewindow Offline
Member

Post: #5
RE: Maya import problem.
(04-08-2013 02:44 AM)ronalmb Wrote:  EE uses a different joint orientation set up than maya. What I had to do, in maya, was make sure that the x-Axes on my joints pointed down the joint chain to the child. The if a joint has no child (such as the top of the head), or it has multiple children (like hips, shoulder) I had to make sure that the X axis in this case points up. You can do this with the Orient Joints tool but it may require you to break apart your skeleton in some cases, align the joints, and then put them back.

Ok, so we partially fixed the problem.
Here's how the photo looks like in maya:
[Image: 2xa5I]

And here's it imported:
[Image: 2xaj4]

We believe the wrong scale on the left is caused due to mirroring, is this true?

Could you have a look at the original maya file over here?

http://www.sendspace.com/file/9s3xz7

Thanks.
04-10-2013 01:35 AM
Find all posts by this user Quote this message in a reply
ronalmb Offline
Member

Post: #6
RE: Maya import problem.
You are correct that the joints orient the wrong way on the left due to mirroring. Someone (over a year ago now, wow) once told me that they had difficulty getting mirroring to work in a maya to ee pipeline (this topic here: http://www.esenthel.com/community/showth...tid=4018).

I have looked at your original maya file, and I would have to say that mirroring is definitely a problem there. You can try the following:

1. in the file, press F8 to go to component mode.
2. In the selection mask toolbar (it replaces the one that lets you toggle selectable meshes, joints, etc), click on "select miscellaneous components" -- it looks like a question mark.
3. select the right Lower leg Joint, zoom in to where the knee is)
4. Select the XYZ locator axes. When you do so, it will highlight.
5. Press E to go to rotation.
6. Rotate the joint just a bit. And then Undo your change (i'll show why in a second).
7. Open up your script editor. You can find this in Window -> General Editors. (Forgive me if you know this already).
8. In your script editor, find the line "rotate -r -p -9.87426cm 50.0987cm -5.20124cm -os -21.392798 0 0;"
* -- your line may be slightly different. The important thing here is that you understand the 3 numbers after the -os "-21.392798 0 0;" This is the X Y Z coordinates of how we are going to rotate our pivot and is the portion that we will be editing so we can make a command to rotate those pivots for you further below.

9. Copy the whole line of the command and paste it in your script editor input window (the lower half of the script editor).
10. Edit the line so that the last three numbers after -os says: -180 0 0;
My line, for instance now says: rotate -r -p -9.87426cm 50.0987cm -5.20124cm -os -180 0 0 ;

11. The pivot should still be selected in your panel. With it selected, hit the play button in your script editor. You should see the pivot's Y and Z change orientation, while the X still points down the joint chain.

12. Repeat this for each of the joints that were mirrored that has this problem, then export and test to see if it's made a difference in EE.

Ineffable: Sadly, I do not know much about Blender. I am sad that you are experiencing the same issue but relieved (slightly) to see that the experience is not limited solely to maya.

I imagine that Blender offers a way to adjust the pivots on your joints. If the situation is similar to the one that we have in Maya, you will want to make sure that the X-axis of the joint points down the chain to its child. In areas where the chain would split (for example, where the back bone branches off to make right and left arms) - you want to make sure that the back bone is oriented to follow the neck, and not one of the arms. Another trouble spot for me was where the hand branches off to each of the fingers - i ended up aligning the hand joint to follow the middle finger.
(This post was last modified: 04-10-2013 09:11 PM by ronalmb.)
04-10-2013 09:05 PM
Find all posts by this user Quote this message in a reply
knocks Offline
Member

Post: #7
RE: Maya import problem.
I have not used maya in a long time so may be this is no longer required but are you deleting the history and freezing transformations before export?
04-11-2013 02:24 AM
Find all posts by this user Quote this message in a reply
gdalex Offline
Member

Post: #8
RE: Maya import problem.
I have the same problem with my animated meshes and EE... Thanks for the workaround Ronalmb, yet I think that the EE FBX importer has to be modified because your per-joint cmd solution is too long for a biped... so damn too long for a game project with several dozen of bideps creatures smile
04-11-2013 09:46 AM
Find all posts by this user Quote this message in a reply
ronalmb Offline
Member

Post: #9
RE: Maya import problem.
knocks: It is a joint orientation difference between maya (and possibly blender) and EE (which uses the same world orientation as 3dMax). Deleting the history (which I assume included making sure you didn't delete the non-deformer history, otherwise you would lose your skinning) and freezing the transforms will not fix this, unfortunately.

gdalex - Quite so. If you already have several dozen of biped creatures it is definitely a lot of work to convert them -- and the animations would need to be redone. But if you don't have those models yet, the workaround is easier as you can simply not use the mirror joint option when creating the model.

The way I am now building my skeletons are as follows:

a. Build the hip - spine - neck - head joint chain (with as many bones as you need to complete that). Use Skeleton -> Orient Joints Options -> Orient to Primary Axis X, Secondary Y to make sure all of those joints are oriented properly.
b. Build a leg to foot joint chain for either left or right leg. Doesn't matter which. Position it. Keep track of your X axis (for instance, left Hip is at X .5). Orient those joints properly.
c. Duplicate the leg joint with Ctrl-D instead of mirroring it. Put it at the negative value of the other leg). For instance, if left hip was x .5, the right hip will be at x -.5. This is an additional step or so, but not too much more than mirroring.
d. Repeat for the left shoulder to left hand.
e. Add the middle finger if it has it. Orient the finger.
f. Duplicate and position your other fingers. Make sure they are oriented.
g. Parent middle finger to left hand. Orient left hand.
h. Parent other fingers.
i. The remaining arm and hand is a bit of a pain, but I duplicate it, unparent all of the bones, and position each one to the negative X value of the left arm. Reparent, reorient, etc.

Yes, it's a bit of a pain - but its just a different workflow. I don't know of any other alternatives (but welcome ideas) as long as this orientation incompatibility exists for importing/exporting joints from maya to EE. It's existed for a little while now. EE believes it's the FBX exporter. I have not attempted to contact whoever is responsible for the Exporter but I imagine they'd say it's not an issue with them and I lack the technical brains to figure out who can fix it.
04-11-2013 02:13 PM
Find all posts by this user Quote this message in a reply
gdalex Offline
Member

Post: #10
RE: Maya import problem.
Hey Esenthel,

Sorry to dig that up, but I have still trouble to use my human mesh exported in FBX format ...

Here is what I have in Maya :
   
I have the same result when import the file back into Maya.

Now in Esenthel :
   

Zoomed out :
   

It's quite horrible.. Yet I thought I might still do something with it.. So I cleaned it and resized the bones :
   

It is better, but saldy it's unusable, because when I toggle bones to ragdoll one, the drawn capsules are not consistent with the bone geometry :
   

The two red bones are ragdoll, and the capsule size (Y axis) is minimal here... And they are far too big :/

Would it be possible, Esenthel, to :
- See your FBX importer ? It seems that it uses some transformations that are not applied (or differently) by Maya or Blender, for example ? And fix this bug :/
May be each bone has an additionnal transformation data in the format that can be dropped when importing ?
OR
- Allow to flip a bone / ragdoll capsule (without affecting the animations)
- Allow rotation, as bone/ragdoll transformation (without affecting the animations)

Many thanks smile
(This post was last modified: 07-19-2013 08:58 PM by gdalex.)
07-19-2013 08:56 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Maya import problem.
Hi,

I could check if there's some extra transformation matrix, or flag for FBX nodes, but I doubt it.

Why you see correct result (I think, not sure) in Maya, is that it does not draw by the actual orientation of the node (like Esenthel) but it always draws a line from "parent -> child".
I think that the issue is how Maya generates skeleton nodes, because for example if you create a fresh/new biped skeleton in 3ds Max and export it using FBX and then plug that into EE then bone orientations are fine.
All .max files exported to .fbx and imported to EE worked fine when I tested them.
That's why I think that it's an issue with Maya, and how it orients the nodes.

But as I've stated above, if you could attach .fbx and original maya file format (.ma or .mb) then I can try it out myself.
07-22-2013 01:33 PM
Find all posts by this user Quote this message in a reply
gdalex Offline
Member

Post: #12
RE: Maya import problem.
Oops, I thought I did smile
If you have 3DS Max on your computer, could you try importing the FBX file to see how the skeleton behaves, please ?

Here's the file. I thought I did upload it <_<

.zip  Homme_test.zip (Size: 220.52 KB / Downloads: 2)
07-23-2013 08:09 AM
Find all posts by this user Quote this message in a reply
gdalex Offline
Member

Post: #13
RE: Maya import problem.
Hey Esenthel,
Some more informations : I tried to import my file into 3DS Max (the bones were at the same position as Maya.
I imported it back into Esenthel, I the skeleton is a be more consistent than I was just after Maya.
I link the new FBX file, if you have some diff tool for the FBX format you might notice something :
.zip  Homme_test2.zip (Size: 225.69 KB / Downloads: 1)

Now, I still can't edit the ragdoll capsule of the Hip_R joint, for example.
And the animated walk cycle is quite a mess ^^

Hope this could help you to find something,
Alex
07-24-2013 09:47 AM
Find all posts by this user Quote this message in a reply
gdalex Offline
Member

Post: #14
RE: Maya import problem.
Esenthel, have you found some time to check that again ?
08-21-2013 09:09 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: Maya import problem.
Hi! Thank you for providing the files, I'll test it as soon as I can, sorry, lately I have too many things on my head.
08-21-2013 11:23 AM
Find all posts by this user Quote this message in a reply
Post Reply