Subtle part rotation after import.
dtriangle a commencé cette discussion dans Model Export and Render

Strange little translation problem occurring after importing a .dae into Blender. Only happens to some parts. It happens on template 1.05 and the current beta. Anyone else encountered this?

http://c2.staticflickr.com/2/1464/24927666343_dd846b5d10_b.jpg

12 réponses · Page 1 sur 1
Avatar de Scrubs
Administrateur

Hello, yep from my point of view there is a bug in the blender collada importer. I cannot explain it otherwise. Check the first post of the Blender template thread. Open the .dae file in a text editor and replace Y_axis up by Z_axis. You will have to manually rotate the model once imported but I noticed that those inaccuracies are gone.

I had this same problem only once! 😛

Ah okay cool, thanks Scrubs – that did the trick. It has happened on a few models for me lately.. I've just been manually changing them one by one : P

Avatar de Scrubs
Administrateur

It happened to me again yesterday... Same models in other software are imported properly. It looks like the Blender collada importer has issues with decimals when computing the converted transformations. Setting the up axis to z allows to bypass this part of the code. Maybe I shall report it.

Avatar de Scrubs
Administrateur

This issue with Blender starts to annoy me seriously. I did some more tests and every time when I was looking closely I managed to find a few parts which are not rotated perfectly. Hopefully, import with the Z-axis up is working correctly so what I will try to do is to do the conversion in the mecabricks importer to keep the model in a correct orientation and use Z-axis up. I hope that it won't add too much time in computation for big models and that it is not going to break it for software other than Blender.

Avatar de Scrubs
Administrateur

Hello, I implemented the fix for this Blender issue. It shall not happen anymore. Hopefully other software will be happy with it too!

Edit: It is not perfect as I still managed to find a few issues, but way less than before. I don't know what Blender is doing internally for Collada import but it is buggy...

Avatar de Scrubs
Administrateur

Really I don't know. There is generally almost 1° difference when there is an issue. e.g. 89.091° instead of 90° and the value doesn't seem to change...
I loaded the test collada files in other software and no problem at all.

Avatar de Scrubs
Administrateur

I found the C++ code for the importer. I'll do some experiment later to see if I can find a real fix.

Avatar de Scrubs
Administrateur

Yeah, I managed to properly solve this issue! Blender wasn't too happy about the precision of the float for the transform matrix. We are back to Y-axis up which means less calculations. I also took this opportunity to optimize the code. It shall use less memory for big models.

Incredible!

Nice work scrubs! You should submit the edited code to blender.

Great work, just tried it and all is well on my end !
I know it goes without saying, but anyway – Scrubs, you da man : )

Publicité
4 participants
Avatar de dtriangle
Avatar de Scrubs
Avatar de zanna
Avatar de UmbraManis

LEGO, le logo LEGO, la minifigurine et les configurations des briques et tenons sont des marques déposées de LEGO Group of Companies. ©2024 The LEGO Group.

Mecabricks, le logo Mecabricks et tout le contenu non couvert par les droits d'auteur du groupe LEGO sont, sauf indication contraire, ©2011-2024 Mecabricks.