// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <0, 3, -24> direction 1.5*z right x*image_width/image_height look_at 0// <-25, 4.5, -5> } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-46, 1000, 120>*1000 } // ---------------------------------------- plane { y, -10 pigment { color rgb 0 } } #include "functions.inc" #declare Sea=on; #declare Warp_scale=1000; #declare Scale_x=5 ; #declare Scale_y=5 ; #declare Damp=.9 ; #declare Lacunarity=3 ; #declare Octave=6 ; #declare Offset=0.9 ; #declare Gain=10 ; #declare Wave_Height=0.05 ; #declare Cretes=function{f_ridged_mf(x/Scale_x, y/Scale_y, 0,Damp,Lacunarity,Octave,Offset,Gain,1)} #declare F_bozo=function{pattern {bozo warp {turbulence <1,1,0>*0.4 omega 0} scale <8,1,1>*7}} #declare F_bozo2=function{pattern {bozo warp {turbulence <1,1,0>*0.4 omega 0} rotate z*-15 scale <6,1,1>*5}} #declare Element_houle=function{F_bozo(x,y,0)-.5+F_bozo2(x,y,0)-.4} #declare Houle2=function{ Element_houle(x,y,z)*3 +Element_houle(x*6,y*4,z*4)*.8 } #declare T_eau=texture // free (without foam) sea texture { pigment { color rgbt 1 } finish { ambient 0 specular 0 roughness 0.0001 conserve_energy reflection { 0.0 , 1.0 fresnel on falloff 1 exponent 0.6 metallic 0.0 } } } #declare T_mousse=texture // foam texture {pigment{ color rgb 1 transmit .3 } finish{ambient 0 diffuse 1 } normal{bumps 0.5} } #declare P_img=pigment{image_map { tga "C:\A_Gegene\Moi\Moray\Control_ecume.tga" once interpolate 2} // my terrain generating image, put yours here scale 2 translate -1 scale <50,50,3>rotate z*180 translate z*-48} //transformations to fit to terrain #declare F_img=function{pigment {P_img}} #declare f_crackle_moi = function {pattern {crackle warp {turbulence 0.65 lambda 6} scale .4}} //turb 0.7 #declare F_var_crackle=function{ min(1, f_crackle_moi(x, y, z)/max(min(1,(1-F_img(x, y, z).gray)*5),.001))} // The distribution function to fill mor or less the crackle , Thanks to François Dispot :-) #declare M_Iso_Sea = material // M_Iso_Sea { texture{ function{F_var_crackle(x,y,z)} texture_map{ [.35 T_mousse] //.4 [.55 T_eau] //.5 } } interior { ior 1.333 caustics 2.0 media { samples 1,30 absorption rgb <1.0, 0.1, 0.15>*.5 scattering { 2 , rgb 0.006 // mie hazy scattering extinction 0 } } } } //Geometrie #declare IsoMer= isosurface { function { z*.5 -(Houle2(x,y,z)*6 +Cretes(x,y,z)*2)*Wave_Height } contained_by {box{<-1000,-1000,-400>,<1000,1000,1.3>}} threshold 0 accuracy 0.001 max_gradient 1 max_trace 1 hollow } // end isosurface #if(Sea) object{IsoMer material { M_Iso_Sea } rotate x*-90} // this object was done for moraty where z is up #else plane{y,0 material{M_Iso_Sea}} #end