POV-Ray : Newsgroups : povray.advanced-users : Triangles faster than objects Server Time
6 Oct 2024 14:40:53 EDT (-0400)
  Triangles faster than objects (Message 3 to 12 of 22)  
<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Le Forgeron
Subject: Re: Triangles faster than objects
Date: 17 May 2007 13:22:13
Message: <464c8f45$1@news.povray.org>
Le 17.05.2007 17:40, JSR nous fit lire :

> The TRIANGLES version has took 6 minutes to finish the render, while the
> OBJECTS version has took 8 minutes.
> 
> Any comments?

Yes... precision of triangles is limited, precision of objects is
infinite.
End of debat!

-- 
The superior man understands what is right;
the inferior man understands what will sell.
-- Confucius


Post a reply to this message

From: Warp
Subject: Re: Triangles faster than objects
Date: 17 May 2007 19:53:56
Message: <464ceb13@news.povray.org>
Le Forgeron <jgr### [at] freefr> wrote:
> precision of objects is infinite.

  Exactly what do you base this claim on?

-- 
                                                          - Warp


Post a reply to this message

From: Mike Williams
Subject: Re: Triangles faster than objects
Date: 18 May 2007 00:27:46
Message: <iFd7OKAFhSTGFw+b@econym.demon.co.uk>
I don't recognise that version of PovRay. Is it possible that you're
using something like MegaPov? That might be significant.

It's also possible that the way you've clumped the triangles into
objects happens to interfere with the automatic bounding process, and
leads to less efficient bounding. E.g. if your "objects" were generated
by choosing 100 random triangles from the set of 5000, then each object
would have its own bounding octree that spanned the whole scene.

The stats suggest that the two renders are not exactly equivalent. One
of them has a few rays that get totally internally reflected, and the
other one doesn't. That might be because your objects have a different
"inside" than the individual triangles that compose them. Or it might be
because there's something else slightly different in your scenes that
you're not telling us about.
-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: JSR
Subject: Re: Triangles faster than objects
Date: 18 May 2007 03:20:03
Message: <web.464d531110a189edd8ef73430@news.povray.org>
> I don't recognise that version of PovRay. Is it possible that you're
> using something like MegaPov? That might be significant.

Yes, sorry, I use MegaPov 1.2.1

> It's also possible that the way you've clumped the triangles into
> objects happens to interfere with the automatic bounding process, and
> leads to less efficient bounding. E.g. if your "objects" were generated
> by choosing 100 random triangles from the set of 5000, then each object
> would have its own bounding octree that spanned the whole scene.

The scene contains several .DXF objects transformed to mesh2. Every object
is a mesh2 structure, with different number of triangles each one.

> The stats suggest that the two renders are not exactly equivalent. One
> of them has a few rays that get totally internally reflected, and the
> other one doesn't. That might be because your objects have a different
> "inside" than the individual triangles that compose them. Or it might be
> because there's something else slightly different in your scenes that
> you're not telling us about.

The two scenes should be identical, changing only the way the geometry is
constructed, in one way with objects and the other with triangles.


Post a reply to this message

From: Chambers
Subject: Re: Triangles faster than objects
Date: 18 May 2007 09:26:21
Message: <464da97d$1@news.povray.org>
So you're saying that you get better results by listing each triangle 
individually, rather than grouping them into meshes?

That would imply that POV-Ray is doing some very efficient bounding on 
your triangles.  Which would also imply that your meshes aren't composed 
very well, either.

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: JSR
Subject: Re: Triangles faster than objects
Date: 18 May 2007 10:50:01
Message: <web.464dbcf010a189edd8ef73430@news.povray.org>
> So you're saying that you get better results by listing each triangle
> individually, rather than grouping them into meshes?

Yes.

> That would imply that POV-Ray is doing some very efficient bounding on
> your triangles.  Which would also imply that your meshes aren't composed
> very well, either.

Every mesh2 represents an object. For example, a table with 4 legs and 1
board would be represented with a total of 5 objects (5 mesh2). Each object
with their vertexs and faces.

//----------------------------------------------------------------------

My aim is to reduce the parse time because when I use the TRIANGLES version
the parse time is very long (1 min) because of the number of mesh2. With
OBJECTS version the parse time is very good (8 seg), but render time is
worse.

Joel.


Post a reply to this message

From: Ferro
Subject: Re: Triangles faster than objects
Date: 18 May 2007 19:05:01
Message: <web.464e302410a189edb19873360@news.povray.org>
> My aim is to reduce the parse time because when I use the TRIANGLES version
> the parse time is very long (1 min) because of the number of mesh2. With
> OBJECTS version the parse time is very good (8 seg), but render time is
> worse.
>
> Joel.

First of all... your "triangles" version is actually 5000 mesh2 objects that
consist of one triangle each. And your "objects" version it's just 50 mesh2
objects with more triangles each. Your "triangles" version SEEMS
innefficient... yet total render time is faster than the "objects" version.

Have you tried having everything in just ONE mesh2? From the sound of it,
parse time might be less with a longer render time... just something to
try, I guess. I would suggest that you just stick to the one with the
shortest total
render time... which as of now looks like the "triangles" version. I
realize this is not too helpful, but I can't think of anything better as of
now.

Oh, by the way... how are you changing your models to mesh2, what kind of
software? That might have something to do with it... maybe... ?


Post a reply to this message

From: JSR
Subject: Re: Triangles faster than objects
Date: 21 May 2007 05:55:01
Message: <web.46516bb410a189edd8ef73430@news.povray.org>
> Oh, by the way... how are you changing your models to mesh2, what kind of
> software? That might have something to do with it... maybe... ?

I have my own application to convert from OpenGL triangles to PovRay
triangles or objects (mesh2).

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.

Joel.


Post a reply to this message

From: Tim Attwood
Subject: Re: Triangles faster than objects
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

From: Penelope20k
Subject: Re: Triangles faster than objects
Date: 6 Jun 2007 05:53:30
Message: <4666841a@news.povray.org>
just a question ...

Is it the render (trace) which takes less time . or is it the parse time ?




news:web.464c7756a93451f1d8ef73430@news.povray.org...
> Hello,
> With my last render I noticed that if you render a scene which is divided
in
> triangles the render time is better than if you render the same scene
> divided in objects.
>
> For example, supose a scene formed by 50 objects with 100 triangles each
> one:.
>
>
//--------------------------------------------------------------------------
-
> //TRIANGLES version:
>
//--------------------------------------------------------------------------
-
> //5000 triangles = 5000 mesh2
> union{
>   //Triangle 1
>   mesh2 { [..] }
>   //Triangle 2
>   mesh2{  [..] }
>   [...]
>   //Triangle 5000
>   mesh2{  [..] }
> }
>
//--------------------------------------------------------------------------
-
> //OBJECTS version:
>
//--------------------------------------------------------------------------
-
> //50 objects = 50 mesh2
>   mesh2{ [..] } //Object 1
>   mesh2{ [..] } //Object 2
>   [...]
>   mesh2{ [..] } //Object 50
> //---------------------------------------------------------------------
>
> The TRIANGLES version has took 6 minutes to finish the render, while the
> OBJECTS version has took 8 minutes.
>
> Any comments?
>
> Regards,
>
> Joel.
>
>
>


Post a reply to this message

<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>

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