POV-Ray : Newsgroups : povray.text.scene-files : Focal Blur Example Server Time
21 Dec 2024 22:22:32 EST (-0500)
  Focal Blur Example (Message 1 to 2 of 2)  
From: triple r
Subject: Focal Blur Example
Date: 22 Feb 2008 23:30:01
Message: <web.47bfa021157f02c8ae42298f0@news.povray.org>
Here's the file with the trick.  Render time for me is about 5 hours on 1 core
of an Intel 2.1 GHz Core 2 Duo.  Embarrassingly simple.


camera{
 location <0,0,-3>
 look_at <0,0,0>
 angle 70
 #if(0)
 focal_point 0
 aperture 1.5
 #if(1)
  blur_samples 3000
  confidence 0.999999
  variance 1/100000000000
 #end
}

#if(1)
global_settings{
 radiosity{
  pretrace_start 0.08
  pretrace_end 0.005
  count 250
  error_bound 0.08
  recursion_limit 2
 }
}
#end

light_source{
 <25,18,-10>
 rgb <1.1,1.05,0.95>*8/6.5
}

sky_sphere{
 pigment{
  gradient y
  color_map{
   [0 rgb <.5,.5,1>*8/3.5]
   [1 rgb <1,1,1>*8/3.5]
  }
 }
}

difference{
 box{<-5,-.0001,-5>,<5,.0001,5>}
 intersection{
  #declare curvature = 0.15;
  #declare blades = 5;
  #declare ang = 0;
  #while(ang < 360)
   cylinder{-y*0.001,y*0.001,1/curvature
   //intersection of circles form the aperture
   translate (1/curvature-1.0)*x
   rotate y*ang
   }
   #declare ang = ang+360/blades;
  #end
 }
 scale 0.07*5  //small
 rotate x*90 //in plane perp. to the camera
 translate -z*2.999 //and very close to the camera
 no_reflection
}

union{
 box{<-2,-2,-5>,<-5,3,5>} //left
 box{<4,-2,-5>,<4,3,6>} //right
 box{<-5,-2,-6>,<5,-1,6>} //bottom
 box{<-5,3,-6>,<2,4,6>} //top
 box{<-5,-2,-3.1>,<6,4,-6>} //back
 box{<-5,-2,5>,<6,3,7>} //front
 pigment{rgb 1}
 finish{
  ambient 0
  diffuse 1.0
 }
}
#declare srad=1.0;
sphere{
 <-2+srad,-1+srad,5-srad>,srad
 pigment{rgb <.9,.2,.1>}
 finish{
  diffuse 0.7
  reflection 0.2
  specular 40
  roughness 0.001
  ambient 0
 }
}
#declare srad2=0.5;
sphere{
 <1.0,-1+srad2,0>,srad2
 pigment{rgb <.2,.1,.9>}
 finish{
  diffuse 0.7
  reflection 0.2
  specular 200
  roughness 0.0001
  ambient 0
 }
}
#declare srad3=0.5;
sphere{
 <-1.0,-1+srad2,1>,srad2
 pigment{rgb <.1,.9,.2>}
 finish{
  diffuse 0.7
  reflection 0.2
  specular 300
  roughness 0.0001
  ambient 0
 }
}


Post a reply to this message

From: nemesis
Subject: Re: Focal Blur Example
Date: 23 Feb 2008 02:00:06
Message: <web.47bfc403f2051e6b5676ec960@news.povray.org>
"triple_r" <rre### [at] hotmailcom> wrote:
> Here's the file with the trick.  Render time for me is about 5 hours on 1 core
> of an Intel 2.1 GHz Core 2 Duo.

>  #if(0) <== extra if without end

>  #if(1)
>   blur_samples 3000
>   confidence 0.999999
>   variance 1/100000000000
>  #end

I'm playing with those settings.  variance is extremely low!  Is that really
needed?

> global_settings{
>  radiosity{
>   pretrace_start 0.08
>   pretrace_end 0.005
>   count 250
>   error_bound 0.08
>   recursion_limit 2
>  }
> }

I've saved radiosity from a first pass and am reusing it with the pretrace steps
at 1.  Also, make sure you put "always_sample no" at the second pass...


Post a reply to this message

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