POV-Ray : Newsgroups : povray.general : Trying to Apply Focal Blur on an Orthographic Projection : Re: Trying to Apply Focal Blur on an Orthographic Projection Server Time: 8 Mar 2021 12:55:29 GMT
  Re: Trying to Apply Focal Blur on an Orthographic Projection  
From: Bald Eagle
Date: 13 Nov 2019 03:40:00
Try this for starters:


// Bill Walker "Bald Eagle" November 2019
// for user Drawliphant
// in thread
http://news.povray.org/povray.general/thread/%3Cweb.5dcb6921c35fe2b54eec112d0%40news.povray.org%3E/

#version 3.8;
global_settings {assumed_gamma 1.0 }
#include "colors.inc"
#include "functions.inc"
#include "math.inc"

#declare Zoom = 50;
camera {
 orthographic
 right     x*image_width/Zoom
 up   y*image_height/Zoom
 location <0, 0, -10>
 look_at  <0, 0, 0>
}

sky_sphere {pigment {rgb 1}}

light_source {<2, 5, -10> rgb 1 shadowless}
//light_source {<-10, 8, -1> rgb 0.8} // fill light

#declare Tan = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {specular 0.2}}
#declare Tan2 = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {diffuse 0.7
specular 0.2 reflection 0.02}}
#declare Gray = texture {pigment {rgb 0.5}}
#declare Gray2 = texture {pigment {rgb 0.5}finish {diffuse 0.7 specular 0.2
reflection 0.02}}

#declare Shade = 1;
#declare   _Red = texture {pigment {rgb <1, 0, 0>*Shade} finish {diffuse 0.7}}
#declare _Green = texture {pigment {rgb <0, 1, 0>*Shade} finish {diffuse 0.7}}
#declare  _Blue = texture {pigment {rgb <0, 0, 1>*Shade} finish {diffuse 0.7}}

#declare Checker = texture {pigment {checker rgb 0 rgb 1} scale 2 finish
{diffuse 1}}

//##########POV-RAY###############Bald
Eagle##############2019###################

#declare Square = union {
 triangle {<-5, 0, -5>, <-5, 0, 5>, <5, 0, -5>}
 triangle {<5, 0, -5>, <-5, 0, 5>, <5, 0, 5> }
 texture {Checker}
}

#declare Axes =
 union {
  #declare Line = 0.1;
  #declare Base = Line*3;
  #declare Length = 3.5;
  #declare Ext = 0.5;
  cylinder {<0, 0, 0>, <Length, 0, 0>, Line texture {_Red}}
   cone {<Length, 0, 0>, Base, <Length+Ext, 0, 0>, 0 texture {_Red}}
   text {ttf "timrom.ttf", "Blur       No Blur", 0.02, 0.0 texture {_Red}
    translate <-2, -1.125, 0>
   }

  cylinder {<0, 0, 0>, <0, Length, 0>, Line texture {_Green}}
   cone {<0, Length, 0>, Base, <0, Length+Ext, 0>, 0 texture {_Green}}
  cylinder {<0, 0, 0>, <0, 0, Length>, Line texture {_Blue}}
   cone {<0, 0, Length>, Base, <0, 0, Length+Ext>, 0 texture {_Blue}}
  //no_shadow
 }

//##########POV-RAY###############Bald
Eagle##############2019###################

object {Square rotate -x*90 translate z*6}
object {Axes}


#declare T_Glass=texture{
   pigment{
     color rgbt 1
   }
   finish {
     diffuse 0.04
     //reflection{ 0.5 fresnel on }
     //conserve_energy
   }
}
#declare I_Glass=interior{
   ior 1.005   // <--- change the IOR
   fade_power 2 //1.5
   fade_distance 1
   fade_color <0.70, 0.7, 0.9>
   //dispersion 1.01
   //dispersion_samples 100
}

#declare Thickness = 0.01;
#declare BlurPlane = function {z + f_noise3d(x, y, z)}


  #declare Range = 1;
  #declare Whole = yes;
  #declare Label = no;
  #declare Gradient = 50;
  #declare Min_factor= 0.6;

// for scaling the noise function
#declare XS = 0.001;
#declare YS = 0.001;
#declare ZS = 0.01;

  isosurface {

    function {abs (BlurPlane (x/XS, y/YS, z/ZS)) - Thickness}
    //open
    threshold 0.5
    //max_gradient 10
    accuracy     0.01
    evaluate Gradient*Min_factor,  sqrt(Gradient/(Gradient*Min_factor)),  min
(0.7, 1.0)
    contained_by {box {<-3, -2, -1>*Range, <Whole*3, 2.3, 1>*Range}}
    hollow
      texture {T_Glass}
      interior {I_Glass}
      //texture {Tex1}
     scale 1
     rotate x*1 // Seems absolutely essential!  :O
     translate <-1.5, -0.5, -7>
    }


Post a reply to this message

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