-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.raytracer
60 lines (53 loc) · 2.65 KB
/
scene.raytracer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Configuration of the camera
camera :
{
resolution = { width = 800; height = 600; };
position = { x = 0.0; y = 0.0; z = 1.0; };
rotation = { x = 0.0; y = 0.0; z = 0.0; };
translation = { x = 0.0; y = 0.0; z = 0.0; };
fieldOfView = 120;
};
# Primitives in the scene
primitives :
{
# List of spheres
spheres = (
{ x = 0.5; y = 0.0; z = -1.0; r = 0.4; color = { r = 255; g = 0; b = 0; }; color2 = { r = 1; b = 1; g = 1; }; material = "Glassy"; translation = { x = 0.0; y = 0.0; z = 0.0; }; scale = 0.0025; },
{ x = 0.5; y = 2.0; z = -1.0; r = 0.4; color = { r = 255; g = 0; b = 0; }; material = "Flat"; translation = { x = 0.0; y = 0.0; z = 0.0; }; },
{ x = -0.5; y = -0.6; z = -1.0; r = 0.4; color = { r = 0; g = 0; b = 255; }; material = "Glassy"; translation = { x = 0.0; y = 0.0; z = 0.0; }; }
);
# List of planes
planes = (
{ axis = { x = 0.0; y = 1.0; z = 0.0; }; position = { x = 0.0; y = 1.0; z = 0.0; }; color = { r = 255; g = 255; b = 255; }; color2 = { r = 0; g = 0; b = 0; }; material = "ChessBoard"; scale = 0.1 }
);
# List of cones
cones = (
{ position = { x = -0.4; y = 1.0; z = -1.0; }; r = 0.5; color = { r = 0; g = 0; b = 255; }; axis = { x = 0.0; y = -1.0; z = 0.0 }; color2 = { r = 0; g = 0; b = 0; }; material = "Perlin"; scale = 0.01
translation = { x = 0.0; y = 0.0; z = 0.0; }; rotation = { x = 0.0; y = 0.0; z = 0.0; }; height = 1.0; }
);
# List of cylinders
cylinders = (
{ position = { x = 1.5; y = 0.0; z = -1.0; }; r = 0.1; color = { r = 0; g = 0; b = 255; }; axis = { x = 0.0; y = -1.0; z = 0.0 }; color2 = { r = 0; g = 0; b = 0; }; material = "Perlin"; scale = 0.01
translation = { x = 0.0; y = 0.0; z = 0.0; }; rotation = { x = 0.0; y = 0.0; z = 0.0; }; height = 0.5; }
);
# List of cubes
cubes = (
{ position = {x = 1.4; y = -0.8; z = -2.0;}; r = 1.0; color = { r = 255; b = 0; g = 0; }; color2 = { r = 1; b = 1; g = 1; }; axis = { x = 0.0; y = -1.0; z = 0.0 }; material = "Perlin"; scale = 0.0025;}
);
};
# Light configuration
lights :
{
ambient = 0.4; # Multiplier of ambient light
diffuse = 0.6; # Multiplier of diffuse light
# List of point lights
point = (
{ x = 0.0; y = 1.0; z = 1.0; color = { r = 255; g = 255; b = 255; }; },
{ x = 0.0; y = 1.0; z = 10.0; color = { r = 255; g = 255; b = 255; }; },
{ x = -20.0; y = 1.0; z = -25.0; color = { r = 255; g = 255; b = 255; }; },
{ x = 30.0; y = 1.0; z = -25.0; color = { r = 255; g = 255; b = 255; }; }
);
directional = (
{ x = 0.0; y = -1.0; z = 1.0; color = { r = 255; g = 255; b = 255; }; }
);
};