// adding a photon{} block to global_settings activates photon mapping. // photons also need to be adjusted for light sources and objects. global_settings { photons { spacing 0.01 // specify the density of photons //count 100000 // alternatively use a total number of photons //gather min, max // amount of photons gathered during render [20, 100] //media max_steps [,factor] // media photons //jitter 1.0 // jitter phor photon rays //max_trace_level 5 // optional separate max_trace_level //adc_bailout 1/255 // see global adc_bailout //save_file "filename" // save photons to file //load_file "filename" // load photons from file //autostop 0 // photon autostop option //radius 10 // manually specified search radius // (---Adaptive Search Radius---) //steps 1 //expand_thresholds 0.2, 40 } } global_settings { assumed_gamma 0.2 } /////////////////////////////// // perspective (default) camera camera { location <-3.0 , 2.0 ,-5.0> look_at <0.0 , 0.0 , 0.0> } // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! /*light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <40, 80, -40> // position of light } */ ////////////////////////////// #declare OpticalPrism = prism { linear_sweep // or conic_sweep for tapering to a point linear_spline -0.5, // height 1 0.5, // height 2 4, // number of points // the points < 0, -sqrt(3)/4>, < -.5, sqrt(3)/4 >, < .5, sqrt(3)/4> , < 0, -sqrt(3)/4> // [open] // [sturm] pigment { rgbf 1 } interior { ior 1.5 dispersion 1.05 } // photon block for an object photons{ target 1.0 // spacing multiplier for photons hitting the object refraction on reflection on //ignore_photons //pass_through } } // atmospheric media can be generated by adding a media statement // to the scene not attached to any specific object media { // atmospheric media sample intervals 10 scattering { 1, rgb 0.3} samples 1, 10 confidence 0.9999 variance 1/1000 ratio 0.9 } // Create an infinite sphere around scene and allow any pigment on it sky_sphere { pigment { spherical color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] } } } object{OpticalPrism rotate x*-90 } plane { y, // unit surface normal, vector points "away from surface" -1.0 // distance from the origin in the direction of the surface normal hollow on // has an inside pigment? pigment { color rgb <1, 1, 1> } } plane { y, // unit surface normal, vector points "away from surface" -1.0 // distance from the origin in the direction of the surface normal hollow on // has an inside pigment? pigment { color rgb <1, 1, 1> } rotate z*90 translate x*6 } // create a point "spotlight" (cylindrical directed) light source light_source { 0*x // light's position (translated below) color rgb 5*<1,1,1> // light's color spotlight // this kind of light source cylinder // this variation parallel translate <-8, 0,0> // position of light point_at <5, 0, 0> // direction of spotlight radius .2 // hotspot (inner, in degrees) tightness 99 // tightness of falloff (1...100) lower is softer, higher is tighter falloff 8 // intensity falloff radius (outer, in degrees) // photon block for a light source photons { refraction on //area_light } media_interaction on }