// physics setup Physics { refraction_index = 1.0f // the scene's medium's refraction index } // light setup Lights { ambient = Color3(0.001f, 0.001f, 0.001f) // ambient light background = Color3(0.001f, 0.001f, 0.004f) // bg color p1 = PointLight(Point3( 0.0f, 2.8f, 0.0f ), 1.5f , Color3(1.0f, 1.0f, 1.0f)) p2 = PointLight(Point3( 2.5f, 2.0f, -2.5f ), 0.8f, Color3(1.0f, 1.0f, 1.0f)) } // material setup // Material(diffuse color, ambient color, specular color, reflexion color, // opacity color, phong exponent, phong factor, refraction index, matchambienttodiffuse?, tesselate?) Materials { yellow = Material(Color3(1.0f, 1.0f, 0.0f)) bluetone = Material(Color3(0.1f, 0.2f, 1.0f)) red = Material(Color3(1.0f, 0.0f, 0.0f)) green = Material(Color3(0.0f, 1.0f, 0.0f)) blue = Material(Color3(0.0f, 0.0f, 1.0f)) dgreen = Material(Color3(0.0f, .1f, 0.0f)) orange = Material(Color3(0.5f, 0.15f, 0.0f)) reflect = Material(Color3(0.1f, 0.1f, 0.1f), ambient * .1, unoVector(), Color3(0.9f, 0.9f, 0.9f)) bluereflect = Material(Color3(0.0f, 0.0f, 0.01f), ambient * .1, unoVector(), Color3(0.01f, 0.01f, 1.0f)) glass = Material(Color3(), Color3(), unoVector(), Color3(.05f, .05f, .05f), Color3(0.99f, 0.99f, 0.99f), 100.0f, 1.5f, 1.459f) tess = Material(unoVector(), ambient, unoVector(), Color3(), Color3(), 10.0f, 0.0f, 1.0f, false, true) redplastic = Material(Color3(1.0f, 0.0f, 0.0f), Color3(), unoVector(), Color3(), Color3(), 80.0f, 1.5f) } // object setup Objects { Sphere(Point3(0, 0, 0), 0.1f, yellow) Sphere(Point3(2, 0, 2), 0.5f, redplastic) Box(Point3(-2, 0, 0), Point3(.5, 1, 2), rotationMatrixY(.3), bluetone) Box(Point3(0, 20, 0), Point3(200, 1, 200)) Sphere(Point3(-1.0f, 2.0, 3.0), 1.0f, bluereflect) Sphere(Point3(2.0f, 2.0, 3.0), 1.5f, reflect) Sphere(Point3(-1.0f, 2.0, -3.0), 1.0f, glass) Box(Point3(3.0f, .51f, -1.0f), Point3(1, 1, 1), rotationMatrixY(PI / 4.0f), glass) // Cylinder(Point3(1.5, -.5, -1.5), 0.5f, 1.0f, rotationMatrixX(0.0f), red) // Cylinder(Point3(1.5, -.5, -1.5), 0.5f, 1.0f, rotationMatrixX(PI / 4.0f), red) // TODO: debug cylinder Cone(Point3(0,0,-2.0f), 1.0f, 0.0f, 2.0f, unitMatrix(), dgreen) for(z = 0 to 3) for(y = 0 to 3) Sphere(Point3(-5.0f, y / 2.0f, z / 2.0f), 0.2f, yellow) for(x = 1 to 10) Sphere(Point3(x / 2.0f, 0, 0), 0.1f, red) for(y = 1 to 10) Sphere(Point3(0, y / 2.0f, 0), 0.1f, green) for(z = 1 to 10) Sphere(Point3(0, 0, z / 2.0f), 0.1f, blue) // load from file Mesh("data/ico.off", unitMatrix() * 0.8f, Vector3(0.5, -.5, -3.5), tess) Mesh("data/plane.off", unitMatrix() * 0.05f, Vector3(0,-2.0f,0)) //Mesh("data/bunny.off", 12.0f * rotationMatrixY(PI), Vector3(0,0,0), orange) } // cam setup Camera { camera.set_position(Point3(6.0f, 9.0f, -12.0f)) camera.lookat(Point3(0.0f, 0.0f, 0.0f), Vector3(0.0f, 1.0f, 0.0f)) camera.set_fov(45.0f) }