POV-Ray : Newsgroups : povray.advanced-users : Triangles faster than objects : Re: Triangles faster than objects Server Time
6 Oct 2024 13:47:28 EDT (-0400)
  Re: Triangles faster than objects  
From: Tim Attwood
Date: 22 May 2007 00:44:34
Message: <46527532$1@news.povray.org>
> Before of making any change in my sourcecode, it would be useful if 
> someone
> knew the answer to the first question: Why TRIANGLES version is faster 
> than
> OBJECTS version? It should be something related to the povray internal
> parser.

Basically, triangles can be faster, because they can be put into
one mesh object.

Many objects usually end up slower, because then there needs to
be intersection tests against a large number of bounding boxes.

For comparison, I have a simple scene with two mesh objects
having about 10,000 triangles each (20k total) that renders
in 3 seconds on my 1.9G Athlon

--- include file ---
#declare Thing1 = mesh {
   triangle {...}
   triangle {...}
   ... etc
};
#declare Thing2 = mesh {
   triangle {...}
   triangle {...}
   ... etc
};
--- scene file ---
#include "somefile"
object{Thing1}
object{Thing2}
... and other stuff


Post a reply to this message

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