POV-Ray : Newsgroups : povray.binaries.utilities : Online files converter : Re: Online files converter Server Time
10 Oct 2025 20:41:44 EDT (-0400)
  Re: Online files converter  
From: Kenneth
Date: 8 Oct 2025 20:25:00
Message: <web.68e7000bc9089336e83955656e066e29@news.povray.org>
kurtz le pirate <kur### [at] freefr> wrote:

>
> I think that for very large meshes, the size of the converted file with
> 18 digits increases enormously without providing any additional precision.
>
> 4 or 6 digits should suffice and would reduce the size by more than four
> times (18/4=4.5).
>

In my own POV-ray-only stl-to-mesh converter-- not yet posted ;-) -- I came to
the same conclusion: that 4 or 5 digits were enough, and that more were simply
overkill. In my experience, some models' float values are written with much more
precision than is necessary.

HOWEVER, I am now thinking that it needs to be a 'dynamic' value-- based on the
number of triangles (or vertices) in the original file (whether .stl or .obj or
whatever type.)

Some files have a low-triangle count, others very high. As the number of
triangles increases, it usually means that they are smaller (for a given-size
object), to produce finer detail-- and thus require more precision in their
values. Otherwise, a 4-to-6 significant digit conversion process might create
unwanted duplicate values by truncating or rounding important digits. Here's an
example of my thinking:

an original float value in a LOW-triangle-count model:
69.5746344739 // probably overkill, since the triangles themselves are larger in
relation to the overall object. This could be reduced/rounded to 4 or 5 digits,
IMO, and still produce a perfectly adequate final model.

an original float value in a HIGH-triangle-count model:
69.5746344739 // all of those digits would probably be necessary, to prevent
duplicates due to rounding.

Then there are the middle cases between 'low' and 'high', of course.

I don't have a formula for creating such a dynamically-changing number of
significant digits-- because it is not yet clear as to what constitutes a low
triangle-count vs a higher one!-- but the idea might be worth pursuing.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.