Length of animation clips in exported FBX file
I am the user who asked the question related to the "no to all" button yesterday.
I have another question.
I noticed that the length of the animation clips in the exported FBX file is not reflected when imported into another Unity project or Maya.
Binary/ASCII 2010~2020.. doesn't matter.
As in the image, when importing, only the length of the first animation clip is reflected normally, and the rest is applied as the length of the second clip.
In other Unity projects, I figured out three workarounds to make the animation clip in this FBX the same length as the original.
One can select the clips one by one and then press the "Clamp Range" button to set them to their original length.
The second is to export as "one file per clip".
However, it is inconvenient to have to open fbx files one by one to ctrl+D to edit the corresponding animation clip in another project.
The last method is to copy the FBX file with ".meta" file from the original project in File Explorer and paste it into another Unity project.
This method normally imports the length of all clips in the imported FBX file. (Obviously this would not be possible in the autodesk "FBX review".)
So, what I am wondering is, when FBX is imported as all clips in one file, is there a way to keep the original clip length without having to copy the ".meta" file along with the FBX file to another project?
(*I have confirmed that Unity's "FBX Exporter" does not have this length issue)
Customer support service by UserEcho
thank you very much for reporting this issue. This seems to be a bug in the UMotion FBX exporter.
May I ask you to show me a screenshot of your export settings that cause this issue in UMotion (click on the gear icon in the clip editor and create a screenshot of the settings window)? That would make it easier for me to reproduce your exact situation.
Thank you very much.
FBX ASCII/Binary 2010~2020
I tested all combinations and the result was the same.
I drag and drop the FBX file from the original project to the new Unity project.
To Same version New project
Ah ok I think I miss understood your situation at first place.
You have 2 Unity projects:
1) In the first project you have UMotion and create your animations. Export them to FBX and everything is correct for this FBX file.
2) Then you copy the FBX file to the second project but the clip start/end frame times aren't correct there.
That's because this clip start/end frame times are Unity only settings stored in the *.meta file of the FBX file. When you copy the FBX from one Unity project to another, copy the *.meta file with it (make sure to click File --> Save Project in Unity before doing so, to guarantee that changes have been written to disk).
While the FBX file itself does also contain separate animation clips, Unity's treats an FBX file as if it is having one single long animation file which you then have to manually slice into the correct pieces in the import settings.
I don't know why Unity is not automatically detecting the clips from the FBX file, I have to double check that. The FBX file should import correctly in Maya though, can you verify that please?
However, if you use Unity's "FBX Exporter" package, the start/end frame times are preserved even if you drag and drop only the FBX file without having to copy the ".meta" file together.
Considering that the size of the meta file is smaller, Unity's FBX exporter seems to include the clip length information in the FBX file.
That's more convenient when working between different Unity projects.
Also, the file shows the clip start/end correctly inside Autodesk FBX *Review.
I'm not yet used to working with animations in Maya
Can I select and play one of the multiple animation clips included with FBX in Maya?? ^^a
I get you're point. I have to further investigate which information is missing exactly. Thanks also for pointing out the fbx preview app, that might help me identifying the issue.
I'm going to keep you updated.
Thanks for further investigation.
I did some further investigations regarding this topic.
I created a fresh UMotion project with 2 animations ("Clip1"with a length of 60 frames and "Clip2" with a length of 120 frames). Then I exported the animations as a new FBX file using the same settings you mentioned. I then copied only the fbx file (without the meta file) to a different Unity project and also opened the fbx file in the fbx review app. For me, in every scenario the clips show up correctly and also the clip lengths are correct:
Please try to delete your existing *.fbx file and re-export everything. Maybe the issue is related to the file not being overwritten properly?
Are all your animations using the same framerate? Animation clips in the same fbx file must all share the same framerate.
If this doesn't solve your issue, it might be dependent on your specific situation. Do you think you could send me your UMotion project file (*.asset) and the related character (without textures if you want) so that I can re-produce your exact situation? You can send the files via the email support form or request a link to my dropbox via the form if file size is too big. Thanks.
https://a.uguu.se/FJaBVvmO.unitypackage ->Result only
https://a.uguu.se/dKzStavk.unitypackage -> All related files
You probably need to test with 3 or more clips or try to make Clip1 longer than Clip2 and export them
As you can see from my screenshots, up to the length of the second clip is saved correctly, but you can see that all the clips after that follow the length of the second clip.
Yes. All animations are using 60 FPS.
The previous screenshots were the results of exporting Fbx from Umotion as a Generic project, and this file was tested by exporting a new FBX from Umotion Humanoid Project today.
The result is the same.
Since it is a Unitypackage file, the keyframes at the start and end of the clips will be displayed correctly when imported for the first time, but when drag and drop only the FBX file to another project, the start and end of clips after the second clip will probably follow the second until there is a longer clip.
My guess is that the length of the clips in between seems to be negligible until you get a clip with a longer length in the list.
Thanks for further investigations
Thank you very much for the files and for the additional information.
Thank you very much for the hint, that's indeed what seems to cause the bug. I'm currently looking into why this is happening and how to fix it, seems to be some weird default behavior of the FBX SDK.
I'm going to let you know as soon as a fix is available. Thanks again for reporting this issue, I appreciate the time you put into this bug report!
Fixed in UMotion V1.27. Available soon via the asset store.
Thanks again for reporting this issue. Much appreciated!
Stellar job! and my pleasure and thanks for fixing the issue.