Collada export "Global Orientation" setting does not work properly for child nodes #69491

Open
opened 2019-09-04 14:44:53 +02:00 by kaalus · 10 comments

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.81

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f5449
Worked: (optional)

Short description of error
Collada export "Global Orientation" setting does not work properly for child nodes.
Global orientation transformation should only be applied to root nodes, but it is applied to child nodes as well, causing corruption of hierarchical objects.
For example assume you have a tank chassis mesh with a turret mesh attached to it. We want to export it using Global Orientation setting to re-orient the axes for a game engine. If we do so, the chassis object will be correctly re-oriented. However, also the turret object will be re-oriented by the exporter, causing the turret to be rotated relative to the chassis.
Child nodes should not be re-oriented by the "Global Orientation" setting. Only root nodes should be affected.

Exact steps for others to reproduce the error

  1. Add any two objects (cubes will do) and make one the parent of the other. Leave their transformations blank (identity) to better see the result later on.
  2. Export this simple scene as Collada format. Change "Global Orientation" from the default setting to any custom value (for example -Z forward and Y up will do).
  3. Look at the node transformations inside the exported .dae file. You will notice that both the root and the child node has been re-oriented by "Global Orientation" setting. The transformation of child object is no longer an identity matrix.
    The exported scene is now corrupt. The child object is wrongly rotated relative to the parent.
**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.81 **Blender Version** Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: `f6cb5f5449` Worked: (optional) **Short description of error** Collada export "Global Orientation" setting does not work properly for child nodes. Global orientation transformation should only be applied to root nodes, but it is applied to child nodes as well, causing corruption of hierarchical objects. For example assume you have a tank chassis mesh with a turret mesh attached to it. We want to export it using Global Orientation setting to re-orient the axes for a game engine. If we do so, the chassis object will be correctly re-oriented. However, also the turret object will be re-oriented by the exporter, causing the turret to be rotated relative to the chassis. Child nodes should not be re-oriented by the "Global Orientation" setting. Only root nodes should be affected. **Exact steps for others to reproduce the error** 1. Add any two objects (cubes will do) and make one the parent of the other. Leave their transformations blank (identity) to better see the result later on. 2. Export this simple scene as Collada format. Change "Global Orientation" from the default setting to any custom value (for example -Z forward and Y up will do). 3. Look at the node transformations inside the exported .dae file. You will notice that both the root and the child node has been re-oriented by "Global Orientation" setting. The transformation of child object is no longer an identity matrix. The exported scene is now corrupt. The child object is wrongly rotated relative to the parent.
Author

Added subscriber: @kaalus

Added subscriber: @kaalus
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thanks for the report.

Please prepare a simple .blend file that allows us to reproduce this issue more easily. This way everyone is on the same page about what the issue is.

It would also help if you could describe more exactly what you see in the file and what you would expect (for those who don't really know the Collada format).

Thanks for the report. Please prepare a simple .blend file that allows us to reproduce this issue more easily. This way everyone is on the same page about what the issue is. It would also help if you could describe more exactly what you see in the file and what you would expect (for those who don't really know the Collada format).

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Keeping this open for another week since we took so long to start triaging it. But anyone feels free to close it in case of no reply if another week goes by.

Keeping this open for another week since we took so long to start triaging it. But anyone feels free to close it in case of no reply if another week goes by.
Author

Attaching .blend file demonstrating the issue:

ExportOrientationTestCase.blend

The blend file contains two cones side by side, one a parent of the other:

image.png

To demonstrate the problem, export the scene to collada format. In the export settings, change Global Orientation setting to "Z Forward" and "Y Up".
The exporter will produce a .dae file. Now start from a blank scene and import the .dae file. This is the result:

image.png

You will notice that the relative orientation of the cones has changed. The child cone is no longer pointing in the same direction as the parent cone. If this was a complex model with many parts, it would now be completely mangled.

What is the expected outcome: the cones stay in the same relative orientation.

What causes the problem: The "Global Orientation" setting of the exporter should only be changing orientation of root objects. Child objects should be left unchanged. They are already affected by their parents' orientation. As it stands, they are transformed twice: first by the "global orientation" setting on export, second by their parent orientation, which was also transformed by the same "global orientation" setting.

Attaching .blend file demonstrating the issue: [ExportOrientationTestCase.blend](https://archive.blender.org/developer/F8327572/ExportOrientationTestCase.blend) The blend file contains two cones side by side, one a parent of the other: ![image.png](https://archive.blender.org/developer/F8327580/image.png) To demonstrate the problem, export the scene to collada format. In the export settings, change Global Orientation setting to "Z Forward" and "Y Up". The exporter will produce a .dae file. Now start from a blank scene and import the .dae file. This is the result: ![image.png](https://archive.blender.org/developer/F8327578/image.png) You will notice that the relative orientation of the cones has changed. The child cone is no longer pointing in the same direction as the parent cone. If this was a complex model with many parts, it would now be completely mangled. **What is the expected outcome**: the cones stay in the same relative orientation. **What causes the problem**: The "Global Orientation" setting of the exporter should only be changing orientation of root objects. Child objects should be left unchanged. They are already affected by their parents' orientation. As it stands, they are transformed twice: first by the "global orientation" setting on export, second by their parent orientation, which was also transformed by the same "global orientation" setting.
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

I can reproduce the behavior in you screenshots. It is unexpected indeed.

I can reproduce the behavior in you screenshots. It is unexpected indeed.

Added subscriber: @Bloop

Added subscriber: @Bloop
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:54:20 +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#69491
No description provided.