FBX frame rate 25 issue #83363

Closed
opened 2020-12-03 15:22:21 +01:00 by Adrian Lipiec · 25 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 1060

Blender Version
Broken: Since 2.83
Worked: -none-

Short description of error
Every time you import an animation, Blender will automatically adjust frame rate to 25.
Why 25? I don't know, but It still happens.

Exact steps for others to reproduce the error
Just Import an .FBX file with animation and you will notice Frame Rate 25.

Could we have more options in FBX import?
6agZPeDzLz.mp4

**System Information** Operating system: Windows 10 Graphics card: Nvidia GTX 1060 **Blender Version** Broken: Since 2.83 Worked: -none- **Short description of error** Every time you import an animation, Blender will automatically adjust frame rate to 25. Why 25? I don't know, but It still happens. **Exact steps for others to reproduce the error** Just Import an .FBX file with animation and you will notice Frame Rate 25. Could we have more options in FBX import? [6agZPeDzLz.mp4](https://archive.blender.org/developer/F9433414/6agZPeDzLz.mp4)
Author

Added subscriber: @Coverop

Added subscriber: @Coverop
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

I cannot reproduce. I tested using the Pepe_Mocap.fbx that comes with the FBX 2013.3 converter, and each time it imports as 30 fps, as that is what is written into the FBX file. I tested 2.79 through 2.92 master hash: cba5137f32

Which program did you export the FBX from, and what did you set the fps to when exporting?

I cannot reproduce. I tested using the Pepe_Mocap.fbx that comes with the FBX 2013.3 converter, and each time it imports as 30 fps, as that is what is written into the FBX file. I tested 2.79 through 2.92 master hash: cba5137f32f9 Which program did you export the FBX from, and what did you set the fps to when exporting?
Author

I've used UE4 and Blender software to export animations in 30fps.
Whenever I import animation in Blender (currently using 2.92) It sets automatically to 25fps.
Very annoying.

I've used UE4 and Blender software to export animations in 30fps. Whenever I import animation in Blender (currently using 2.92) It sets automatically to 25fps. Very annoying.
Member

Here is a 60fps FBX I have made in 2.92.

What FPS does Blender get set to when you import it?

T83363_FBX_fps_test.fbx

I've used UE4 and Blender software to export animations in 30fps.

Can you please upload an example?

Here is a 60fps FBX I have made in 2.92. What FPS does Blender get set to when you import it? [T83363_FBX_fps_test.fbx](https://archive.blender.org/developer/F9475208/T83363_FBX_fps_test.fbx) >I've used UE4 and Blender software to export animations in 30fps. Can you please upload an example?

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Member

In #83363#1078074, @dr.sybren wrote:
No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Closing then :)

> In #83363#1078074, @dr.sybren wrote: > No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Closing then :)

Added subscriber: @CGnDEV

Added subscriber: @CGnDEV

It seems related this issue below link.
https://forums.unrealengine.com/t/unreal-animation-export-makes-blender-switch-to-25-fps/380881/4

it seems need to reopen this issue..
i attcehd fbx file that writed from Nuke( with 23.97 fps).
however. Blender changes to 25fps.

I want to suggest that making to expose a parameter for custom FPS or Real_FPS

TOMO_E03_CG_C003_tracking02.0182.fbx

It seems related this issue below link. https://forums.unrealengine.com/t/unreal-animation-export-makes-blender-switch-to-25-fps/380881/4 it seems need to reopen this issue.. i attcehd fbx file that writed from Nuke( with 23.97 fps). however. Blender changes to 25fps. I want to suggest that making to expose a parameter for custom FPS or Real_FPS [TOMO_E03_CG_C003_tracking02.0182.fbx](https://archive.blender.org/developer/F12885479/TOMO_E03_CG_C003_tracking02.0182.fbx)
Member

@CGnDEV, please open a new report and we can tag this one in it.

@CGnDEV, please open a new report and we can tag this one in it.

In #83363#1313483, @EAW wrote:
@CGnDEV, please open a new report and we can tag this one in it.

Sorry.. I don't know to open..... i can't find in 'add action'.

> In #83363#1313483, @EAW wrote: > @CGnDEV, please open a new report and we can tag this one in it. Sorry.. I don't know to open..... i can't find in 'add action'.
Member

Added subscriber: @BClark

Added subscriber: @BClark
Member

What I don't understand about the unreal forum post link is how people are confused that 0-10 is making 11 frames, they aren't exporting 1-10, they are getting exactly what they said 11 frames, ..it counts from 0..not 1?

What I don't understand about the unreal forum post link is how people are confused that 0-10 is making 11 frames, they aren't exporting 1-10, they are getting exactly what they said 11 frames, ..it counts from 0..not 1?
Member

image.png
Also I tried importing that example file into MotionBuilder and get this warning.

![image.png](https://archive.blender.org/developer/F12886213/image.png) Also I tried importing that example file into MotionBuilder and get this warning.
Member

When trying in MotionBuilder to set the frame rate 23.97 it rounds to 24. MotionBuilder has a fixed frame rate of 23.976 but I have to set it to that, I can't set a custom rate it will round.

Same thing in Maya

When trying in MotionBuilder to set the frame rate 23.97 it rounds to 24. MotionBuilder has a fixed frame rate of 23.976 but I have to set it to that, I can't set a custom rate it will round. Same thing in Maya
Member

Blender shouldn't be hard coding custom frame rates to be 25fps though, I am looking now and don't know why it is doing that.

Blender shouldn't be hard coding custom frame rates to be 25fps though, I am looking now and don't know why it is doing that.

Added subscriber: @RobertTolppi

Added subscriber: @RobertTolppi

Hi! I'm still experiencing this issue. Perhaps the behavior that blender should exhibit is matching the FBX frame-rate to the current scene frame-rate although I'm not sure if that's technically possible as I'm not a developer.

Hi! I'm still experiencing this issue. Perhaps the behavior that blender should exhibit is matching the FBX frame-rate to the current scene frame-rate although I'm not sure if that's technically possible as I'm not a developer.

Actually this would be a really easy bug to fix apparently. The community has already found workarounds.
https://forums.unrealengine.com/t/fbx-export-from-ue4-bug-and-blender-animation-import-25-fps-work-around/436668

Actually this would be a really easy bug to fix apparently. The community has already found workarounds. https://forums.unrealengine.com/t/fbx-export-from-ue4-bug-and-blender-animation-import-25-fps-work-around/436668

@dr.sybren
I copy and pasted the forum post here:

I possibly found a bug in unreal engine 4 fbx animation export, namely that it exports it’s animation with 1 frame extra and then scales the animation to that range.
For example, when exporting “ThirdPersonWalk” animation sequence from 3rdPerson Template it should export frames 0 to 29 but it exports frames 0 to 30.

To work around this bug, for importing ue4 animation fbx exports into blender correctly you have to do the following things:

change file “import_fbx.py” in folder “\scripts\addons\io_scene_fbx” line 2337 from

real_fps = 25.0
to

real_fps = bpy.context.scene.render.fps

Set blender’s frame rate to 30 fps in Properties Editor in the Render Tab.

import exported fbx animation

Scale the animation to one frame less, for example if animation is from frame 0 to 30 scale the animation so it becomes frame 0 to 29. you can do this manually in Dope Sheet Editor by setting current frame to 0 in Dope Sheet Editor and than press shortcut “S” to scale and type “0.9666” ((last frame - 1)/ last frame in this case 29/30 which is 0.9666).
This will be a hassle if you have to do it for a lot of imported animations or someone could make a python script to do this automatically.

Edit: here’s a simple python script to automatically scale the time correctly of an armature.
Select the armature, copy-paste this script in the Text Editor and run it

import bpy

store current area type, then change area type to Dopesheet Editor

area = bpy.context.area
old_type = area.type
area.type = 'DOPESHEET_EDITOR'

get active object, animation range, scale animation

obj = bpy.context.scene.objects.active
obj_frame_range = obj.animation_data.action.frame_range
obj_frame_length = obj_frame_range- [x] - obj_frame_range[0]
bpy.context.scene.frame_current = obj_frame_range[0]
time_scale_value = (obj_frame_length - 1)/obj_frame_length
bpy.ops.transform.transform(mode='TIME_SCALE', value=(time_scale_value, 0, 0, 0))

restore area type to first state

area.type = old_type
Hopefully the bug will be fixed soon and you just have to set fps to 30.

This bug of ue4 exporting one extra frame and scaling the whole animation to the new range probably also is in 3ds max and maya.

@dr.sybren I copy and pasted the forum post here: I possibly found a bug in unreal engine 4 fbx animation export, namely that it exports it’s animation with 1 frame extra and then scales the animation to that range. For example, when exporting “ThirdPersonWalk” animation sequence from 3rdPerson Template it should export frames 0 to 29 but it exports frames 0 to 30. To work around this bug, for importing ue4 animation fbx exports into blender correctly you have to do the following things: change file “import_fbx.py” in folder “\scripts\addons\io_scene_fbx” line 2337 from real_fps = 25.0 to real_fps = bpy.context.scene.render.fps Set blender’s frame rate to 30 fps in Properties Editor in the Render Tab. import exported fbx animation Scale the animation to one frame less, for example if animation is from frame 0 to 30 scale the animation so it becomes frame 0 to 29. you can do this manually in Dope Sheet Editor by setting current frame to 0 in Dope Sheet Editor and than press shortcut “S” to scale and type “0.9666” ((last frame - 1)/ last frame in this case 29/30 which is 0.9666). This will be a hassle if you have to do it for a lot of imported animations or someone could make a python script to do this automatically. Edit: here’s a simple python script to automatically scale the time correctly of an armature. Select the armature, copy-paste this script in the Text Editor and run it import bpy # store current area type, then change area type to Dopesheet Editor area = bpy.context.area old_type = area.type area.type = 'DOPESHEET_EDITOR' # get active object, animation range, scale animation obj = bpy.context.scene.objects.active obj_frame_range = obj.animation_data.action.frame_range obj_frame_length = obj_frame_range- [x] - obj_frame_range[0] bpy.context.scene.frame_current = obj_frame_range[0] time_scale_value = (obj_frame_length - 1)/obj_frame_length bpy.ops.transform.transform(mode='TIME_SCALE', value=(time_scale_value, 0, 0, 0)) # restore area type to first state area.type = old_type Hopefully the bug will be fixed soon and you just have to set fps to 30. This bug of ue4 exporting one extra frame and scaling the whole animation to the new range probably also is in 3ds max and maya.

Please, as asked before, create a new bug report that contains the necessary info, steps to reproduce, etc.

For inserting code, please read this guide, it'll help to keep the code readable.

Please, as asked before, create a new bug report that contains the necessary info, steps to reproduce, etc. For inserting code, please read [this guide](https://stuvel.eu/post/2021-07-11-code-in-markdown/), it'll help to keep the code readable.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#83363
No description provided.