Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to export multiple animation clips #16

Open
Chase-Reid opened this issue May 4, 2018 · 14 comments
Open

How to export multiple animation clips #16

Chase-Reid opened this issue May 4, 2018 · 14 comments
Labels

Comments

@Chase-Reid
Copy link

Chase-Reid commented May 4, 2018

OS: Windows 10
Maya Version: 2017
Plugin Version: v0.9.4 BETA

After looking at your instructions I cant seem to find a way to export multiple animation clips via the UI. Ive tried to add multiple animation clips to the same track using the TRAX editor but it exports all animations into a single clip and not their own unique clips.

Could you please provide a solid example for how to export multiple animation clips? Thanks in advance!

@ziriax
Copy link
Contributor

ziriax commented May 4, 2018

Sure, this should work now, I added a scene to the project that contains multiple clips. I'll update the readme.

Could you share your scene with me? Or the stuff printed to both the output window and script editor history?

@ziriax ziriax added the bug label May 5, 2018
@ziriax
Copy link
Contributor

ziriax commented May 5, 2018

It seems the MEL scripts in the ZIP archive got corrupted, Maya was unable to parse these, I'm not sure why this happened. I updated the release with fixed MEL scripts, could you install v0.9.4 again? (just unzip it, and double click the deploy script).

Let's first see if you can export multiple clips using my test scene, that you can download here

Open the scene in Maya 2017 (I use update-5) or 2018 (I use update-3).

Then launch the script maya2glTF_UI.

Set the export folder to whatever you desire.

You should now be able to select trax in the animation dropdown list, and character-set as character (this might already be pre-selected for this scene, as the exporter settings are saved per scene).

Then hit select all polygon meshes and export selected meshes.

In case you want to script this without UI, in the script editor history, the export command should be printed:

maya2glTF -sn "ComplexTraxAnim1" -of "C:/temp/export/" -sf 1 -cpr "(C)2018 bugfa"  -afr 24 -acn "setup" -ast -10 -aet -1 -acn "clip_target1" -ast 1 -aet 40 -acn "clip_target2" -ast 50 -aet 89 -acn "clip_target3" -ast 100 -aet 139 -acn "clip_joint_rot_z" -ast 150 -aet 179.75 -acn "clip_joint_rot_z_dup" -ast 194 -aet 253.5 -acn "clip_rot_debug" -ast 266 -aet 290

The exported glTF should now contain multiple animation clips (I used the glTF extension for VSCode to verify this).

Does this work for you? If this doesn't work, or it works but not for your own scene, please tell me what goes wrong (at least copying the output from both the script editor history and output window, and if possible provide a test scene).

Currently you need to close the exporter window and relaunch maya2glTF_UI if you load or change a scene, the UI doesn't seem to refresh automatically at the moment.

Note that we are not yet using this exporter in production yet at WonderMedia, so it is not tested at all in the field, but that will change in a few months time

@Chase-Reid
Copy link
Author

Sorry to leave you hanging on Friday. I submitted the ticket before I took off for the day. Thanks for jumping on this issue without the additional input.

I followed all the steps you provided above and downloaded the latest 0.9.4. I made an attempt with your scene. I also made an attempt using my scene as well. They both worked like a charm. Great work!

Just as a heads-up I dont see any instructions related to the UI on your README. For artists looking to use your tool id definitely throw that in there. The only way I knew you supported multi clip exporting was in the release notes for 0.9.3.

Great tool! Youre a god

@ziriax
Copy link
Contributor

ziriax commented May 7, 2018

Good to know. You are very brave to try this beta software :-) Thanks!

Many bugs will be fixed as soon as we start using the exporter in production.

Yes, I must update the README indeed!

I would also like to support the Time Editor but I don't know yet how it works (as we had some issues with Trax, we abuse it as a clip sequencer but it actually is a clip blender and mixer, and it can play clips differently since it always seems to use quaternions internally, even if you use Euler angles).

@ziriax ziriax closed this as completed May 7, 2018
@mikebourbeauart
Copy link

@ziriax I haven't tried your scene yet, but I just wanted to note that the Time Editor is replacing Trax (https://forums.autodesk.com/t5/maya-forum/trax-vs-time-editor/td-p/7985667).

@ziriax
Copy link
Contributor

ziriax commented Sep 15, 2018

Thanks for sharing.

I have no experience with Timeline yet.

Currently at WonderMedia we have a separate Maya scene for each animation clip, using references to the rigged model. We are using StudioLibrary to managed the animations.

So Maya2glTF will also need to support that scenario. It is not yet clear how since the glTF spec doesn't state how to deal with multiple animation clip files, but I guess we can cook something custom. After all, it is rather silly to re-export the model and all animations for each new animation, even though the exporter is reasonably fast.

@ziriax ziriax reopened this Sep 15, 2018
@mikebourbeauart
Copy link

mikebourbeauart commented Sep 16, 2018

I do the same thing!

I looked at your file and my setup is exactly the same except for the fact that I use Time Editor to organize my clips instead of Trax Editor. I think the only difference between the two editors is that Time Editor doesn't use Character Sets because it sees them as constraint-driven attributes which is a problem I guess.

I moved my animations to the Trax Editor but it's not exporting animated scale correctly (but it does set the clips to t=0 which I need!). The animated scale shows up correctly when I convert glTFs using sketchfab.com. I can email/DM you a file if you'd like.

@ziriax
Copy link
Contributor

ziriax commented Sep 16, 2018

If it is not exporting animated scale factors correctly, that is a bug, so yes, share your file if possible, thanks!

@mikebourbeauart
Copy link

@ziriax do you have an email I can send it to?

@ziriax
Copy link
Contributor

ziriax commented Sep 16, 2018

Sure, you can use Peter at wonder.media

@mikebourbeauart
Copy link

I'm getting an error from my email saying that the message is undeliverable.

image

@ziriax
Copy link
Contributor

ziriax commented Sep 16, 2018

It seems your message is too large, see the text at the bottom of your screenshot.

Maybe you can upload it using e.g. WeTransfer or something, or share a link from Dropbox/OneDrive/iCloud?

@mikebourbeauart
Copy link

Sorry about that! Sent it again.

@mikebourbeauart
Copy link

After a little back and forth with Ziriax he was able to get it all working by changing my timeline to start at frame 0 instead of frame 1. At frame 0 I added a single key clip to the trax editor where every value is at the bind pose default. Then when I published I set the flag -ivt 0 and it works! Thanks, @ziriax

So key things to know:

  1. If you're using Time Editor bake your clips to scene then create tracks for the in the Trax Editor
  2. Create a bind pose clip at frame 0
  3. Export with the flag -ivt 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants