-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Bug: FBX export gives wrong animation duration #4698
Comments
Did you change the transformation key times too? // position/translation
for (size_t ki = 0; ki < na->mNumPositionKeys; ++ki) {
const aiVectorKey& k = na->mPositionKeys[ki];
times.push_back(to_ktime(k.mTime));
It work for my project. Also, i did some testing and found that it only exports 24fps(FileGlobalSettings::FrameRate_CINEMA). So the duration can be unstable, If it is an animation such as 30fps. |
Ah no, I didn't, I actually didn't even think about doing it. I know the k_time function with only the time as argument works too. |
What I meant was the conversion inside the fbx export function. not before the export function. If you use the The problem seems to occur because the FBX importer uses the same formula for duration and ktime, but the FBX exporter uses different formulas.
|
Hello,
I noticed the animations in my exported fbx files were stopping before the actual end of the animation, leaving some keys behind.
I believe this is due to this specific part of the code here in code/AssetLib/FBX/FBXExporter.cpp:
which causes the duration to be floored right before converting to k time units (if I understood correctly), losing the fractional part.
I changed it to this to make it work for my project:
The text was updated successfully, but these errors were encountered: