export .obj broke UVs #49865

Closed
opened 2016-10-28 08:49:03 +02:00 by Massimiliano Puliero · 12 comments

System Information
win7 64 k2200

Blender Version
Broken: 2.78a
Worked: 2.76

Short description of error
export OBJ corrupt a little bit the uv, no problem with FBX.

Exact steps for others to reproduce the error
open the file, export the monkey in obj format, import again in blender and compare the uvs (by merging the two objects). you can notice a slight difference.

thankyou!

UV_bug.blend

uv_bug.PNG

**System Information** win7 64 k2200 **Blender Version** Broken: 2.78a Worked: 2.76 **Short description of error** export OBJ corrupt a little bit the uv, no problem with FBX. **Exact steps for others to reproduce the error** open the file, export the monkey in obj format, import again in blender and compare the uvs (by merging the two objects). you can notice a slight difference. thankyou! [UV_bug.blend](https://archive.blender.org/developer/F387832/UV_bug.blend) ![uv_bug.PNG](https://archive.blender.org/developer/F387833/uv_bug.PNG)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @MassimilianoPuliero

Added subscriber: @MassimilianoPuliero

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2016-10-29 09:12:41 +02:00

Thanks for the report, but that’s not really a bug here, issue is, OBJ being a pure textual format, we have to round float numbers (to the forth decimal currently) to avoid generating insanely big files. This of course involves a small loss of data - that’s why binary formats (like FBX) should be used when in need of full float precision.

Thanks for the report, but that’s not really a bug here, issue is, OBJ being a pure textual format, we have to round float numbers (to the forth decimal currently) to avoid generating insanely big files. This of course involves a small loss of data - that’s why binary formats (like FBX) should be used when in need of full float precision.

Thanks for the reply,

But objects exported with Blender 2.77 or 2.76 doesn't give me the same error.
can you please take a look into it.

thanks again.

Thanks for the reply, But objects exported with Blender 2.77 or 2.76 doesn't give me the same error. can you please take a look into it. thanks again.

I copied the 'io_scene_obj' folder from 2.77 and pasted in 2,78, now Blender export the uvs correctly.

I compared the 2 codes and I see some differences on line 575 and 546

Blender 2.77
fw('vt %.6f %.6f\n' % uv[:])

Blender 2.78
fw('vt %.4f %.4f\n' % uv[:])

thankyou

I copied the 'io_scene_obj' folder from 2.77 and pasted in 2,78, now Blender export the uvs correctly. I compared the 2 codes and I see some differences on line 575 and 546 Blender 2.77 fw('vt %.6f %.6f\n' % uv[:]) Blender 2.78 fw('vt %.4f %.4f\n' % uv[:]) thankyou

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Changes comes from 887fad6a01 (fixing blender/blender#39879).

That’s the usual trade-of of float precision here actually, too much precision might make UV points actually merged look like split (due to errors introduced during float computation), too low precision will reduce exactness…

Fixing blender/blender#39879 could also be done by using a 'limited-precision comparison' instead of exact comparison, afraid it will makes things slower though… Will investigate further.

Changes comes from 887fad6a01 (fixing blender/blender#39879). That’s the usual trade-of of float precision here actually, too much precision might make UV points actually merged look like split (due to errors introduced during float computation), too low precision will reduce exactness… Fixing blender/blender#39879 could also be done by using a 'limited-precision comparison' instead of exact comparison, afraid it will makes things slower though… Will investigate further.

Uh, actually, was wrong it’s c553d7c0eb the culprit here… Not totally sure why precision was reduced here, so will restore it back to 6 decimals for now.

Uh, actually, was wrong it’s c553d7c0eb the culprit here… Not totally sure why precision was reduced here, so will restore it back to 6 decimals for now.

This issue was referenced by afde50f681

This issue was referenced by afde50f68185006e0b0d5d957b762e97cff6e61f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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-addons#49865
No description provided.