4
$\begingroup$

How can I round the position of all vertices in a mesh to a certain decimal accuracy, to e.g. reduce file size. 32 bit precision is not always necessary. Is there a function built in to do this?

VERTEX 0 -0.36867856979370117

to -0.3687

or even better -0.37

$\endgroup$
2
$\begingroup$

This is quite easy to achieve but it won't affect Blend filesize - vertex coordinates are held as 32-bit float values. Rounding to a limited number of decimal places will not affect the number of bytes needed for each vertex. However, if you were to export the mesh to another format (eg, XML, CSV, or other human-readable format) then it could potentially reduce the size of the file considerably as you suggest.

To achieve this, open the 3D-View properties panel (N) and set the Display grid Scale to the desired precision - ie, if you wanted to round to 2 decimal places (eg, 1.23) then set it to 0.01.

Display properties for grid

Then, in Edit mode, select vertices you want to change (or all with A) press Space and type Snap Selection to Grid. This will snap the selected vertices to the grid specified in the Scale property.

snap to selection

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.