Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.81
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
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
- 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.
- 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).
- 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.