Round trip Collada export/import mesh distorted #56516

Closed
opened 5 years ago by cereszal-1 · 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--
Poster

Added subscriber: @cereszal-1

Added subscriber: @cereszal-1
StephenSwaney changed title from Importing/exporting animation into Blender using Collada to Round trip Collada export/import mesh distorted 5 years ago
GaiaClary was assigned by StephenSwaney 5 years ago

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.
Poster

Edited and updated. Included as much documents as possible.

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

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.
Poster

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.
mont29 commented 5 years ago
Owner

Added subscriber: @mont29

Added subscriber: @mont29
mont29 commented 5 years ago
Owner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
mont29 closed this issue 5 years ago
mont29 commented 5 years ago
Owner

Archiving for now, we can always reopen if needed.

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

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.
Collaborator

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
GaiaClary reopened this issue 4 years ago
Collaborator

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.
Poster

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.
Collaborator

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.
Collaborator

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.
Poster

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.
Poster

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)
Collaborator

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?
Poster

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)
Poster

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)
Poster

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)
GaiaClary was unassigned by dfelinto 3 years ago
Owner

Added subscriber: @GaiaClary

Added subscriber: @GaiaClary
Collaborator

Added subscriber: @Blendify

Added subscriber: @Blendify
Collaborator

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Blendify closed this issue 3 years ago
Blendify self-assigned this 3 years ago
Collaborator

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#56516
Loading…
There is no content yet.