archilogic-com / data3d-blender-io

Blender exporter for data3d - a binary format optimized for webGL.
http://3d.io
16 stars 4 forks source link

import into blender breaks some lightmap UV coordinates (barcode) #7

Open ghost opened 7 years ago

ghost commented 7 years ago

2017-08-16 01_11_28-blender_ c__users_vagrant_desktop_testscene blend
the UV faces on the left are wrong, they are dragged across the whole texture

import_uvs_bug

imported data3d file, blender scene with result

by process of elimination we assume the problem happens in the importer

Note: This problem occurs when downloading baked archilogic scenes and importing them with the addon. We did not see the problem not happen with the first UV channel, only with the second channel (lightmapUvs) A lead to find the source of this is to determine what is the difference between these two channels.

Aadjou commented 7 years ago

we're experiencing this also with files that only have 1 uv channel

archilogic_2017-09-13_15-41-54_6v4zKS.zip

Aadjou commented 7 years ago

The problem only exists, if "tris_to_quads" is enabled. The clue for this was a careful look at the uv's and that some quads that showed the problem shoud be fitting a triangle on the uv, when they are quads. probably tris to quads does not set compare_uvs to true which it should. This explains why we don't have this problem after baking, since for baking, triangles are used. I can't look into it right now, but this is my braindump for later For now, I am setting the flag to false for all importers in production

ghost commented 6 years ago

https://github.com/archilogic-com/data3d-blender-io/issues/17