# # Example .ray file for Juho's Ray Tracing Engine # # # Define our camera camera { pos <5 2 1> lookat <0 4 1> up <0 0 1> fov 80 } globals { # Background color background <0.078 0.361 0.753> } # Material # r g b # ambient, diffuse, specular # kiiltävyys # intensiteetti # pinnan heijastuvuuskerroin # nt # Define one material material { # Name of this material is ground name ground; color <1, 0.75, 0.33>; ambient 0.15; diffuse 1.0; specular 0; shininess 1; reflectivity 0.2; intensity 0.5; refraction 1.0; # Use texture texture { # Which is type "marble" type marble; scale 1.2; turb 0.05; gain 1; }; }; material { name test; color <1, 1, 1>; ambient 10; specular 0; diffuse 0; texture { type checkbox; col1 <1, 0, 0>; col2 <1, 1, 1>; u 0.1; v 0.1; }; } material { name "ball1"; color <0.5, 0.45, 0.35>; ambient 0.07; diffuse 1.0; specular 0.8; shininess 3; reflectivity 0.5; intensity 0; refraction 1.0; }; material { name "ball2"; color <1, 1, 1>; ambient 1; diffuse 1; specular 0.8; shininess 4; reflectivity 0.5; intensity 0; refraction 1.0; }; material { name "ball3"; color <0.1, 0.1, 0.1>; ambient 1; diffuse 1; specular 0; shininess 1; reflectivity 1; intensity 0; refraction 1.0; } material { name "ball4"; color <0.4, 1, 0.4>; ambient 1; diffuse 0.2; specular 0.2; shininess 4; reflectivity 0.5; intensity 0; refraction 1.0; } material { name "ball5"; color <0.7, 1, 1>; ambient 1; diffuse 0.3; specular 0; shininess 4; reflectivity 0.5; intensity 0; refraction 1.0; } material { name "ball6"; color <1, 0.2, 0.6>; ambient 1; diffuse 0.5; specular 0.4; shininess 4; reflectivity 0.5; intensity 0; refraction 1.0; texture { type checkbox; col1 <1, 0, 0>; col2 <1, 1, 1>; u 0.05; v 0.05; }; } # Define a plane plane { # Define where is "up" normal <0, 0, 1> # And how far the plane is from origo to the direction of "up" distance -0.5 # Use this material material ground; } # Define some spheres. sphere { pos <-1, 3, 1>; size 0.4; material ball1; } # A sphere { pos <0, 4, 2>; size 0.7; material ball1; } # B sphere { pos <1, 5, 1>; size 0.4; material ball2; } # C sphere { pos <2, 2, 2>; size 0.7; material ball4; } # D sphere { pos <3, 4, 1>; size 0.4; material ball5; } # E sphere { pos <4, 4, 2>; size 0.7; material ball6; } # F sphere { pos <4, 1, 0.2>; size 0.8; material test; } # G sphere { pos <1, 4, 0.2>; size 0.8; material ball3; } # H sphere { pos <1, 0, 0.2>; size 0.8; material ball3; } # I sphere { pos <1, 1, 0.2>; size 0.6; material ball3; } # J # Define light light { # Of type: ambient type ambient; # With this color color <0.2, 0.2, 0.2>; }; light { # Define a point light type point; color <0.8, 0.8, 0.8>; # Which is located in this position pos <0, -3, 5>; } ; light { type point; color <0.4, 0.4, 0.4>; pos <5, -3, 5>; }; light { type point; color <0.1, 0.1, 0.6>; pos <5, -3, 1>; };