UV Precision Bug When Importing OBJ Models

When I import OBJ files, UV’s are getting corrupted. If I enable ‘Use Full Precision UV’ from Static Mesh Editor, it works fine. However, there are only one decimal values in every texture coordinates, like:

vt 1649.9 1.0

vt 1649.9 0.7

vt 1651.3 1.0

You can test it with this obj file:

Same obj file in pastebin:

85070-untitled.jpg

-edit-: Using 4 bits precisions didn’t fix the problem:

vt 4246.25 0.0

vt 4258.1875 1.0

You can download or view the same object which is exported using 4 bits precision texture coordinates, from here:

https://www.dropbox.com/s/a4e73h4w6i8axfl/TrackGenerator20obj4bitPrecision.obj?dl=0

Hi ,

This is expected since by default static meshes will use 16bit for standard UVs to save memory. Using full precision UVs will use 32bit for more accuracy.

This will happen with FBXs as well as OBJ files. The further a UV island is from the 0,1 space the more it can have issues when not using full precision UVs enabled.

Looking at your test asset this is clearly visible when looking at the distance the UVs of the pieces in question are from the 0,1 space.

Here is an example:

  1. UV spaced far from 0,1 at ~distance of troublesome parts in your mesh
  2. UV spaced half the distance between 0,1 and the one above. You’ll notice that the UV starts to stretch in some areas and squish the original UV in other spaces.
  3. UV starts at the 0,1 space

[Test Asset if needed.][2]

I hope this helps explain some of the differences you’re seeing with your UVs and the asset you have.

-Tim