#include "colors.inc" #include "skies.inc" #include "metals.inc" #declare RTOD = 57.2957795; #declare DTOR = 0.0174532925; /* VCV dimensions */ #declare VCVRADIUS = 3000; #declare HEADHEIGHT = 1232.5; #declare STANDRADIUS = 2000; #declare VCVSCREENWIDTH = 2200; #declare VCVHEIGHT = 2200; /* Camera stuff */ #declare WIDTH = 1024; // Final width after trim, ini file uses WIDTH+DELTA #declare HEIGHT = 768; #declare APERTURE = 2*atan2(0.5*VCVSCREENWIDTH,STANDRADIUS); #declare VP = <(STANDRADIUS+VCVRADIUS)*sin(WHICHWALL*2*pi/8), HEADHEIGHT (STANDRADIUS+VCVRADIUS)*cos(WHICHWALL*2*pi/8)>; #declare LOOKPOSITION = <0,HEADHEIGHT,0>; #declare VD = LOOKPOSITION - VP; // View direction #declare VU = <0,1,0>; // Up vector #declare VR = vnormalize(vcross(VU,VD)); // Right vector #declare FL = STANDRADIUS; // Focal length = Zero parallax distance /* Derive image extension and adjusted aperture DELTA is trimmed off the right hand side of the right eye image and trimmed off the left hand side of the left eye image The final image width will be WIDTH */ #declare DELTA = int((abs(2*EYESEP)*WIDTH) / (2*FL*tan(APERTURE/2.0))); #declare APERTURE2 = 2 * atan2((WIDTH+DELTA) * tan(APERTURE/2.0),WIDTH); /* Report derived variables */ #debug concat("Image delta: ",str(DELTA,5,1),"\n") #debug concat("Aperture: ",str(APERTURE*RTOD,10,5),"\n") #debug concat("Aperture2: ",str(APERTURE2*RTOD,10,5),"\n") /* miscellaneous */ global_settings { ambient_light rgb <1.0,1.0,1.0> } background { color rgb <0,0,0> } /* Camera specification */ camera { perspective location VP + EYESEP * VR up y right (WIDTH+DELTA)*x/HEIGHT angle APERTURE*RTOD sky VU look_at VP + EYESEP * VR + VD } /* Lights */ light_source { VP color rgb <1,1,1> } light_source { <0,VCVHEIGHT-100,0> color rgb <1,1,1> } /* Ground plane */ #declare groundpigment = pigment { bozo turbulence 1 octaves 6 lambda 3 omega 0.5 color_map { [0.00 color rgbt <160/256.,160/256.,160/256.> ] [1.00 color rgbt <154/256.,149/256.,109/256.> ] } scale 50 } #declare groundfinish = finish { ambient 0.2 diffuse 1 specular 0 roughness .2 } #declare groundnormal = normal { bumps 1 scale 10 } #declare groundmaterial = texture { pigment { groundpigment } finish { groundfinish } normal { groundnormal } } plane { <0,1,0>, 0 texture { groundmaterial } translate <0,0,0> // Use this to lower it perhaps } // Include your model here