// Subsurface Scattering Example // Nov. 2003 Sam Benge global_settings{ /*radiosity{ error_bound .5 count 175 pretrace_start .08 pretrace_end .04 nearest_count 10 recursion_limit 1 normal on brightness 1 gray_threshold 0 always_sample on }*/ assumed_gamma 1 max_trace_level 2 } #declare R=seed(3021); #include"functions.inc" #include"sss_macro.inc" #declare Sqr=function(n){n*n} #default{finish{ambient 0}} camera{ fisheye right x*.5*1.33 up y*.5 location<0,50,-100> look_at<0,0,0> angle 35 rotate y*25 } plane{y,-7 pigment{bumps scale 50 turbulence 1 lambda 3}normal{granite .3 scale 2}} #declare lpos1=<1,2,.5>*100000; #declare lpos2=<-.75,1,-1>*100000; light_source{lpos1,<1.6 1.6 1.1> } #declare surface= union{ sphere{0,4} cylinder{x*-.25,x*.25,6.5} cylinder{y*-.25,y*.25,6.5} cylinder{z*-.25,z*.25,6.5} torus{6.5,.5} torus{6.5,.5 rotate x*90} torus{6.5,.5 rotate z*90} scale 2 } object{ surface texture{average texture_map{ [1 // these are the settings: // sss_pattern( object , light position, range, blur samples, point density, size of visible object) sss_pattern( surface, lpos1, 2, 255, 100000, 15 ) finish{ambient<0 1 .25> diffuse 0} ] [.5 pigment{rgb 1} finish{specular .5 roughness .025 brilliance 2 //reflection{0,1 falloff 2}conserve_energy } ] } } }