POV-Ray : Newsgroups : povray.general : How to speed up rendering? : Re: How to speed up rendering? Server Time
13 Aug 2024 01:21:45 EDT (-0400)
  Re: How to speed up rendering?  
From: Mike
Date: 18 Jan 1999 14:23:10
Message: <36A38962.B06ED27F@aol.com>
It was hard to do because it's most useful with complex CSG, but I got a
difference to render about twice as fast using manual bounding.  It took
me 12 seconds to render this without the bounding and 7 seconds with it
uncommented.  I used the #while loop to slow things down enough to see
the difference better.  If fancy textures like ior, reflection, and
filter are used the results are far less dramatic, since they only slow
things down where the surface is actually visible.

#declare test =
difference {

union {
cylinder {<-2, -20, 0>, <-2, 20, 0>, 1}
cylinder {<2, -20, 0>, <2, 20, 0>, 1}
}

box {<-10, 1, -10>, <10, 30, 10>}
box {<-10, -1, -10>, <10, -30, 10>}
 

pigment {color rgb <1, .5, .5>}
//bounded_by { box {<-3.1, -1.1, -1.1>, <3.1, 1.1, 1.1>} } 
}

#declare copy = 0
#while (copy < 40)
object {test translate -20*x translate copy*x}
#declare copy = copy + 3
#end

Nieminen Mika wrote:
> 
> Mike <Ama### [at] aolcom> wrote:
> : Hey I'll add one for the VFAQ perhaps.  Intersection can be really slow
> : if you are using two really large objects to make a smaller one. Manual
> : bounding is a good idea in this case to let POV know you just want to
> : check the smaller area where the visible object is.
> 
>   Can you post a (very short) example code showing clearly this speedup
> when bounding a difference by hand? I'll put it on the page if it's good.
> Preferably with fast objects like spheres.
> 
> --
> main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
> *_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

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