POV-Ray : Newsgroups : povray.newusers : need 4ghz cpu to render pillar Server Time
5 Sep 2024 06:18:12 EDT (-0400)
  need 4ghz cpu to render pillar (Message 1 to 5 of 5)  
From: marabou
Subject: need 4ghz cpu to render pillar
Date: 28 Sep 2001 11:47:05
Message: <3bb49b79$1@news.povray.org>
hello all!

my rendertime with povray is fine.
but if i try to render a pillar consisting of a many cylinders with spheres 
at its ends as difference from a cylinder then rendertime is far above 2 
min. 
the scene is only this white cylinder and four black planes.
the cylinder ist 1 high only.
is there any way to accelerate?

thanks


Post a reply to this message

From: Steve
Subject: Re: need 4ghz cpu to render pillar
Date: 28 Sep 2001 14:18:14
Message: <slrn9r9flm.uut.steve@zero-pps.localdomain>
On Fri, 28 Sep 2001 17:47:15 +0000, marabou wrote:
>hello all!
>
>my rendertime with povray is fine.
>but if i try to render a pillar consisting of a many cylinders with spheres 
>at its ends as difference from a cylinder then rendertime is far above 2 
>min. 
>the scene is only this white cylinder and four black planes.
>the cylinder ist 1 high only.
>is there any way to accelerate?

You could manually bound your difference, see bounded_by in the docs. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  7:15pm  up 17 days, 21:31,  1 user,  load average: 1.12, 1.11, 1.03


Post a reply to this message

From: Mike Williams
Subject: Re: need 4ghz cpu to render pillar
Date: 28 Sep 2001 14:26:15
Message: <yJZXvHAV$Lt7Ewq6@econym.demon.co.uk>
Wasn't it marabou who wrote:
>hello all!
>
>my rendertime with povray is fine.
>but if i try to render a pillar consisting of a many cylinders with spheres 
>at its ends as difference from a cylinder then rendertime is far above 2 
>min. 
>the scene is only this white cylinder and four black planes.
>the cylinder ist 1 high only.
>is there any way to accelerate?
>
>thanks

What happens is that when you render without the difference, POV can put
a tight bounding box around each cylinder and sphere, so for each ray it
only has to perform cylinder tests for the few cylinders that that
particular ray comes close to.

When you do a difference, POV can't use the bounding boxes in the same
way. For each ray it ends up performing cylinder tests for every single
cylinder and sphere. You can see the effects of this if you look at the
stats in the message window. You'll find that there are a *huge* number
of cylinder  and sphere tests, of which only a very small percentage
were successful. Whereas a render without the difference has about the
same number of successful tests but a much lower number of unsuccessful
ones.

I did a scene a while ago with hundreds of small cylindrical holes in a
flat slab and experimented with cutting the slab into smaller pieces
with just a few holes in each piece. It turned out that the rendering
was fastest when each piece was so small that it contained only one
hole.

The following one large slab took 62 times as long to render as 400
pieces with one hole in each.

#declare N = 20;   
// One large slab with N*N holes
#declare Slab1 = difference
 {                         
 box {<-0.5,-0.5,-0.5>,<N-0.5,N-0.5,0.5>}       
 #declare xx = 0;
 #while (xx < N)
   #declare yy = 0;
   #while (yy < N)
        cylinder {<xx,yy,-1>,<xx,yy,1>,0.3}
     #declare yy = yy+1;
   #end
   #declare xx=xx+1;
 #end
 }



// Declare a small box with one hole
#declare Box = difference
 {
 box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5>}                    
 cylinder {<0,0,-1>,<0,0,1>,0.3}
 }
// Glue together N*N boxes into one slab
// so it looks like one slab with N*N holes
#declare Slab = union {               
#declare xx=0;
#while (xx < N)
  #declare yy = 0;
  #while (yy < N)
    object {Box translate <xx,yy,0>}
    #declare yy = yy + 1;
  #end
  #declare xx=xx+1;
  #end
}


The one-large-slab version made over 70 million cylinder tests of which
0.4% were successful. The 400-small-pieces version made 27 thousand
cylinder tests of which 31% were successful. 

The resulting images are identical.


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: John VanSickle
Subject: Re: need 4ghz cpu to render pillar
Date: 28 Sep 2001 19:10:23
Message: <3BB504CD.EA191E6B@hotmail.com>
Mike Williams wrote:
> 
> I did a scene a while ago with hundreds of small cylindrical holes in
> a flat slab and experimented with cutting the slab into smaller pieces
>  with just a few holes in each piece. It turned out that the rendering
>  was fastest when each piece was so small that it contained only one
>  hole.

You can also use one big slab, but merge groups of the cylinders and
put bounding boxes around each group.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

From: marabou
Subject: Re: need 4ghz cpu to render pillar
Date: 28 Sep 2001 21:37:17
Message: <3bb525cd@news.povray.org>
thanks a lot for helping.

@mike: 
i believe i saw a site with your explanation. is it true?
if yes, wasn't it blue boxes? 
i read it but didn't find a way for round bodies.
maybe i take one more english lesson first an then there is a way.


Post a reply to this message

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