POV-Ray : Newsgroups : povray.advanced-users : tracing performance for meshes Server Time
23 Dec 2024 07:01:19 EST (-0500)
  tracing performance for meshes (Message 1 to 3 of 3)  
From: ghostch
Subject: tracing performance for meshes
Date: 18 Aug 2010 07:10:01
Message: <web.4c6bbf1e1a5bf55e8a4c179b0@news.povray.org>
Hello everyone!
My question regards the rendering speed of smooth triangle meshes. What I have
tried is to reduce the number of triangles of my meshes using VTK's decimator
routine: Since the meshes originally come from a marching cubes triangulation,
they consist of a large number of relatively small triangles - many of them
coplanar. So the decimator eliminates up to 90% of the triangles without visible
loss of detail.
However, for povray it takes double or triple the time to render the reduced
meshes. Why is that? Could it be that the different sizes of triangles in the
reduced mesh (the decimator tends to produce very "long" triangles with sharp
angles sometimes)?


Post a reply to this message

From: Warp
Subject: Re: tracing performance for meshes
Date: 18 Aug 2010 08:12:24
Message: <4c6bce28@news.povray.org>
ghostch <nomail@nomail> wrote:
> Hello everyone!
> My question regards the rendering speed of smooth triangle meshes. What I have
> tried is to reduce the number of triangles of my meshes using VTK's decimator
> routine: Since the meshes originally come from a marching cubes triangulation,
> they consist of a large number of relatively small triangles - many of them
> coplanar. So the decimator eliminates up to 90% of the triangles without visible
> loss of detail.
> However, for povray it takes double or triple the time to render the reduced
> meshes. Why is that? Could it be that the different sizes of triangles in the
> reduced mesh (the decimator tends to produce very "long" triangles with sharp
> angles sometimes)?

  POV-Ray uses a tree data structure for the triangles in a mesh, which
means that the total amount of triangles in the mesh has no big impact
in rendering speed (increasing the amount of triangles increases ray
intersection tests logarithmically, which is almost negligible). Perhaps
the only thing which might become an issue with larger triangle amounts
is memory usage (in other words, if you run out of free RAM with your
mesh, it's going to render quite slowly, but naturally this is an issue
only in that case).

  From a rendering point of view the shape, size and texturing options of
the mesh will have a much larger effect on rendering speed than the amount
of triangles.

  As for the shape of the triangles themselves, it might actually be a
factor. I don't remember now exactly how triangles are placed in the
tree data structure, but it might well be that very long and thin triangles
may cause efficiency problems in some cases because they cause the need to
traverse more tree nodes than a larger number of small triangles would.
The optimal case for this tree structure is probably if the majority of
triangles are as equilateral as possible.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: tracing performance for meshes
Date: 20 Aug 2010 17:51:27
Message: <4c6ef8df$1@news.povray.org>
Am 18.08.2010 13:08, schrieb ghostch:
> Hello everyone!
> My question regards the rendering speed of smooth triangle meshes. What I have
> tried is to reduce the number of triangles of my meshes using VTK's decimator
> routine: Since the meshes originally come from a marching cubes triangulation,
> they consist of a large number of relatively small triangles - many of them
> coplanar. So the decimator eliminates up to 90% of the triangles without visible
> loss of detail.
> However, for povray it takes double or triple the time to render the reduced
> meshes. Why is that? Could it be that the different sizes of triangles in the
> reduced mesh (the decimator tends to produce very "long" triangles with sharp
> angles sometimes)?

I guess it has something to do with POV-Ray's internal bounding for 
meshes. For the sake of bounding, equilateral triangles are the optimum, 
as they will tend to have the smallest bounding boxes for any given 
triangle surface size.


Post a reply to this message

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