-
Notifications
You must be signed in to change notification settings - Fork 7
/
NOTES
107 lines (73 loc) · 2.56 KB
/
NOTES
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
KD TREE BUILD TIMES
BUNNY
Building mesh bounding tree for 69451 faces
Tree depth: 29
Real: 4.22, User: 3.91 System: 0.30 seconds
GC: 0.18 seconds, 573.14 Mb consed
BUDDHA
Building mesh bounding tree for 1087716 faces
Tree depth: 39
Real: 72.43, User: 57.41 System: 14.30 seconds
GC: 17.81 seconds, 6314.31 Mb consed
DRILL
Building mesh bounding tree for 3855 faces
Tree depth: 18
Real: 0.07, User: 0.06 System: 0.002 seconds
GC: 0.00 seconds, 10.46 Mb consed
Building mesh bounding tree for 1288 faces
Tree depth: 17
Real: 0.04, User: 0.04 System: 0.001 seconds
GC: 0.00 seconds, 6.88 Mb consed
DRAGON
Building mesh bounding tree for 871414 faces
Tree depth: 37
Real: 47.96, User: 44.59 System: 3.06 seconds
GC: 6.64 seconds, 4851.75 Mb consed
Normal Transformations
See Apple Technical Report #22:
papers/Turkowski--Transformations_of_Surface_Normal_Vectors--1990.pdf
http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf
Efficiency Issues for Ray Tracing
Brilliance
1.0 - inf
High values cause shallow light angles to decrease diffuse component.
Usage: (N.L)^brilliance
Diffuse component (POV)
I_d = a * d * I * C * (N . L) ^ b
where d : surface's diffuse reflection coefficient
b : surface's brilliance
C : surface's color
N : surface's normal vector
L : light vector (pointing at the light)
I : intensity of the incoming light
a : attenuation factor
Phong (highlight) component (POV)
I_p = p * C * (R . L) ^ s
where p : surface's phong reflection coefficient
s : surface's phong size
C : surface's color/light color depending on the metallic flag
R : reflection vector
L : light vector (pointing at the light)
The reflection vector is calculated from the surface normal and
the viewing vector (looking at the surface point):
R = -2 * (V . N) * N + V, with R . R = 1
Specular component (POV)
I_s = s * C * (H . N) ^ (1 / r)
where s : surface's specular reflection coefficient
r : surface's roughness
C : surface's color/light color depending on the metallic flag
N : surface's normal
H : bisection vector between V and L
The bisecting vector H is calculated by
H = (L - V) / sqrt((L - V).(L - V))
----
PATTERN TYPES
* pigment (currently called color)
* shader (about what POV calls texture_map)
* normal
* finish
COMPOSITE-PATTERN
* What POV calls average pattern.
TEXTURE
(make-instance 'texture
:normal (make-instance '