-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.txt
100 lines (77 loc) · 3.23 KB
/
report.txt
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
____ _____ _ _ ____ _____ ____ ___ _ _ ____ ____ _____ ____ ___ ____ _____
| _ \| ____| \ | | _ \| ____| _ \|_ _| \ | |/ ___| | _ \| ____| _ \ / _ \| _ \_ _|
| |_) | _| | \| | | | | _| | |_) || || \| | | _ | |_) | _| | |_) | | | | |_) || |
| _ <| |___| |\ | |_| | |___| _ < | || |\ | |_| | | _ <| |___| __/| |_| | _ < | |
|_| \_\_____|_| \_|____/|_____|_| \_\___|_| \_|\____| |_| \_\_____|_| \___/|_| \_\|_|
Main Model:
Brigand
Face count: 15007
url: http://opengameart.org/content/brigand
licence: CC-BY 3.0
-----------------------------------------------------------
Static scene:
File: render.png
Scene:
81 x model of Brigand
Primitives count: 2,426,436
Resolution: 1920x1280
Rendering time (Split in the middle):
Total time:
Loading scene: 1.84s
Building KDTree: 2.38s
Render time: 229.49s on 4 cores (774.89s total cpu time)
Rendering time (SAH):
Total time: 72.82s on 4 cores (107.93s total cpu time)
Loading scene: 1.84s
Building KDTree: 55.26s
Render time: 15.33s
Rendering time (SAH in O(nlogn)):
Based on:
On building fast kd-Trees for Ray Tracing, and on doing that in O(N log N)
Ingo Wald (University of Utah), Vlastimil Havran (University in Prague)
Optimizations:
* Changed std::stack to array implementation (reduced number of mallocs).
* Inlined cost function
* Optimized Vector operator()
* Fixed bugs in KDTree Traversal
* Optimized constants
Todo:
* Radix sort
* Split triangles in the middle
Total time: 19.87s on 4 cores (33.04s total cpu time)
Loading scene: 1.82s
Sorting events: 1.52s
Building KDTree: 11.46s
Render time: 5.97s
-----------------------------------------------------------
Video scene
url: https://youtu.be/A7bSuBYB84g
Scene:
81 x model of Brigand
Moving Perspective Camera
2426436 primitives
Rendering time (SAH):
Resolution: 1920x1280, 1256 frames
Output: 204MB, MP4
Total time: 88m54.36s on ~30 cores (1855m33.06s total cpu time) -> 20x speedup,
renderer splits into parallel on rendering single frame.
Loading scene: 4.05s
Building KDTree: 111.19s
Render time: 5218.92s
Render time per frame: 4.15s
-----------------------------------------------------------
I have performed some tests about parameters used in kd-tree construction, it is
max_depth - maximal depth of kd-tree, c_trav - traversal cost, c_inter - intersection cost.
This parameters determine where the optimal split plane is and when recursive spliting should
be stoped.
I have tested SAH with different paramters on simple scene using model of Brigand. Results
are availabe in files results_1.txt and results_16.txt. In the first case scene was
cointaining only one instance of model, in the second case there were 16 instances of model.
Conclusions:
* When the numer of nodes in kd-tree was resonable then there weren't large differences in
rendering time.
* Total time was dominated by build_time
* Build time increase with increase of max_depth.
* Best results:
* scene with 1 model -> max_depth = 40, c_trav = 4.25, c_inter = 3.5
* scene with 16 models -> max_depth = 30, c_trav = 3.5, c_inter = 4.25