Round trip Collada export/import mesh distorted #56516

Closed
opened 2018-08-24 06:10:52 +02:00 by Roselle · 25 comments

System Information
Ubuntu 18.04.1 LTS
NV134

Blender Version
Broken: 2.79b

Short description of error
Exporting animation using collada produces distorted mesh when importing it into Blender again.

Exact steps for others to reproduce the error

  • Download (from Mixamo) or model a simple animated character
  • Export model in .dae
  • Import file into Blender.

omg.jpg
my_test.dae
system-info.txt

  • updated--
**System Information** Ubuntu 18.04.1 LTS NV134 **Blender Version** Broken: 2.79b **Short description of error** Exporting animation using collada produces distorted mesh when importing it into Blender again. **Exact steps for others to reproduce the error** - Download (from Mixamo) or model a simple animated character - Export model in .dae - Import file into Blender. ![omg.jpg](https://archive.blender.org/developer/F4362895/omg.jpg) [my_test.dae](https://archive.blender.org/developer/F4363113/my_test.dae) [system-info.txt](https://archive.blender.org/developer/F4362881/system-info.txt) - updated--
Author

Added subscriber: @cereszal-1

Added subscriber: @cereszal-1
Stephen Swaney changed title from Importing/exporting animation into Blender using Collada to Round trip Collada export/import mesh distorted 2018-08-24 06:20:53 +02:00
Gaia Clary was assigned by Stephen Swaney 2018-08-24 06:20:53 +02:00

Added subscriber: @StephenSwaney

Added subscriber: @StephenSwaney
  - MISSING INFO

Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc.

A guideline for making a good bug report can be found here: https://wiki.blender.org/wiki/Process/Bug_Report

Marking as "Incomplete" until the requested information/data is provided.

- MISSING INFO Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc. A guideline for making a good bug report can be found here: https://wiki.blender.org/wiki/Process/Bug_Report Marking as "Incomplete" until the requested information/data is provided.
Author

Edited and updated. Included as much documents as possible.

Edited and updated. Included as much documents as possible.
Member

About round trip with Collada:

In general this is not possible because the Collada format does not support all data that is needed by Blender. However there is one way to achieve a perfect round trip: by adding a tool specific collada profile. This would in theory allow the implementation of a perfect round trip experience.

But i wonder if such a usage scenario exists at all. A roundtrip from blender to blender certainly makes the least sense (you would better use blend files for this scenario). And a roundtrip that involves Blender plus another tool would need the other tool to fully support the blender collada profile. But that does not sound very practical.

About the reported distortions:

You may want to build the "collada" branch and check if it works for you. I updated that branch recently, so it should build out of the box. It might possibly have resolved your issues. But no promise :)

and also...

I am still reworking the collada exporter (for blender 2.8). So this report might become another test case. However, i already found that the export of rigged items is not at all simple because there are a few things to take care of like for example bone constraints and drivers.

**About round trip with Collada:** In general this is not possible because the Collada format does not support all data that is needed by Blender. However there is one way to achieve a perfect round trip: by adding a tool specific collada profile. This would in theory allow the implementation of a perfect round trip experience. But i wonder if such a usage scenario exists at all. A roundtrip from blender to blender certainly makes the least sense (you would better use blend files for this scenario). And a roundtrip that involves Blender plus another tool would need the other tool to fully support the blender collada profile. But that does not sound very practical. **About the reported distortions:** You may want to build the "collada" branch and check if it works for you. I updated that branch recently, so it should build out of the box. It might possibly have resolved your issues. But no promise :) **and also...** I am still reworking the collada exporter (for blender 2.8). So this report might become another test case. However, i already found that the export of rigged items is not at all simple because there are a few things to take care of like for example bone constraints and drivers.
Author

Thanks Gaia!
I first experienced this issue when importing .dae files from Blender into Gazebo.
https://bitbucket.org/osrf/gazebo/issues/2489/collada-loader-failing-at-loading-blender

I did the roundabout trip to check where could the issue lie. I saw a few people addressing a similar issue so I suspected that it might be a collada.
Meanwhile, I'll check out that branch and also sent a bug report to Gazebo.

Thanks Gaia! I first experienced this issue when importing .dae files from Blender into Gazebo. https://bitbucket.org/osrf/gazebo/issues/2489/collada-loader-failing-at-loading-blender I did the roundabout trip to check where could the issue lie. I saw a few people addressing a similar issue so I suspected that it might be a collada. Meanwhile, I'll check out that branch and also sent a bug report to Gazebo.

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Archiving for now, we can always reopen if needed.

Archiving for now, we can always reopen if needed.
Author

Hi, just want to update that I finally got around to building the branch.
First thing I've noticed (even building right out of master) was that there is no .dae import option.

Secondly, it didn't solve the problem.
I exported the model with better collada and imported it into my standard blender. The distortion was still there as well as in Gazebo. It looks like something to do with the binding info not stored despite I tried to adjust my export/import settings to do so.

Hi, just want to update that I finally got around to building the branch. First thing I've noticed (even building right out of master) was that there is no .dae import option. Secondly, it didn't solve the problem. I exported the model with better collada and imported it into my standard blender. The distortion was still there as well as in Gazebo. It looks like something to do with the binding info not stored despite I tried to adjust my export/import settings to do so.
Member

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Member

About the collada branch: I was able to import your dae file by using the Collada importer from the collada branch. However there is something goin very wrong with the handling of the Object scaling and the related location animation curves. I reopen this task now.

About the collada branch: I was able to import your dae file by using the Collada importer from the collada branch. However there is something goin very wrong with the handling of the Object scaling and the related location animation curves. I reopen this task now.
Author

There might be something wrong with the model as well. I'm using a rigged model from Mixamo (re-imported into Blender) downloaded in a .dae format.
I've noticed the scaling issues which wasn't successful when I tried to fix it.
I'm beginning to suspect that this is a Mixamo issue as the same distortion is reflected in Gazebo as well.
Apparently, Mixamo isn't very friendly to software out of 3dsmax and Maya.

There might be something wrong with the model as well. I'm using a rigged model from Mixamo (re-imported into Blender) downloaded in a .dae format. I've noticed the scaling issues which wasn't successful when I tried to fix it. I'm beginning to suspect that this is a Mixamo issue as the same distortion is reflected in Gazebo as well. Apparently, Mixamo isn't very friendly to software out of 3dsmax and Maya.
Member

However i want to understand where things go wrong. At best the Collada Importer should report back if there is an issue in the data. I won't be able to get to this before next week, so if you can find some additional time for this you might be able to prepare some super simple demo (to make the dae file as small as possible) :

  • A low poly model (cube or so ...)
  • a 2-3 bone armature
  • a simple animation (move 1 unit to the left, rotate by 90 degree, ... something like that )
  • make sure the simple demo exposes the same issues when imported to Blender (distortions, scaling problems, etc...)

Then i can inspect the collada file much easier.

However i want to understand where things go wrong. At best the Collada Importer should report back if there is an issue in the data. I won't be able to get to this before next week, so if you can find some additional time for this you might be able to prepare some super simple demo (to make the dae file as small as possible) : - A low poly model (cube or so ...) - a 2-3 bone armature - a simple animation (move 1 unit to the left, rotate by 90 degree, ... something like that ) - make sure the simple demo exposes the same issues when imported to Blender (distortions, scaling problems, etc...) Then i can inspect the collada file much easier.
Member

ok, i found one thing that is odd: the hip bone uses a scale of 100 in the animation, while the model and armatures are all scaled down by 0.01 in object mode. I bet there is something going wrong with how scaling of pose bones is related to object scaling.

So probably you can get this to work by taking care to use a consistent scaling so that ideally your scales can all be 1 in your model, your armature, and your animation. But anyways i still am curious to look at what goes wrong here. I believe the Blender Collada importer should be able to handle this situation correct.

ok, i found one thing that is odd: the hip bone uses a scale of 100 in the animation, while the model and armatures are all scaled down by 0.01 in object mode. I bet there is something going wrong with how scaling of pose bones is related to object scaling. So probably you can get this to work by taking care to use a consistent scaling so that ideally your scales can all be 1 in your model, your armature, and your animation. But anyways i still am curious to look at what goes wrong here. I believe the Blender Collada importer should be able to handle this situation correct.
Author

Update:
The bug is reproducible on this model using the standard collada exporter.
It's not from Mixamo, has no scaling issue, etc.
This model has no issues loading up on Gazebo.

The model used in the bug report was downloaded from Mixamo in a .dae format. When imported, there were no distortions but the scaling issue was still present.

Update: The bug is reproducible on [this model ](https://bitbucket.org/osrf/gazebo/src/default/media/models/walk.dae) using the standard collada exporter. It's not from Mixamo, has no scaling issue, etc. This model has no issues loading up on Gazebo. The model used in the bug report was downloaded from Mixamo in a .dae format. When imported, there were no distortions but the scaling issue was still present.
Author

Update:
Finally got to creating the cube model. Figured out the issue.

If the bone is not directly parented/connected to the chain of the rig but still a child (with the black dots), it will be imported differently.

On simpler models with lesser bones, it will take a min of 2 round trips to encounter the issue. Even the position of the entire model will start to change.

I've attached the simplest setup with a box where the collada export round trip was done twice. The position of the rig and the mesh had changed.
boom1.dae

I've also uploaded the original model directly exported from blender. You can see the position clearly within the mesh.
boom.dae

Update: Finally got to creating the cube model. Figured out the issue. If the bone is not directly parented/connected to the chain of the rig but still a child (with the black dots), it will be imported differently. On simpler models with lesser bones, it will take a min of 2 round trips to encounter the issue. Even the position of the entire model will start to change. I've attached the simplest setup with a box where the collada export round trip was done twice. The position of the rig and the mesh had changed. [boom1.dae](https://archive.blender.org/developer/F4674783/boom1.dae) I've also uploaded the original model directly exported from blender. You can see the position clearly within the mesh. [boom.dae](https://archive.blender.org/developer/F4674787/boom.dae)
Member

please can you add the blend file as well? And which Collada export options did you set?

please can you add the blend file as well? And which Collada export options did you set?
Author

Ok, just did another test and the issue goes beyond this.
Basically, any mesh with an armature gets exported differently.

Attached is a simple plane parented to a bone. The plane has not been moved. The bones are snapped to the corners and aligned to center, etc.
Upon the second round trip, the bone changes position. No animations were necessary.
I did this a few times and the results were the same.

Summary:

  • Exporting models with bones will result with a change in the .dae file
  • The first round of export already has the problem but doing the round trip twice will make it more obvious
  • The effect is more visible with an animation
  • Using the default collada export settings was enough to produce the distortion

rig.blend

Ok, just did another test and the issue goes beyond this. Basically, any mesh with an armature gets exported differently. Attached is a simple plane parented to a bone. The plane has not been moved. The bones are snapped to the corners and aligned to center, etc. Upon the second round trip, the bone changes position. No animations were necessary. I did this a few times and the results were the same. Summary: - Exporting models with bones will result with a change in the .dae file - The first round of export already has the problem but doing the round trip twice will make it more obvious - The effect is more visible with an animation - Using the default collada export settings was enough to produce the distortion [rig.blend](https://archive.blender.org/developer/F4684633/rig.blend)
Author

Sending you the other blend file where the rig is distorted after the second round trip.

rig1.blend

Sending you the other blend file where the rig is distorted after the second round trip. [rig1.blend](https://archive.blender.org/developer/F4693244/rig1.blend)
Author

I've created a new bug report as the latest findings might not be the same bug, or it could be the very bug that is causing the distortion ultimately.
New bug report

I've created a new bug report as the latest findings might not be the same bug, or it could be the very bug that is causing the distortion ultimately. [New bug report ](https://developer.blender.org/T56852)
Gaia Clary was unassigned by Dalai Felinto 2019-12-23 16:36:01 +01:00

Added subscriber: @GaiaClary

Added subscriber: @GaiaClary
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Aaron Carlisle self-assigned this 2020-02-12 07:04:35 +01:00
Member

I'm gonna consider this resolved see that your other report is closed also

I'm gonna consider this resolved see that your other report is closed also
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
6 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#56516
No description provided.