Extra rotation exporting to collada #65712

Open
opened 2019-06-11 11:51:25 +02:00 by Luis W. Sevilla · 6 comments

System Information
Operating system: Ubuntu 18.04
Graphics card: Intel, Nvidia

Blender Version
Broken: 2.79b

Short description of error
When exporting to collada format it seems to add extra rotation to objects.

Exact steps for others to reproduce the error
I've created a single plane (file planos.bend) and exported it to file planos2.dae. Then imported and exported it 2 more times (attached results). End situation is added as planos_bug.blend.
I'm unable to export and object in the same position I have it on blender.
My target is google earth and it seems imports of .dae behave identically both in GE and in Blender

Based on the default startup or an attached .blend file (as simple as possible).

planos.blend

planos_bug.blend

planos2.dae

planos2-1.dae

planos2-2.dae

**System Information** Operating system: Ubuntu 18.04 Graphics card: Intel, Nvidia **Blender Version** Broken: 2.79b **Short description of error** When exporting to collada format it seems to add extra rotation to objects. **Exact steps for others to reproduce the error** I've created a single plane (file planos.bend) and exported it to file planos2.dae. Then imported and exported it 2 more times (attached results). End situation is added as planos_bug.blend. I'm unable to export and object in the same position I have it on blender. My target is google earth and it seems imports of .dae behave identically both in GE and in Blender Based on the default startup or an attached .blend file (as simple as possible). [planos.blend](https://archive.blender.org/developer/F7098411/planos.blend) [planos_bug.blend](https://archive.blender.org/developer/F7098412/planos_bug.blend) [planos2.dae](https://archive.blender.org/developer/F7098413/planos2.dae) [planos2-1.dae](https://archive.blender.org/developer/F7098414/planos2-1.dae) [planos2-2.dae](https://archive.blender.org/developer/F7098415/planos2-2.dae)

Added subscriber: @LuisW

Added subscriber: @LuisW
Member

Added subscribers: @GaiaClary, @lichtwerk

Added subscribers: @GaiaClary, @lichtwerk
Gaia Clary was assigned by Philipp Oeser 2019-06-11 15:06:35 +02:00
Member

Can confirm.

@GaiaClary : mind checking?

Can confirm. @GaiaClary : mind checking?
Member

Hi, @LuisW

Thanks for reporting this. This is an issue in the importer. However we can not fix this right now. But you can fix the data instead. here is the reasoning:

The problem is that the Object transform matrix contains a scale of 0 along Z. This causes 2 issues:

  • The normals become 0 along z which means the object is like a black hole (no light reflected)
  • The object transformation matrix is:
    Matrix(
        (  0.0, 0.0, 0.0, 0.0),
        (  0.0, 5.0, 0.0,  0.0),
        (-20.0, 0.0, 0.0, 20.0),
        (  0.0, 0.0, 0.0,  1.0)
    )

When decomposing this matrix back into scale, location and rotation, then Blender gets the rotation part wrong. I am not entirely sure why that happens, probably because the math gets odd when the scale in one dimension is 0 (note that scale and dimension are two different things here!)

After some internal discussion i am tempted to reject this as "won't be handled by the importer". As indicated above you can handle this in a much better and more clean way by keeping reasonable scales on your object, for example: scale = (20, 5, 1) would be a perfect fix for your particular case. It would even avoid the total black surface.

Although you most probably want to fix the data anyways, I am still trying to figure out if we can possibly handle this in the importer (i tested that other tools actually can read the colladafile correctly). So i keep this report open for now.

Hi, @LuisW Thanks for reporting this. This is an issue in the importer. However we can not fix this right now. But you can fix the data instead. here is the reasoning: The problem is that the Object transform matrix contains a scale of 0 along Z. This causes 2 issues: - The normals become 0 along z which means the object is like a black hole (no light reflected) - The object transformation matrix is: ``` Matrix( ( 0.0, 0.0, 0.0, 0.0), ( 0.0, 5.0, 0.0, 0.0), (-20.0, 0.0, 0.0, 20.0), ( 0.0, 0.0, 0.0, 1.0) ) ``` When decomposing this matrix back into scale, location and rotation, then Blender gets the rotation part wrong. I am not entirely sure why that happens, probably because the math gets odd when the scale in one dimension is 0 (note that scale and dimension are two different things here!) After some internal discussion i am tempted to reject this as "won't be handled by the importer". As indicated above you can handle this in a much better and more clean way by keeping reasonable scales on your object, for example: scale = (20, 5, 1) would be a perfect fix for your particular case. It would even avoid the total black surface. Although you most probably want to fix the data anyways, I am still trying to figure out if we can possibly handle this in the importer (i tested that other tools actually can read the colladafile correctly). So i keep this report open for now.
Gaia Clary was unassigned by Dalai Felinto 2019-12-23 16:34:06 +01:00

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I can still reproduce the problem in blender 2.82
Given the time this report is open and the comment, I will mark it as a Known Issue.

I can still reproduce the problem in blender 2.82 Given the time this report is open and the comment, I will mark it as a `Known Issue`.
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:54:22 +01:00
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
4 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#65712
No description provided.