POV-Ray : Newsgroups : povray.newusers : Strange halo on reflections : Re: Strange halo on reflections Server Time
28 Sep 2024 07:48:18 EDT (-0400)
  Re: Strange halo on reflections  
From: Crippso
Date: 12 Jul 2012 03:50:01
Message: <web.4ffe814058f7bdbc60b91f590@news.povray.org>
Hi clipka

code attached. Its a bit detailed but basically I pass a light through a slit
towards the object I described. The slit is positioned using the xscan variable.
If xscan = 4.0 the narrow beam of light will hit a 45degree side at a position
where the reflection will be through the absorber. Therefore I expect the light
that is reflected to be dull. When xscan = 3.0 the reflection doesnt travel
along the absorber so the reflection should be brighter. However if you run the
scene with both xscan values the brightness of the reflection looks about the
same.

#declare pitch = 15.0;   //pitch
#declare t_st = 6.0;    // front face of absorber
#declare t_abs = 2.0; // absorber thickness
#declare t_back = 9.0; // cmt thickness
#declare Rd = 5.0; //etch depth
#declare n = 0.5; // width of etch at bottom
#declare m = pitch-n-2*Rd; // mesa top size - this formula gives a 45deg slope
on side walls
//#declare m = 6; //mesa top size
#declare b = m; // indium bump size
#declare etch = pitch-m; // width of etch at top
#declare bumpz = t_back-1e-3; // front face of bump




#declare t_ol = 0.1; //an overlap between interfaces required by povray


#declare extent = 100; // x and y extent of 'array' - large enough to fit a 3x3
grid of pixels in

#declare xscan = 3.0;//clock/10;  //scan of slit across pixel

#declare slit=0.2; //slit thickness


#declare xoffset = 0;    //multiples of pitch offset
#declare yoffset = 0;    //multiples of pitch offset

#declare cdte_ior = 2.68;
#declare cmt_ior = 3.2;

#declare cmt_abs = 2.500;


#declare zq1 = t_back-Rd;   // z pos of cutaway bottom (etch bottom)
#declare zq2 = t_back+t_ol; // z pos of cutaway top
#declare slp = 2*Rd/(etch-n); // slope of mesa side

#declare val1 = (etch/2)+(zq2-t_back)/slp; // x or y pos of cutaway top



#declare beamsize = 2*sqrt(2)*pitch;

#default {finish {ambient 0 diffuse 0}}

global_settings
{
   assumed_gamma 1

   //photons{count 2000000000 max_trace_level 20 adc_bailout 1e-11 jitter 0
gather 5000,8000}
  photons{count 100000000 max_trace_level 20 adc_bailout 1e-11 jitter 0
}//gather 500,1000}

}

#macro PhotonTarget(isTarget, Reflect, Refract, DontIgnorePhotons)
 photons {
  #if(isTarget=yes) target #end
  reflection Reflect
  refraction Refract
  #if(DontIgnorePhotons=no) collect off #end
 }
#end

camera
{
   orthographic
   location <0,0,-20>
   angle 100
   look_at  <0,0,-50>

}

/*camera
{
   orthographic
   location <0,0,-30>
   angle 100
   look_at  <0,0,0>

}*/

light_source{<xscan,0,-20>, 1 cylinder radius beamsize falloff beamsize
tightness 0 point_at <xscan,0,t_st>}


#declare movpelayer =
union{

object{

box
{
   <-extent,-extent,0> <extent,extent,t_back>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior cmt_ior fade_distance 1000 fade_power 1000}
   PhotonTarget(yes, yes, yes, no)
}

}

object{

box
{
   <-extent,-extent,t_st> <extent,extent,t_st+t_abs>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior cmt_ior fade_distance cmt_abs fade_power 1000}    // Absorber
Layer
   PhotonTarget(no, yes, yes, no)
}
}

}

#declare etch1 =

merge{
      object{
         prism {
           linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <+pitch/2+xoffset*pitch/2-n/2,zq1>,
<+pitch/2+xoffset*pitch/2+n/2,zq1>, <+pitch/2+xoffset*pitch/2+val1,zq2>,
<+pitch/2+xoffset*pitch/2-val1,zq2>, <+pitch/2+xoffset*pitch/2-n/2,zq1>
            }
         //rotate<0,0,0>
         //translate<+pitch/2+xoffset*pitch/2,0,t_st+t_abs+t_con+1e-3>
         texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
         }

      object{
         prism {
           linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <-pitch/2+xoffset*pitch/2-n/2,zq1>,
<-pitch/2+xoffset*pitch/2+n/2,zq1>, <-pitch/2+xoffset*pitch/2+val1,zq2>,
<-pitch/2+xoffset*pitch/2-val1,zq2>, <-pitch/2+xoffset*pitch/2-n/2,zq1>
            }
          //rotate<0,0,0>
          //translate<-pitch/2+xoffset*pitch/2,0,t_st+t_abs+t_con+1e-3>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }

       object{
         prism {
           linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <pitch+pitch/2+xoffset*pitch/2-n/2,zq1>,
<pitch+pitch/2+xoffset*pitch/2+n/2,zq1>,
<pitch+pitch/2+xoffset*pitch/2+val1,zq2>,
<pitch+pitch/2+xoffset*pitch/2-val1,zq2>,
<pitch+pitch/2+xoffset*pitch/2-n/2,zq1>
            }
         //rotate<0,0,0>
         //translate<+pitch/2+xoffset*pitch/2,0,t_st+t_abs+t_con+1e-3>
         texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
         }

       object{
         prism {
           linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <-pitch-pitch/2+xoffset*pitch/2-n/2,zq1>,
<-pitch-pitch/2+xoffset*pitch/2+n/2,zq1>,
<-pitch-pitch/2+xoffset*pitch/2+val1,zq2>,
<-pitch-pitch/2+xoffset*pitch/2-val1,zq2>,
<-pitch-pitch/2+xoffset*pitch/2-n/2,zq1>
            }
          //rotate<0,0,0>
          //translate<-pitch/2+xoffset*pitch/2,0,t_st+t_abs+t_con+1e-3>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }

      object{
         prism {
           linear_sweep linear_spline
           -extent, // sweep the following shape from here ...
           extent, // ... up through here
            5,
            <-n/2,zq1>, <+n/2,zq1>, <+val1,zq2>, <-val1,zq2>, <-n/2,zq1>
            }
          rotate<0,0,90>
          translate<0,+pitch/2+yoffset*pitch/2,0>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }

      object{
         prism {
            linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <-n/2,zq1>, <+n/2,zq1>, <+val1,zq2>, <-val1,zq2>, <-n/2,zq1>
            }
          rotate<0,0,90>
          translate<0,-pitch/2+yoffset*pitch/2,0>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }

       object{
         prism {
           linear_sweep linear_spline
           -extent, // sweep the following shape from here ...
           extent, // ... up through here
            5,
            <-n/2,zq1>, <+n/2,zq1>, <+val1,zq2>, <-val1,zq2>, <-n/2,zq1>
            }
          rotate<0,0,90>
          translate<0,pitch+pitch/2+yoffset*pitch/2,0>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }

       object{
         prism {
            linear_sweep linear_spline
            -extent, // sweep the following shape from here ...
            extent, // ... up through here
            5,
            <-n/2,zq1>, <+n/2,zq1>, <+val1,zq2>, <-val1,zq2>, <-n/2,zq1>
            }
          rotate<0,0,90>
          translate<0,-pitch-pitch/2+yoffset*pitch/2,0>
          texture {pigment {rgbt 1}
       finish {reflection {0,1 fresnel} conserve_energy  }  }
       interior { ior 1 fade_distance 1000 fade_power 1000 }
       PhotonTarget(no, yes, yes, no)
          }


    }



#declare bump =
object{
   box{<-b/2,-b/2,-b/2>,<b/2,b/2,b/2>}
   texture {pigment {rgb 1}}
   finish {reflection {1} }
   PhotonTarget(no, yes, no, no)
}


//object{movpelayer}
//object{etch1}
//object{etch2}



difference{
       object{movpelayer}
       object{etch1}
       cutaway_textures
}



object{bump translate <0+xoffset*pitch/2,0,b/2+bumpz>}
object{bump translate <+pitch+xoffset*pitch/2,0,b/2+bumpz>}
object{bump translate <-pitch+xoffset*pitch/2,0,b/2+bumpz>}

object{bump translate <0+xoffset*pitch/2,pitch,b/2+bumpz>}
object{bump translate <+pitch+xoffset*pitch/2,pitch,b/2+bumpz>}
object{bump translate <-pitch+xoffset*pitch/2,pitch,b/2+bumpz>}

object{bump translate <0+xoffset*pitch/2,-pitch,b/2+bumpz>}
object{bump translate <+pitch+xoffset*pitch/2,-pitch,b/2+bumpz>}
object{bump translate <-pitch+xoffset*pitch/2,-pitch,b/2+bumpz>}



plane{z,-0.1 clipped_by{box{<-100+xscan,-100,-0.11><-slit/2+xscan,100,-0.09>}}
  texture{
    pigment{rgbt 1}
    finish{ambient 0 diffuse 0}
  }
  interior_texture{
    pigment{rgb 1}
    finish{ambient 0 diffuse 0}
  }
  PhotonTarget(no, yes, yes, no)
}

plane{z,-0.1 clipped_by{box{<100+xscan,-100,-0.11><slit/2+xscan,100,-0.09>}}
  texture{
    pigment{rgbt 1}
    finish{ambient 0 diffuse 0}
  }
  interior_texture{
    pigment{rgb 1}
    finish{ambient 0 diffuse 0}
  }
  PhotonTarget(no, yes, yes, no)
}


/*
object{  //This is a reference object to see the size of things
 box{<-m/2,-m/2,-49.7>,<m/2,m/2,-49.8>}
 texture {pigment {rgb 1}}
 finish {emission 1 diffuse 0}
}

object{  //This is a reference object to see the size of things
 box{<-pitch/2,-pitch/2,-49.8>,<pitch/2,pitch/2,-49.9>}
 texture {pigment {rgb <.3,.1,.9>}}
 finish {emission 1 diffuse 0}
}
*/



disc
{
   <0,0,-50> <0,0,1> 50
   pigment{rgb 1}
   finish{diffuse 1.0}
}


clipka <ano### [at] anonymousorg> wrote:
> Am 12.07.2012 00:13, schrieb Crippso:
> >
> For a diagnosis of the issue, it would probably help a lot to see the
> corresponding scene code.


Post a reply to this message

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