FBX export adding keys on unkeyed channels #105226

Open
opened 2024-03-08 09:44:03 +01:00 by Nathan Meshcapade · 3 comments

System Information
Operating system: windows 11
Graphics card: 3090 Founders edition

Blender Version
Broken: Blender 2.93, 3.5, 4.02

Short description of error
The .fbx exporter adds keys to location and scale, even though my animation is only rotation.

Why this matters to me
I'm animating a skeleton and retargeting the animation onto another character in Unreal. Characters of different sizes can use the same animation, but the bones have location information on them which makes it not work. My animations are only rotational information on the bones and translation and rotation on the root. The .fbx export adds keyframes on location (this is the main problem for me) and scale on every frame (the rest is less important to me). Ideally, there would be an option to export only the keyframes that I created, on the channels I created them. This means that if I never have a key on location in the entire animation, the exporter wouldn't add keys to location.

Exact steps for others to reproduce the error
Create a cube, add a rotation keyframe, go to frame 50, and add another rotation keyframe. This is the blender file that I attached. Then export the fbx and import it into a new scene. The imported fbx will have keys on rotation, location, and scale on every frame.

**System Information** Operating system: windows 11 Graphics card: 3090 Founders edition **Blender Version** Broken: Blender 2.93, 3.5, 4.02 **Short description of error** The .fbx exporter adds keys to location and scale, even though my animation is only rotation. **Why this matters to me** I'm animating a skeleton and retargeting the animation onto another character in Unreal. Characters of different sizes can use the same animation, but the bones have location information on them which makes it not work. My animations are only rotational information on the bones and translation and rotation on the root. The .fbx export adds keyframes on location (this is the main problem for me) and scale on every frame (the rest is less important to me). Ideally, there would be an option to export only the keyframes that I created, on the channels I created them. This means that if I never have a key on location in the entire animation, the exporter wouldn't add keys to location. **Exact steps for others to reproduce the error** Create a cube, add a rotation keyframe, go to frame 50, and add another rotation keyframe. This is the blender file that I attached. Then export the fbx and import it into a new scene. The imported fbx will have keys on rotation, location, and scale on every frame.
Nathan Meshcapade added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-03-08 09:44:04 +01:00
Member

Only rotation animation is exported when I disable Force Start/End Keying in the export options.


The exporter doesn't check which properties are actually animated/have drivers, all exportable properties that are compatible with each object/bone are initially baked and then the simplification step decides which baked keyframes to include in the export. With Force Start/End Keying enabled, the start and end keyframes of location/scale will be forcefully exported in this case.

Note that importing the .fbx back into Blender to compare adds the location/scale keys in either case, even if the .fbx only contains rotation keys.

Only rotation animation is exported when I disable `Force Start/End Keying` in the export options. --- The exporter doesn't check which properties are actually animated/have drivers, all exportable properties that are compatible with each object/bone are initially baked and then the simplification step decides which baked keyframes to include in the export. With `Force Start/End Keying` enabled, the start and end keyframes of location/scale will be forcefully exported in this case. Note that importing the .fbx back into Blender to compare adds the location/scale keys in either case, even if the .fbx only contains rotation keys.

I tried unchecking Force Start/End Keying on my export from 2.93, 3.5, and 4.02 and it still adds keyframes to location, rotation, and scale on every frame. Below are my .fbx export options. Can you tell me what I'm doing wrong? Is it my version of Blender?

image

I tried unchecking `Force Start/End Keying` on my export from 2.93, 3.5, and 4.02 and it still adds keyframes to location, rotation, and scale on every frame. Below are my .fbx export options. Can you tell me what I'm doing wrong? Is it my version of Blender? ![image](/attachments/a9011436-f200-4930-9000-837f3263c693)
Member

I used all default settings except I disabled Force Start/End Keying. Attached is the .fbx exported from rotating_cube.blend in Blender 3.6.9. If importing this .fbx into Unreal results in location/scale keyframes, then it is Unreal that is creating those keyframes (like Blender would do if you were to import the .fbx).

I used the fbx2json.py script to convert the .fbx to a human readable .json in order to check which properties are actually animated in the .fbx. With Force Start/End Keying enabled, Lcl Translation and Lcl Scaling animation would also be present in the .fbx, but there is only Lcl Rotation here:
image

I used all default settings except I disabled `Force Start/End Keying`. Attached is the .fbx exported from `rotating_cube.blend` in Blender 3.6.9. If importing this .fbx into Unreal results in location/scale keyframes, then it is Unreal that is creating those keyframes (like Blender would do if you were to import the .fbx). I used the `fbx2json.py` script to convert the .fbx to a human readable .json in order to check which properties are actually animated in the .fbx. With `Force Start/End Keying` enabled, `Lcl Translation` and `Lcl Scaling` animation would also be present in the .fbx, but there is only `Lcl Rotation` here: ![image](/attachments/b486ac1d-76c6-41f1-9f0c-1a382b9f577c)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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-addons#105226
No description provided.