Floating point precision errors

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Sun Jan 06, 2013 4:19 pm

Floating point precision errors

Post by FakeTruth » Sun Jan 06, 2013 4:36 pm

Hi all,

I am experiencing some troubles with the precision of vertex positions. I need to set vertex positions to specific coordinates (such as [0, 0, 0]) and this seems to be an impossible task in Blender.

For example, I have an object and have set its origin at [0, 0, 0]

Now this object has some vertices which I need to precisely place somewhere. All seems well in local and global space.

After rotating the object bij 90 degrees the global positions have already lost some precision.

Now, even without rotating, when I export the object (with all coordinates like I want them according to Blender) to .obj, the coordinates still lack precision.

Code: Select all

v 7.500000 -0.000000 19.500000
v 7.500000 0.000000 -3.000000
v 7.500001 80.000000 19.500002
v 7.500000 80.000000 -3.000000
v -7.500000 0.000000 -3.000000
v -7.499999 0.000000 19.500002
v -7.500000 80.000000 -3.000000
v -7.499999 80.000000 19.500002
I have Blender 2.65 64-bit, is there any way to increase the floating point precision? I come from Maya and Maya does not seem to have this problem. The precision in Maya might be much bigger than 6 decimals.

Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Sun Jan 06, 2013 5:29 pm

Internally, Blender uses IEEE single precision floats for data. This gives a precision of about 7 decimal digits.

Display values usually get rounded down to fewer digits which can be misleading, but internally the precision is still there.

Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX » Mon Jan 07, 2013 1:20 am

maybe scale up your model by factor 100 and export with scale 0.01? Haven't looked at the OBJ exporter, but it might work (depends on the order of scaling and rounding)

if you need to model with really high precision, blender is not a good choice. Better use a CAD application.
I'm sitting, waiting, wishing, building Blender in superstition...

Post Reply