Page MenuHome

export .obj broke UVs
Closed, ResolvedPublic

Description

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!

Revisions and Commits

Event Timeline

Bastien Montagne (mont29) changed the task status from Unknown Status to Archived.Oct 29 2016, 9:12 AM
Bastien Montagne (mont29) claimed this task.

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.

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

Bastien Montagne (mont29) changed the task status from Archived to Unknown Status.Oct 30 2016, 8:40 AM
Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.

Changes comes from rBA887fad6a0196be (fixing T39879).

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 T39879 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 rBAc553d7c0eb002 the culprit here… Not totally sure why precision was reduced here, so will restore it back to 6 decimals for now.