Page MenuHome

Extra rotation exporting to collada
Open, Confirmed, MediumPublic

Description

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

Details

Type
Bug

Event Timeline

Hi, @Luis W. Sevilla (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:

  1. The normals become 0 along z which means the object is like a black hole (no light reflected)
  2. 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.