POV-Ray : Newsgroups : povray.binaries.images : Le Forgeron: experiments : Re: Le Forgeron: experiments Server Time
6 Oct 2024 07:18:14 EDT (-0400)
  Re: Le Forgeron: experiments  
From: Le Forgeron
Date: 9 Mar 2017 11:52:29
Message: <58c1884d$1@news.povray.org>
Le 09/03/2017 à 16:50, LanuHum a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
>>
>> If only povray can read your file, what about using the normal scene
>> language of mesh or mesh2 ?
>>
> 
> If I have time to model and animate, then I will use hg-povray.
> I'm interested in experiments with tessellation. :)
> But... using the normal scene language of mesh or mesh2... This is the fastest
> way to load an object into a scene? Is there a way to speed it up? :)
> 
> 
The fastest is mesh2, because it is as near as the internal data as
possible.

Everything else need to search each new item in the already loaded part,
which mean the loading process is something O(n²) or at least
O(n.log(n)) when mesh2 is O(n).

So, the less triangles, the better.

GTS & STL have the advantage of avoiding text parsing, for the binary
format, yet the transformation into internal data need to perform search
on unsorted data so they get O(n²) performance as the number of
triangles increases it starts to suck (or slowdown enough to be noticed).

mesh syntax cumulate the drawbacks: text parsing and repeated search.

The real fast would be a binary serialization of the internal data, but
that is not available (yet ? do not hold your breath for it); and no
actual editor would be able to handle it (and it would be yet another
file format)

My rule of thumb:
* small mesh, you can use gts or stl.
* really huge number of triangles, you better load via mesh2 syntax

The power of your I/O, CPU, memory and your patience draw the line
between small and huge.


Post a reply to this message

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