Author Topic: Problems importing animation from Maya  (Read 544 times)

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Problems importing animation from Maya
« on: March 16, 2018, 03:55:13 PM »
Hi all, i was able to import my model via OBJ correctly from Maya to Terragen 4.
The position and rotation seems correct.

However when i import my CHAN file to animate my object, i get strange results.

The pivot point of my OBJ objects is animated correctly, rotation and translation are moving correctly.
But the geometry of the object is teleport-ed to a different location.

What's going on?
« Last Edit: March 16, 2018, 04:00:37 PM by xxdaggerxx »

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Re: Problems importing animation from Maya
« Reply #1 on: March 16, 2018, 04:28:52 PM »
ok i think i solved it. seems like the Object must be zeroed out and centered in the world in Maya before importing to Terragen..


Now the rotations are all messed up. Translation seem ok. Any solutions to this?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12654
  • Holy snagging ducks!
Re: Problems importing animation from Maya
« Reply #2 on: March 16, 2018, 08:39:09 PM »
Sounds like a possible rotation order issue. Does Maya provide any options on export to adjust the rotation order?

- Oshyan

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Re: Problems importing animation from Maya
« Reply #3 on: March 17, 2018, 03:16:32 AM »

Offline luvsmuzik

  • Member
  • *
  • Posts: 2830
    • luvsmuzik 1995
Re: Problems importing animation from Maya
« Reply #4 on: March 17, 2018, 03:53:00 AM »
This is probably a Hannes question/answer but try some links in the animation series page...

This one talks of one way to do it...

https://planetside.co.uk/forums/index.php/topic,23384.msg236656.html#msg236656

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Re: Problems importing animation from Maya
« Reply #5 on: March 17, 2018, 08:16:22 AM »
I am able to export the maya cam via FBX, the rotation and translation works. But cant export object animation via CHAN with out the rotation going bonkers.

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Re: Problems importing animation from Maya
« Reply #6 on: March 20, 2018, 03:29:09 AM »
I am still unable to solve it, anyone has any advise?

Offline digitalguru

  • Member
  • *
  • Posts: 361
Re: Problems importing animation from Maya
« Reply #7 on: March 25, 2018, 03:49:41 PM »
Just seen this thread and sent you a PM - you should be able to get the script working now.

Quote
ok i think i solved it. seems like the Object must be zeroed out and centered in the world in Maya before importing to Terragen..

The only way to export mesh data from Maya to Terragen is via .obj format which is very basic, it basically just stores the vertex positions and some face information and UVs for the mesh. It doesn't store the pivot point of an object, which is why an object to be exported from Maya should be zeroed to the origin before saving out. Then the .chan data can be exported separately and the animation will be correct when applied to the imported .obj in Terragen. This might seem like a faff, but I actually prefer it - once you've imported an .obj into Terragen (and re-set the shaders, which can take a while) - it's imported. Any animation changes can then be updated via a .chan file without having to re-load the object.

Quote
Now the rotations are all messed up. Translation seem ok. Any solutions to this?

Yes. Please try my script again and it will work after creating a World to set up the scene (importing a Micro Export terrain).

The rotation order required by the .chan file in Terragen is different to Maya - I get around this by creating a locator in Maya, changing it's rotation order, parent to object to be exported, baking the keys, then exporting a .chan file from the locator.

My script also deals with the pivot point issue by temporarily resetting the object to be exported to the origin before saving to disk.
Edit: It's important not to freeze the transforms of the object, so it can easily be set back to the world origin.

It's not pretty, but given the limitations of obj as a transfer format, the only way to do it. If we had Alembic as a import/export format all this would be unnecessary, but I suspect that might be a while coming.


« Last Edit: March 25, 2018, 08:15:10 PM by digitalguru »

Offline xxdaggerxx

  • Member
  • *
  • Posts: 9
Re: Problems importing animation from Maya
« Reply #8 on: March 27, 2018, 10:59:25 AM »
Thanks digitalguru!

I manage to get your script to work, thank god for it!

I'll keep you updated if i notice any other issues. Thanks.

Offline digitalguru

  • Member
  • *
  • Posts: 361
Re: Problems importing animation from Maya
« Reply #9 on: March 27, 2018, 12:56:47 PM »
Good to hear!

 

anything