incorrect bone offset causes dae animation corruption #115969

Open
opened 2023-12-09 04:03:56 +01:00 by billconan · 1 comment

System Information
Operating system: macOS-14.1.2-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 1.2

Blender Version
Broken: version: 4.0.1, branch: blender-v4.0-release, commit date: 2023-11-16 16:40, hash: d0dd92834a08
Worked: (newest version of Blender that worked as expected)

Short description of error

I have a blender file containing a character animation. The animation looks ok in blender,

Screenshot 2023-12-08 at 6.35.41 PM.png

but once I export it to a dae file, it becomes completely corrupted.

For example, if I import it into an empty blender scene, the animation will be stretched.

Screenshot 2023-12-08 at 6.36.17 PM.png

And it is even worse in MacOS' finder

Screenshot 2023-12-08 at 6.36.39 PM.png

Exact steps for others to reproduce the error

please see the attached blender file, try exporting the animation to a dae file. Then check the file preview in MacOS finder or reimporting it into blender.

Root cause

both the mesh and the bones have an offset. however when exporting to a dae file, blender doesn't seem to include the offset for the mesh, but does respect the offset for the bones. hence the bones and the mesh don't align anymore.

Opening the dae file in a text editor, modifying this line (removing the bone offset along the z axis)

    <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 -2.078348 0 0 0 1</bind_shape_matrix>

to

    <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</bind_shape_matrix>

will correct the animation.

**System Information** Operating system: macOS-14.1.2-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M2 1.2 **Blender Version** Broken: version: 4.0.1, branch: blender-v4.0-release, commit date: 2023-11-16 16:40, hash: `d0dd92834a08` Worked: (newest version of Blender that worked as expected) **Short description of error** I have a blender file containing a character animation. The animation looks ok in blender, ![Screenshot 2023-12-08 at 6.35.41 PM.png](/attachments/1c9f1796-74c4-4117-b6d9-02f15c3e99b5) but once I export it to a dae file, it becomes completely corrupted. For example, if I import it into an empty blender scene, the animation will be stretched. ![Screenshot 2023-12-08 at 6.36.17 PM.png](/attachments/560be52b-7c88-42e9-bb08-cd30d9cbf448) And it is even worse in MacOS' finder ![Screenshot 2023-12-08 at 6.36.39 PM.png](/attachments/32256861-0c64-4f9c-8452-1ae8b5a29d9d) **Exact steps for others to reproduce the error** please see the attached blender file, try exporting the animation to a dae file. Then check the file preview in MacOS finder or reimporting it into blender. **Root cause** both the mesh and the bones have an offset. however when exporting to a dae file, blender doesn't seem to include the offset for the mesh, but does respect the offset for the bones. hence the bones and the mesh don't align anymore. Opening the dae file in a text editor, modifying this line (removing the bone offset along the z axis) <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 -2.078348 0 0 0 1</bind_shape_matrix> to <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</bind_shape_matrix> will correct the animation.
billconan added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-12-09 04:03:57 +01:00

I can confirm. However, we already have some reports involving animation problems in Collada.
This is probably a duplicate of one of these:
#115227: Exported bone animation does not match source
#98529: [Collada Export] Exporting with origins in Y-UP results in misalignment of mesh and skeleton + broken animations
#98207: Export and import collada = distorted mesh.
#67344: Collada Import Skeleton animations Y and Z axis are swapped
#62909: DAE Export Issue -- matrix transforms
#91214: Export filеs in DAE the animation plays from the last frame
#65712: Extra rotation exporting to collada
#56574: COLLADA Exporter Transform animation by Euler angle is not reflected
#89334: COLLADA inconsistent animation import/export with decomposed transform

I can confirm. However, we already have some reports involving animation problems in Collada. This is probably a duplicate of one of these: #115227: Exported bone animation does not match source #98529: [Collada Export] Exporting with origins in Y-UP results in misalignment of mesh and skeleton + broken animations #98207: Export and import collada = distorted mesh. #67344: Collada Import Skeleton animations Y and Z axis are swapped #62909: DAE Export Issue -- matrix transforms #91214: Export filеs in DAE the animation plays from the last frame #65712: Extra rotation exporting to collada #56574: COLLADA Exporter Transform animation by Euler angle is not reflected #89334: COLLADA inconsistent animation import/export with decomposed transform
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
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#115969
No description provided.