// PoVRay 3.6/3.7 Scene File " ... .pov" /********************************************************************************** Persistence of Vision Ray Tracer Scene Description File File name : sRGB_test.pov Version : 3.7 Description : Date : March 2014 Author : Thomas A. M. de Groot E-mail : **********************************************************************************/ // +w640 +h640 +a0.3 +am2 +bm2 //================================================================================= // VERSION AND GAMMA SWITCHES //================================================================================= #version 3.7; //================================================================================= // DEFAULTS AND INCLUDES //================================================================================= #default {pigment {rgb <1,0,0>}} #default {finish {ambient 0}} #include "colors.inc" #include "rand.inc" #include "functions.inc" #include "transforms.inc" //================================================================================= // GLOBAL SETTINGS //================================================================================= global_settings { assumed_gamma 1 max_trace_level 5 // default [5] radiosity { pretrace_start 0.08 // start pretrace at this size pretrace_end 0.004 // end pretrace at this size count 35 // higher -> higher quality (1..1600) [35] nearest_count 5 // higher -> higher quality (1..10) [5] error_bound 1 // higher -> smoother, less accurate [1.8] recursion_limit 1 // how much interreflections are calculated (1..5+) [3] 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.015 // 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 off // 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 } //noise_generator 2 } // camera ------------------------------------------------------------------ camera { orthographic angle 75 // front view location <0.0 , 0.0 ,-3.0> right x*image_width/image_height look_at <0.0 , 0.0 , 0.0> } // sky ---------------------------------------------------------------------- sphere { 0, 1000 pigment {color Gray50} finish {emission 1} } //--------------------------------------------------------------------------- //transformation functions by Ive: //from scRGB (linear color space) -> sRGB: #declare sRGB_Gamma = function(C) { select(C-0.0031308, C*12.92 , 1.055*pow(C,1/2.4)-0.055) } //and the inverse for sRGB -> scRGB (linear color space): #declare sRGB_GammaInverse = function(C) { select(C-0.04045, C/12.92, pow((C+0.055)/1.055,2.4)) } #macro scRGB_to_sRGB(Color) rgb #end #macro sRGB_to_scRGB(Color) rgb #end //--------------------------------------------------------------------------- //---------------------------- objects in scene ---------------------------- //--------------------------------------------------------------------------- #declare MyColor = <213, 127, 79>/255; //#declare MyColor = Gray75; //my reference color: box { -1, 1 texture { pigment {rgb MyColor} } scale <1, 0.2, 0.1> translate <-1.1, 1.7, 0> } box { -1, 1 texture { pigment {srgb MyColor} } scale <1, 0.2, 0.1> translate <1.1, 1.7, 0> } //Ive's: //~~~~~ #local srgbColor = scRGB_to_sRGB(MyColor); box { -1, 1 texture { pigment {srgbColor} } scale <1, 0.5, 0.1> translate <-1.1, 0.6, 0> } // box { -1, 1 texture { pigment {sRGB_to_scRGB(srgbColor)} } scale <1, 0.5, 0.1> translate <1.1, 0.6, 0> } //Cousin Ricky's: //~~~~~~~~~~~~~~ #include "Cousin Ricky/CR_srgb.inc" box { -1, 1 texture { pigment {color sRGB_Convert_v (MyColor)} } scale <1, 0.5, 0.1> translate <-1.1, -1.1, 0> } /* box { -1, 1 texture { pigment {sRGB_to_scRGB(MyColor)} } scale <1, 0.5, 0.1> translate <1.1, -1.1, 0> } */ //--------------------------------------------------------------------------- text {ttf "arial.ttf", "My reference colours (rgb - srgb)", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <-2, 2.0, 0> } text {ttf "arial.ttf", "Ive's macros", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <-0.5, 1.2, 0> } text {ttf "arial.ttf", "RGB => sRGB", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <-2, -0.1, 0> } text {ttf "arial.ttf", "sRGB => RGB", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <0.2, -0.1, 0> } text {ttf "arial.ttf", "Cousin Ricky's macros", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <-1.0, -0.5, 0> } text {ttf "arial.ttf", "RGB => sRGB", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <-2, -1.8, 0> } /* text {ttf "arial.ttf", "sRGB > RGB", 0.02, 0.0 // thickness, offset texture { pigment {color rgb<0.1, 0.1, 0.1>} } scale <1, 1.25, 1>*0.2 translate <0.2, -1.8, 0> } */