-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscene.lua
More file actions
56 lines (51 loc) · 1017 Bytes
/
scene.lua
File metadata and controls
56 lines (51 loc) · 1017 Bytes
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
-- import obj mesh type
require "helpers/obj"
-- render configuration
render {
size = {800, 600},
max_bounces = 2,
antialiasing = 3,
direct_samples = 32,
gamma_correction = 1 / 2.2
}
-- camera setup
camera {
eye = {0.75, 0.5, 1},
look = {0, 0.2, 0}
}
-- sphere area light
arealt = sphere {
position = {-1, 5, 3},
radius = 2.5,
color = {1, 1, 1},
emissive = 1,
ambient = 0,
diffuse = 0,
specular = 0
}
-- scene floor
triangle {
color = {0.3, 0.3, 0.3},
vertex1 = {-10, -0.5, 10},
vertex2 = {-10, -0.5, -10},
vertex3 = {10, -0.5, -10},
normal1 = {0, 1, 0},
normal2 = {0, 1, 0},
normal3 = {0, 1, 0}
}
triangle {
color = {0.3, 0.3, 0.3},
vertex1 = {10, -0.5, -10},
vertex2 = {10, -0.5, 10},
vertex3 = {-10, -0.5, 10},
normal1 = {0, 1, 0},
normal2 = {0, 1, 0},
normal3 = {0, 1, 0}
}
-- mesh
head = obj {
mesh = "head.obj",
color = {0.93725, 0.81569, 0.81176},
specular = 0.4,
shininess = 0.01
}