//-------------------------------------------------------------------------- // Persistence of Vision Ray Tracer Scene Description File // File: ComplementaryColours_test.pov // Vers: 3.8 // Desc: Little formula to make complementary colours // Date: May 2021 // Auth: Thomas de Groot //+w640 +h460 +am3 +a0.01 +ac0.90 +r3 +wt7 //-------------------------------------------------------------------------- #version 3.8; global_settings{ assumed_gamma 1.0 radiosity { pretrace_start 16/max(image_width,image_height) pretrace_end 4/max(image_width,image_height) count 50, 500 // higher -> higher quality (1..1600) [35] ->set to about 200 for better shadows (slower) nearest_count 10, 5 // higher -> higher quality (1..10) [5] error_bound 0.6 // higher -> smoother, less accurate [1.8] recursion_limit 2 // how much interreflections are calculated (1..5+) [2] low_error_factor .3 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.010 // reuse of old radiosity samples [0.015] maximum_reuse 0.1 // new parameter 3.7 [0.2] brightness 1 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 normal on // take surface normals into account [off] media off // take media into account [off] always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } } //-------------------------------------------------------------------------- #include "colors.inc" #default{ finish{ ambient 0.0 diffuse 0.6 }} //-------------------------------------------------------------------------- // camera ------------------------------------------------------------------ camera { angle 50 location <0.0 , 0.75 ,-3.0> right x*image_width/image_height look_at <0.0 , 0.75 , 0.0> } // sun --------------------------------------------------------------------- light_source{<-1500, 2500, -2500> color 1.0*2} // sky --------------------------------------------------------------------- sphere { 0.0, 1 pigment { gradient <0, 1, 0> color_map { [0.00 rgb <1.0, 1.0, 1.0>] [0.30 rgb <0.0, 0.1, 1.0>] [0.70 rgb <0.0, 0.1, 1.0>] [1.00 rgb <1.0, 1.0, 1.0>] } scale 2 } finish {emission 1 diffuse 0} scale 10e5 hollow } // fog --------------------------------------------------------------------- fog { fog_type 2 distance 50 color <1.0, 1.0, 1.0> fog_offset 0.1 fog_alt 2.0 turbulence 0.8 } // ground ------------------------------------------------------------------ plane { <0, 1, 0>, 0 texture { pigment {rgb <0.825, 0.57, 0.35>} normal {bumps 0.25 scale 0.025} finish { diffuse 0.6 specular 0.2 roughness 0.001 } } } //-------------------------------------------------------------------------- //---------------------------- objects in scene ---------------------------- //-------------------------------------------------------------------------- //Default Saturation and Brightness values for Clipka's saturation macro: #ifndef (SatBoost) #declare SatBoost = 0.01; #end #ifndef (BrightBoost) #declare BrightBoost = -0.1; #end //0 = no brightness change; >0 = brighter; <0 = darker #macro Convert(CSC, SatBoost, BrightBoost, Color) #switch (CSC) #case (1) #local MyColour = srgb Color; #break #case (2) #local sRGB_Gamma = function(C) {select(C-0.0031308, C*12.92, 1.055*pow(C, 1/2.4)-0.055)} #local SB = SatBoost; // Saturation boost #local VB = BrightBoost; // Brightness ("volume") boost #local RawColour = srgb ; #local SatColour = RawColour-SB; #local MyColour = SatColour*(1+VB)*RawColour.gray/SatColour.gray; #break #else #local MyColour = rgb Color; #end MyColour #end //-------------------------------------------------------------------------- #declare CSC = 0; // 1 = 'raw' sRGB; 2 = sRGB conversion; every other value is 'rgb' #local C_input = <0.669, 0.229, 0.198>; #local C_value = Convert(CSC, SatBoost, BrightBoost, C_input); #local C_comp = Convert(CSC, SatBoost, BrightBoost, ); //------------------------------------------------------------------------- #local Ovus = ovus { 1.00, 0.65 scale 0.5 translate <0.0, 0.5, 0.0> } object {Ovus pigment {C_value} translate -0.60*x translate 0.10*y } object {Ovus pigment {C_comp} translate 0.60*x translate 0.10*y } superellipsoid { <0.1, 0.1> scale <1.1, 0.10, 0.5> translate 0.10*y pigment {rgb 0.95} finish {diffuse 0.5} normal {granite 0.1 scale 0.001} } #if (CSC = 1 | CSC = 2) #local Concat = concat ("srgb <", vstr (3, C_value, ", ", 0, 3), ">"); #else #local Concat = concat ("rgb <", vstr (3, C_value, ", ", 0, 3), ">"); #end #local Text1 = text { internal 1 Concat 0.2, 0 scale 0.08 rotate <0, 0, 0> translate <-0.95, 0.08, -0.51> pigment {C_value} finish { diffuse 0.8 emission 0.5 } } Text1 #if (CSC = 1 | CSC = 2) #local Concat = concat ("srgb <", vstr (3, C_comp, ", ", 0, 3), ">"); #else #local Concat = concat ("rgb <", vstr (3, C_comp, ", ", 0, 3), ">"); #end #local Text2 = text { internal 1 Concat 0.2, 0 scale 0.08 rotate <0, 0, 0> translate <0.09, 0.08, -0.51> pigment {C_comp} finish { diffuse 0.8 emission 0.5 } } Text2