//CIE experiment /*you need this in your scene: #include "pprocess.inc" PP_Init_Alpha_Colors_Outputs() */ #version unofficial megapov 1.21; #ifndef (CIE_TYPE) #declare CIE_TYPE = 1; #end #switch (CIE_TYPE) #case (0) #declare RGB_CIE_00 = .412291; #declare RGB_CIE_01 = .357664; #declare RGB_CIE_02 = .180209; #declare RGB_CIE_10 = .212588; #declare RGB_CIE_11 = .715329; #declare RGB_CIE_12 = .072084; #declare RGB_CIE_20 = .019326; #declare RGB_CIE_21 = .119221; #declare RGB_CIE_22 = .949102; #declare CIE_RGB_00 = 3.241755; #declare CIE_RGB_01 = -1.537756; #declare CIE_RGB_02 = -0.498732; #declare CIE_RGB_10 = -0.969027; #declare CIE_RGB_11 = 1.875548; #declare CIE_RGB_12 = 0.041546; #declare CIE_RGB_20 = 0.055714; #declare CIE_RGB_21 = -0.204284; #declare CIE_RGB_22 = 1.058564; #break; #case (1) #declare RGB_CIE_00 = .393420; #declare RGB_CIE_01 = .365354; #declare RGB_CIE_02 = .191391; #declare RGB_CIE_10 = .212322; #declare RGB_CIE_11 = .701243; #declare RGB_CIE_12 = .086434; #declare RGB_CIE_20 = .018734; #declare RGB_CIE_21 = .111963; #declare RGB_CIE_22 = .956953; #declare CIE_RGB_00 = 3.506899; #declare CIE_RGB_01 = -1.740235; #declare CIE_RGB_02 = -0.544197; #declare CIE_RGB_10 = -1.068768; #declare CIE_RGB_11 = 1.977261; #declare CIE_RGB_12 = 0.035162; #declare CIE_RGB_20 = 0.056391; #declare CIE_RGB_21 = -0.197270; #declare CIE_RGB_22 = 1.051524; #break; #case(2) //standard colours #declare RGB_CIE_00 = 1; #declare RGB_CIE_01 = 0; #declare RGB_CIE_02 = 0; #declare RGB_CIE_10 = 0; #declare RGB_CIE_11 = 1; #declare RGB_CIE_12 = 0; #declare RGB_CIE_20 = 0; #declare RGB_CIE_21 = 0; #declare RGB_CIE_22 = 1; #declare CIE_RGB_00 = 1; #declare CIE_RGB_01 = 0; #declare CIE_RGB_02 = 0; #declare CIE_RGB_10 = 0; #declare CIE_RGB_11 = 1; #declare CIE_RGB_12 = 0; #declare CIE_RGB_20 = 0; #declare CIE_RGB_21 = 0; #declare CIE_RGB_22 = 1; #break; #end #macro RGB_CIE( _col ) #local col=_col*<1,1,1>; rgb < col.x*RGB_CIE_00 + col.y*RGB_CIE_01 + col.z*RGB_CIE_02, col.x*RGB_CIE_10 + col.y*RGB_CIE_11 + col.z*RGB_CIE_12, col.x*RGB_CIE_20 + col.y*RGB_CIE_21 + col.z*RGB_CIE_22 > #end //test => doesn't make any difference! just use gamma space of scene #declare gam1 = 1; //gamma correct before CIE -> RGB (this is what pov does if you do assumed_gamma) #declare gam2 = 1;//1/2.2; //gamma correct after CIE -> RGB #declare f_R = function(x,y,z) { CIE_RGB_00*pow(x,gam1) + CIE_RGB_01*pow(y,gam1) + CIE_RGB_02*pow(z,gam1) } #declare f_G = function(x,y,z) { CIE_RGB_10*pow(x,gam1) + CIE_RGB_11*pow(y,gam1) + CIE_RGB_12*pow(z,gam1) } #declare f_B = function(x,y,z) { CIE_RGB_20*pow(x,gam1) + CIE_RGB_21*pow(y,gam1) + CIE_RGB_22*pow(z,gam1) } post_process { function { pow(f_R( f_output_red(x,y), f_output_green(x,y), f_output_blue(x,y)),gam2) } function { pow(f_G( f_output_red(x,y), f_output_green(x,y), f_output_blue(x,y)),gam2) } function { pow(f_B( f_output_red(x,y), f_output_green(x,y), f_output_blue(x,y)),gam2) } function { f_output_alpha(x,y) } save_file concat(output_filename(frame_number)) }