#include "chop64v2.inc" #include "midi_pov.inc" #include "spline.mcr" global_settings { ambient_light <0.95, 0.9, 1> } sky_sphere { pigment { rgb <0.9, 0.9, 1.0> } } #declare Location_Path = create_spline ( array[9] { <0, 50, -47>, <10, 30, -20>, <45, 12, -10>, <40, 5, 0>, <10, 3, 0>, <-10, 3, 0>, <-50, 10, -10>, <-30,15,-20>, <-10, 20, -30>}, spline_loop (no) + spline_sampling(5) + spline_cache_file("spline1.tmp")) #declare Look_At_Path = create_spline ( array[9] { <0,0,0>, <0,0,0>, <-20,0,0>, <0,0,0>, <5,0,0>, <10,0,0>, <10,0,0>, <20,0,0>, <10,0,0>}, spline_loop (no) + spline_sampling(5) + spline_cache_file("spline2.tmp")) evaluate_spline (Location_Path, default_options) camera { location spline_pos //location <0, 50, -47> evaluate_spline (Look_At_Path, default_options) //look_at <0,0,0> look_at spline_pos } light_source { <-100, 20, -100>, <2, 0.2, 0.2>*4 spotlight point_at <-20,0,0> radius 3 tightness 10 falloff 10 } light_source { <100, 50, -200>, <0.2, 0.2, 2>*4 spotlight point_at <20, 0, 0> radius 3 tightness 10 falloff 10 } #declare sd=seed(1); #macro rand_color() #end #declare color_table = array[128]; #declare i=0; #while (i < 128) #declare color_table[i] = rand_color(); #declare i = i + 1; #end #macro sphere_keyboard() #local key = 21; union { #while (key < 109) #local this_pos = note_val_instrument_all_tracks("Acoustic Grand", key, 0.5, 0.05); #if (white_key(key)) sphere { 0.5 texture { finish { ambient 0 diffuse 0 reflection { 0.02, 0.9 fresnel on } conserve_energy } pigment { rgbf <1, 1, 1, 1> } } interior { ior 1.7 fade_distance 1.0 fade_power 2 } } sphere { 0.3*this_pos texture { finish { ambient this_pos diffuse 0 } pigment { rgb color_table[key] } } } #else sphere { 0.5 texture { finish { ambient 0 diffuse 0 reflection { 0.02, 0.9 fresnel on } conserve_energy } pigment { rgbf <0.1, 0.1, 0.1, 1> } } interior { ior 1.7 fade_distance 1.0 fade_power 2 } } sphere { 0.3*this_pos texture { finish { ambient 10*this_pos diffuse 0 } pigment { rgb color_table[key] } } } #end #local key = key + 1; #end translate x*-20 } #end object { sphere_keyboard() translate x * -44 } #declare Floor_Image = concat("input/", concat(str(frame_number+300, 0, 0), ".tga")); plane { y, -5 pigment { image_map { tga Floor_Image interpolate 2 } rotate x*90 scale 100 } finish { ambient <1, 1, 1> } }