Collada export exporting -tive z scale as wrong x rotation #20634

Closed
opened 2010-01-11 01:45:09 +01:00 by Stuart W · 14 comments

%%%Using build 25804..

In the attached .blend file is a cube modified to be assymetric, and the scaled -1 in Z at the model (not mesh) level.

When this is exported it exports the scale incorrectly (as a 3.1415 X rotation), and on collada re-import (or use in another tool) it is incorrect. If you look at the top view you will see the change between the blend file and the re-imported collada, we have verified by hand-checking the collada.

This created quite an issue as it breaks uv mapping assumptions for us, and was not like this in the previous python exporters.

We are using these exports in OSG, and the new collada exporter is a great improvement, keep up the great work.
%%%

%%%Using build 25804.. In the attached .blend file is a cube modified to be assymetric, and the scaled -1 in Z at the model (not mesh) level. When this is exported it exports the scale incorrectly (as a 3.1415 X rotation), and on collada re-import (or use in another tool) it is incorrect. If you look at the top view you will see the change between the blend file and the re-imported collada, we have verified by hand-checking the collada. This created quite an issue as it breaks uv mapping assumptions for us, and was not like this in the previous python exporters. We are using these exports in OSG, and the new collada exporter is a great improvement, keep up the great work. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Just digging a little deeper, it appears that mat4_to_size oversimplifies the matrix decomposition, therefore assuming orthonormal matricies, ie: rot, trans, +tive scale.
At a minimum a residual matrix needs to be calculated and allowed for.
%%%

%%%Just digging a little deeper, it appears that mat4_to_size oversimplifies the matrix decomposition, therefore assuming orthonormal matricies, ie: rot, trans, +tive scale. At a minimum a residual matrix needs to be calculated and allowed for. %%%
Author

%%%
Is anyone going to look at this? this is quite a major bug in collada exports, without which a large number of belnder models are simply broken, and cannot be post-repaired.

%%%

%%% Is anyone going to look at this? this is quite a major bug in collada exports, without which a large number of belnder models are simply broken, and cannot be post-repaired. %%%

%%%Hi Stuart,

I'm studying this problem now. Will try to fix today or tomorrow.

Thanks%%%

%%%Hi Stuart, I'm studying this problem now. Will try to fix today or tomorrow. Thanks%%%

%%%Fixed in svn branch: https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-chingachgook

Please check. I've detected a few other bugs that I want to fix before merging into trunk:

  • importer suffers from negative scale problem too
  • bones with negative scale are exported incorrectly too
  • object animation values are copied from FCurves which is not ok for child objects where values should be in parent-space

Thanks%%%

%%%Fixed in svn branch: https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-chingachgook Please check. I've detected a few other bugs that I want to fix before merging into trunk: * importer suffers from negative scale problem too * bones with negative scale are exported incorrectly too * object animation values are copied from FCurves which is not ok for child objects where values should be in parent-space Thanks%%%
Author

%%%
This is fantastic news Arystanbek, and much appreciated.

Unfortunately I wont be near a build environment for a couple of days but look forward to trying out these fixes.

Collada import/export is rapidly becoming essential for a lot of work so we are very happy to see these improvements.
%%%

%%% This is fantastic news Arystanbek, and much appreciated. Unfortunately I wont be near a build environment for a couple of days but look forward to trying out these fixes. Collada import/export is rapidly becoming essential for a lot of work so we are very happy to see these improvements. %%%
Author

%%%So far looks good to me, do we need other testing before it gets integrated to main? we would love to see this mainlines ASAP.

Regards,
Stuart.%%%

%%%So far looks good to me, do we need other testing before it gets integrated to main? we would love to see this mainlines ASAP. Regards, Stuart.%%%

%%%The exporter fix is already merged into trunk (revision 26444).

Still got to work on the related bugs I mentioned above. So please don't close this report.%%%

%%%The exporter fix is already merged into trunk (revision 26444). Still got to work on the related bugs I mentioned above. So please don't close this report.%%%
Member

%%%Arystan, any progress on these bugs?%%%

%%%Arystan, any progress on these bugs?%%%
Member

%%%Currently not too much time to work on this, so I'm moving this to our todo list on the wiki: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Simple_Todos#COLLADA

Anyone who wants to help out still can provide patches!

Thanks for reporting.%%%

%%%Currently not too much time to work on this, so I'm moving this to our todo list on the wiki: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Simple_Todos#COLLADA Anyone who wants to help out still can provide patches! Thanks for reporting.%%%
Member

%%%this report appears like it has been partially solved. Maybe it makes sense to create a new report for the remaining issues ? as from the log it is not precsisely clear (to me) what parts of the report are still broken.%%%

%%%this report appears like it has been partially solved. Maybe it makes sense to create a new report for the remaining issues ? as from the log it is not precsisely clear (to me) what parts of the report are still broken.%%%

%%%Hi,

This issue was most likely fixed with r43915 which changed export to use parentinv-matrix + loc/rot/scale instead of reinterpreting a matrix as loc/rot/scale. There are multiple "correct" ways to decomposite a matrix, but in this case if it's negative scale on single axis a rotation isn't sufficient to represent it so maybe a bug in decomposition. In any case, negative scales will remain problematic when decompositing is required in the importer.

%%%

%%%Hi, This issue was most likely fixed with r43915 which changed export to use parentinv-matrix + loc/rot/scale instead of reinterpreting a matrix as loc/rot/scale. There are multiple "correct" ways to decomposite a matrix, but in this case if it's negative scale on single axis a rotation isn't sufficient to represent it so maybe a bug in decomposition. In any case, negative scales will remain problematic when decompositing is required in the importer. %%%
Member

%%%This issue seems to be fixed. Please ask for reopening if this is not true.%%%

%%%This issue seems to be fixed. Please ask for reopening if this is not true.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
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
5 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#20634
No description provided.