Animated object instances export frozen in place #104875

Closed
opened 2023-09-07 16:30:58 +02:00 by Thomas Barlow · 3 comments
Member

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.40

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-01 21:43, hash: de09bdb510a0
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: FBX format (5, 6, 0)
Author: Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem

Short description of error
Exporting an animated object with instancing enabled results in the instances being frozen in place in animation.

This was first identified as a bug in the code due to the use of the ob_obj variable that might by referenced before assignment

for dp_obj in ob_obj.dupli_list_gen(depsgraph):
and this issue represents the effects of that bug.

The issue happens because the world-space matrices of the instances need to be updated each frame, but the bugged code is not doing so correctly.

.blend first frame .blend last frame
image image
.fbx first frame .fbx last frame
image image

Exact steps for others to reproduce the error

  1. Open the attached .blend
  2. Start an FBX export
  3. Disable Bake Animation>NLA Strips
  4. Disable Bake Animation>All Actions
  5. Finish the FBX export
  6. Import the exported .fbx and compare to the .blend
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.40 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-01 21:43, hash: `de09bdb510a0` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: FBX format (5, 6, 0) Author: Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem **Short description of error** Exporting an animated object with instancing enabled results in the instances being frozen in place in animation. This was first identified as a bug in the code due to the use of the `ob_obj` variable that might by referenced before assignment https://projects.blender.org/blender/blender-addons/src/commit/33a73455099428a93e2d4f54cc0ee5ae76db871f/io_scene_fbx/export_fbx_bin.py#L2257 and this issue represents the effects of that bug. The issue happens because the world-space matrices of the instances need to be updated each frame, but the bugged code is not doing so correctly. | .blend first frame | .blend last frame | | -- | -- | | ![image](/attachments/4fbe870f-5018-412c-b463-20a724c02def) | ![image](/attachments/09bb415e-e6ce-479c-ab46-a8a87d76eb97) | | .fbx first frame | .fbx last frame | | -- | -- | | ![image](/attachments/6c98b52b-6fe5-4832-a3ff-2326e8829dd3) | ![image](/attachments/1f92958f-44ae-4f3c-a475-04f4bef1d75e) | **Exact steps for others to reproduce the error** 1. Open the attached .blend 1. Start an FBX export 1. Disable `Bake Animation`>`NLA Strips` 1. Disable `Bake Animation`>`All Actions` 1. Finish the FBX export 1. Import the exported .fbx and compare to the .blend
Thomas Barlow added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-09-07 16:30:58 +02:00

Appears to be a duplicate of:
#93604: FBX Exporter: Wrong Animations in exported Collection instances

But I'm considering closing the other one instead, as there are screenshots and code mentions here.

Appears to be a duplicate of: #93604: FBX Exporter: Wrong Animations in exported Collection instances But I'm considering closing the other one instead, as there are screenshots and code mentions here.
Germano Cavalcante added
Status
Confirmed
Module
Add-ons (BF-Blender)
and removed
Status
Needs Triage
labels 2023-09-08 15:58:02 +02:00
Author
Member

Yes, this should be a duplicate. I hadn't initially considered instance collections, but testing my fix showed them to also be affected.

I could copy most of the content of this report into a comment on #93604 and then close this report?

Yes, this should be a duplicate. I hadn't initially considered instance collections, but testing my fix showed them to also be affected. I could copy most of the content of this report into a comment on #93604 and then close this report?

@Mysteryem, I already closed the other one, thanks for testing.

If necessary, the description here can be edited to include the file in the other report:

fbx-collection-instance-animation-bug.blend

@Mysteryem, I already closed the other one, thanks for testing. If necessary, the description here can be edited to include the file in the other report: [fbx-collection-instance-animation-bug.blend](https://archive.blender.org/developer/F12687051/fbx-collection-instance-animation-bug.blend)
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-09-11 17:29:24 +02:00
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#104875
No description provided.