Skip to content

Commit 5d58557

Browse files
committed
Added new isosurface raycaster with adaptive step size control.
The folder also contains some evaluation CSV files with timings and image quality measure. Two Python files are provided for analysis and visualization.
1 parent cf2847e commit 5d58557

File tree

12 files changed

+1220
-1
lines changed

12 files changed

+1220
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vs/
2-
bin/
2+
bin/
3+
data/eval*

AddingNewVolumeRenderer.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Adding a new volume renderer
2+
3+
All volume rendering algorithms are found in `cppvolrend/structured`. Assume we want to create a new renderer, which visualizes isosurfaces. We call it a *ray-casting 1-pass isosurface renderer*, or short `rc1piso`. These steps need to be taken to add it:
4+
5+
* Create a new subfolder `cppvolrend/rc1piso` and add some files:
6+
* * Add the C++ files named `rc1pisorenderer.cpp` and `rc1pisorenderer.h`. Their content could come from one of the other algorithms, or be based on `volrendernull.cpp/h`.
7+
* * Add a compute shader called `ray_marching_1p_iso.comp`.
8+
* Edit `structured/CMakeLists.txt` to add the new C++ files in the call to `add_executable()`. Follow the structure of the existing text there.
9+
* Run CMake. The files should now be part of your buildsystem and appear in your IDE.
10+
* Include the new renderer in the list of renderers available to the program by adding a few lines in `structured/main.cpp`:
11+
12+
```c++
13+
// near the beginning of main.cpp ...
14+
#include "structured/rc1piso/rc1pisorenderer.h"
15+
16+
// ... and in the main function
17+
int main (int argc, char **argv)
18+
{
19+
RenderingManager::Instance()->AddVolumeRenderer(new RayCasting1PassIso());
20+
}
21+
```
22+
23+
You can now compile and test your new renderer.
24+

cppvolrend/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ add_executable(cppvolrend
3333
# GPU Image Order Ray Casting
3434
structured/rc1pass/rc1prenderer.cpp structured/rc1pass/rc1prenderer.h
3535

36+
# GPU Image Order Iso Ray Casting with adaptive step size
37+
structured/rc1pisoadapt/rc1pisoadaptrenderer.cpp structured/rc1pisoadapt/rc1pisoadaptrenderer.h
38+
3639
# Directional Ambient Occlusion and Cone Shadows Ground Truth
3740
structured/rc1pcrtgt/crtgtrenderer.cpp structured/rc1pcrtgt/crtgtrenderer.h
3841

cppvolrend/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "volrendernull.h"
2222
// 1-pass - Ray Casting - GLSL
2323
#include "structured/rc1pass/rc1prenderer.h"
24+
#include "structured/rc1pisoadapt/rc1pisoadaptrenderer.h"
2425
#include "structured/rc1pcrtgt/crtgtrenderer.h"
2526
#include "structured/rc1pdosct/dosrcrenderer.h"
2627
#include "structured/rc1pextbsd/ebsrenderer.h"
@@ -57,6 +58,7 @@ int main (int argc, char **argv)
5758
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
5859
// 1-pass - Ray Casting - GLSL
5960
RenderingManager::Instance()->AddVolumeRenderer(new RayCasting1Pass());
61+
RenderingManager::Instance()->AddVolumeRenderer(new RayCasting1PassIsoAdapt());
6062
RenderingManager::Instance()->AddVolumeRenderer(new RC1PConeLightGroundTruthSteps());
6163
RenderingManager::Instance()->AddVolumeRenderer(new RC1PConeTracingDirOcclusionShading());
6264
RenderingManager::Instance()->AddVolumeRenderer(new RC1PExtinctionBasedShading());
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
StepSizeSmall,StepSizeLarge,StepSizeRange,TimePerFrame (ms),FramesPerSecond,ImageFile,SSIM
2+
0.01,0.25,0.05,54.63,18.304961,0000.png,0.999676
3+
0.01,0.25,0.1,56.51,17.695983,0001.png,0.999826
4+
0.01,0.25,0.15,59.45,16.820858,0002.png,0.999846
5+
0.01,0.25,0.2,65.22,15.33272,0003.png,0.999886
6+
0.01,0.25,0.25,80.58,12.410027,0004.png,1
7+
0.01,0.5,0.05,28.33,35.29827,0005.png,0.996657
8+
0.01,0.5,0.1,30.2,33.112583,0006.png,0.999303
9+
0.01,0.5,0.15,32.52,30.750308,0007.png,0.999794
10+
0.01,0.5,0.2,36.74,27.218291,0008.png,0.999874
11+
0.01,0.5,0.25,47.78,20.929259,0009.png,0.999973
12+
0.01,0.75,0.05,19.53,51.203277,0010.png,0.990922
13+
0.01,0.75,0.1,21.03,47.551117,0011.png,0.996815
14+
0.01,0.75,0.15,22.82,43.821209,0012.png,0.999151
15+
0.01,0.75,0.2,26.23,38.124285,0013.png,0.999768
16+
0.01,0.75,0.25,35.54,28.13731,0014.png,0.999919
17+
0.01,1.0,0.05,15.22,65.703022,0015.png,0.981849
18+
0.01,1.0,0.1,16.44,60.827251,0016.png,0.990622
19+
0.01,1.0,0.15,18.08,55.309735,0017.png,0.996066
20+
0.01,1.0,0.2,20.78,48.123195,0018.png,0.998663
21+
0.01,1.0,0.25,28.46,35.137034,0019.png,0.999784
22+
0.01,1.25,0.05,12.74,78.492936,0020.png,0.972032
23+
0.01,1.25,0.1,13.71,72.93946,0021.png,0.982644
24+
0.01,1.25,0.15,15.07,66.357001,0022.png,0.990107
25+
0.01,1.25,0.2,17.29,57.8369,0023.png,0.995363
26+
0.01,1.25,0.25,24.0,41.666667,0024.png,0.998623
27+
0.01,1.5,0.05,10.83,92.336103,0025.png,0.962472
28+
0.01,1.5,0.1,11.8,84.745763,0026.png,0.973366
29+
0.01,1.5,0.15,13.02,76.804916,0027.png,0.98197
30+
0.01,1.5,0.2,15.05,66.445183,0028.png,0.989707
31+
0.01,1.5,0.25,20.46,48.875855,0029.png,0.99579
32+
0.01,1.75,0.05,9.41,106.269926,0030.png,0.951985
33+
0.01,1.75,0.1,10.5,95.238095,0031.png,0.963262
34+
0.01,1.75,0.15,11.65,85.83691,0032.png,0.972954
35+
0.01,1.75,0.2,13.49,74.128984,0033.png,0.982014
36+
0.01,1.75,0.25,18.33,54.555374,0034.png,0.990505
37+
0.01,2.0,0.05,8.34,119.904077,0035.png,0.94338
38+
0.01,2.0,0.1,9.53,104.931794,0036.png,0.954123
39+
0.01,2.0,0.15,10.25,97.560976,0037.png,0.964068
40+
0.01,2.0,0.2,12.26,81.566069,0038.png,0.973842
41+
0.01,2.0,0.25,16.66,60.02401,0039.png,0.984166
42+
0.06,0.25,0.05,53.44,18.712575,0040.png,0.998113
43+
0.06,0.25,0.1,53.8,18.587361,0041.png,0.998232
44+
0.06,0.25,0.15,54.1,18.484288,0042.png,0.998248
45+
0.06,0.25,0.2,54.89,18.218255,0043.png,0.99824
46+
0.06,0.25,0.25,56.67,17.646021,0044.png,0.998114
47+
0.06,0.5,0.05,27.76,36.023055,0045.png,0.995304
48+
0.06,0.5,0.1,27.95,35.778175,0046.png,0.997759
49+
0.06,0.5,0.15,28.56,35.014006,0047.png,0.998217
50+
0.06,0.5,0.2,29.51,33.886818,0048.png,0.998293
51+
0.06,0.5,0.25,32.44,30.826141,0049.png,0.998175
52+
0.06,0.75,0.05,19.06,52.465897,0050.png,0.989928
53+
0.06,0.75,0.1,19.2,52.083333,0051.png,0.99552
54+
0.06,0.75,0.15,19.88,50.301811,0052.png,0.997673
55+
0.06,0.75,0.2,20.79,48.100048,0053.png,0.998129
56+
0.06,0.75,0.25,23.75,42.105263,0054.png,0.998108
57+
0.06,1.0,0.05,14.89,67.159167,0055.png,0.980959
58+
0.06,1.0,0.1,15.24,65.616798,0056.png,0.989417
59+
0.06,1.0,0.15,15.69,63.734863,0057.png,0.994581
60+
0.06,1.0,0.2,16.36,61.124694,0058.png,0.997021
61+
0.06,1.0,0.25,18.71,53.447354,0059.png,0.998095
62+
0.06,1.25,0.05,12.28,81.433225,0060.png,0.971476
63+
0.06,1.25,0.1,12.55,79.681275,0061.png,0.981756
64+
0.06,1.25,0.15,12.97,77.101002,0062.png,0.988902
65+
0.06,1.25,0.2,13.73,72.833212,0063.png,0.993966
66+
0.06,1.25,0.25,15.94,62.735257,0064.png,0.997032
67+
0.06,1.5,0.05,10.31,96.99321,0065.png,0.961927
68+
0.06,1.5,0.1,10.56,94.69697,0066.png,0.972575
69+
0.06,1.5,0.15,11.02,90.744102,0067.png,0.980996
70+
0.06,1.5,0.2,11.72,85.324232,0068.png,0.988437
71+
0.06,1.5,0.25,13.53,73.90983,0069.png,0.994149
72+
0.06,1.75,0.05,9.06,110.375276,0070.png,0.951541
73+
0.06,1.75,0.1,9.26,107.991361,0071.png,0.962561
74+
0.06,1.75,0.15,9.71,102.986612,0072.png,0.972131
75+
0.06,1.75,0.2,10.07,99.304866,0073.png,0.98102
76+
0.06,1.75,0.25,12.02,83.194676,0074.png,0.989198
77+
0.06,2.0,0.05,8.32,120.192308,0075.png,0.942953
78+
0.06,2.0,0.1,8.64,115.740741,0076.png,0.953542
79+
0.06,2.0,0.15,8.8,113.636364,0077.png,0.963267
80+
0.06,2.0,0.2,9.27,107.874865,0078.png,0.972877
81+
0.06,2.0,0.25,10.64,93.984962,0079.png,0.982895
82+
0.11,0.25,0.05,53.33,18.751172,0080.png,0.996976
83+
0.11,0.25,0.1,53.45,18.709074,0081.png,0.997033
84+
0.11,0.25,0.15,53.55,18.674136,0082.png,0.997034
85+
0.11,0.25,0.2,53.75,18.604651,0083.png,0.996946
86+
0.11,0.25,0.25,54.52,18.341893,0084.png,0.996958
87+
0.11,0.5,0.05,27.49,36.376864,0085.png,0.994583
88+
0.11,0.5,0.1,27.85,35.906643,0086.png,0.99682
89+
0.11,0.5,0.15,27.94,35.790981,0087.png,0.996998
90+
0.11,0.5,0.2,28.31,35.323207,0088.png,0.997045
91+
0.11,0.5,0.25,29.51,33.886818,0089.png,0.997044
92+
0.11,0.75,0.05,19.02,52.576236,0090.png,0.989371
93+
0.11,0.75,0.1,19.07,52.438385,0091.png,0.994651
94+
0.11,0.75,0.15,19.34,51.706308,0092.png,0.996514
95+
0.11,0.75,0.2,19.81,50.479556,0093.png,0.996901
96+
0.11,0.75,0.25,21.26,47.036689,0094.png,0.996881
97+
0.11,1.0,0.05,14.74,67.842605,0095.png,0.980529
98+
0.11,1.0,0.1,15.04,66.489362,0096.png,0.988861
99+
0.11,1.0,0.15,15.36,65.104167,0097.png,0.993832
100+
0.11,1.0,0.2,15.75,63.492063,0098.png,0.996077
101+
0.11,1.0,0.25,16.84,59.382423,0099.png,0.996908
102+
0.11,1.25,0.05,12.16,82.236842,0100.png,0.97108
103+
0.11,1.25,0.1,12.31,81.234768,0101.png,0.981096
104+
0.11,1.25,0.15,12.6,79.365079,0102.png,0.987986
105+
0.11,1.25,0.2,13.06,76.569678,0103.png,0.992897
106+
0.11,1.25,0.25,14.14,70.721358,0104.png,0.995832
107+
0.11,1.5,0.05,10.19,98.135427,0105.png,0.961661
108+
0.11,1.5,0.1,10.34,96.711799,0106.png,0.972167
109+
0.11,1.5,0.15,10.63,94.073377,0107.png,0.980316
110+
0.11,1.5,0.2,11.08,90.252708,0108.png,0.987633
111+
0.11,1.5,0.25,12.28,81.433225,0109.png,0.993304
112+
0.11,1.75,0.05,8.86,112.866817,0110.png,0.951287
113+
0.11,1.75,0.1,8.63,115.874855,0111.png,0.962176
114+
0.11,1.75,0.15,9.04,110.619469,0112.png,0.971603
115+
0.11,1.75,0.2,9.41,106.269926,0113.png,0.980168
116+
0.11,1.75,0.25,10.66,93.80863,0114.png,0.98827
117+
0.11,2.0,0.05,8.04,124.378109,0115.png,0.942686
118+
0.11,2.0,0.1,8.46,118.20331,0116.png,0.953185
119+
0.11,2.0,0.15,8.57,116.686114,0117.png,0.962736
120+
0.11,2.0,0.2,8.87,112.739572,0118.png,0.972205
121+
0.11,2.0,0.25,9.69,103.199174,0119.png,0.982099
122+
0.16,0.25,0.05,53.31,18.758207,0120.png,0.995808
123+
0.16,0.25,0.1,53.4,18.726592,0121.png,0.995702
124+
0.16,0.25,0.15,53.45,18.709074,0122.png,0.995768
125+
0.16,0.25,0.2,53.39,18.730099,0123.png,0.995682
126+
0.16,0.25,0.25,53.71,18.618507,0124.png,0.995718
127+
0.16,0.5,0.05,27.4,36.49635,0125.png,0.99381
128+
0.16,0.5,0.1,27.78,35.99712,0126.png,0.995528
129+
0.16,0.5,0.15,27.77,36.010083,0127.png,0.995593
130+
0.16,0.5,0.2,28.09,35.599858,0128.png,0.995611
131+
0.16,0.5,0.25,28.48,35.11236,0129.png,0.995614
132+
0.16,0.75,0.05,18.77,53.276505,0130.png,0.988901
133+
0.16,0.75,0.1,19.09,52.383447,0131.png,0.993727
134+
0.16,0.75,0.15,19.21,52.056221,0132.png,0.995435
135+
0.16,0.75,0.2,19.34,51.706308,0133.png,0.995631
136+
0.16,0.75,0.25,20.21,49.480455,0134.png,0.995684
137+
0.16,1.0,0.05,14.94,66.934404,0135.png,0.980139
138+
0.16,1.0,0.1,14.86,67.294751,0136.png,0.988085
139+
0.16,1.0,0.15,15.01,66.622252,0137.png,0.992747
140+
0.16,1.0,0.2,15.37,65.061809,0138.png,0.994865
141+
0.16,1.0,0.25,16.05,62.305296,0139.png,0.99551
142+
0.16,1.25,0.05,12.08,82.781457,0140.png,0.97069
143+
0.16,1.25,0.1,12.29,81.366965,0141.png,0.980368
144+
0.16,1.25,0.15,12.42,80.515298,0142.png,0.987134
145+
0.16,1.25,0.2,12.66,78.988942,0143.png,0.991892
146+
0.16,1.25,0.25,13.35,74.906367,0144.png,0.994662
147+
0.16,1.5,0.05,10.18,98.231827,0145.png,0.961414
148+
0.16,1.5,0.1,10.29,97.18173,0146.png,0.97165
149+
0.16,1.5,0.15,10.47,95.510984,0147.png,0.979676
150+
0.16,1.5,0.2,10.74,93.10987,0148.png,0.98678
151+
0.16,1.5,0.25,11.47,87.183958,0149.png,0.992204
152+
0.16,1.75,0.05,9.11,109.769484,0150.png,0.950966
153+
0.16,1.75,0.1,8.62,116.009281,0151.png,0.961572
154+
0.16,1.75,0.15,9.21,108.577633,0152.png,0.970792
155+
0.16,1.75,0.2,9.34,107.066381,0153.png,0.979323
156+
0.16,1.75,0.25,10.12,98.814229,0154.png,0.987197
157+
0.16,2.0,0.05,8.38,119.331742,0155.png,0.942567
158+
0.16,2.0,0.1,8.19,122.100122,0156.png,0.95285
159+
0.16,2.0,0.15,8.44,118.483412,0157.png,0.962194
160+
0.16,2.0,0.2,8.68,115.207373,0158.png,0.971533
161+
0.16,2.0,0.25,9.28,107.758621,0159.png,0.981184
162+
0.21,0.25,0.05,53.36,18.74063,0160.png,0.994481
163+
0.21,0.25,0.1,53.43,18.716077,0161.png,0.994242
164+
0.21,0.25,0.15,53.43,18.716077,0162.png,0.994389
165+
0.21,0.25,0.2,53.37,18.737118,0163.png,0.994533
166+
0.21,0.25,0.25,53.47,18.702076,0164.png,0.994286
167+
0.21,0.5,0.05,27.54,36.310821,0165.png,0.992945
168+
0.21,0.5,0.1,27.44,36.443149,0166.png,0.994239
169+
0.21,0.5,0.15,27.75,36.036036,0167.png,0.994315
170+
0.21,0.5,0.2,27.72,36.075036,0168.png,0.994327
171+
0.21,0.5,0.25,28.22,35.435861,0169.png,0.994404
172+
0.21,0.75,0.05,18.56,53.87931,0170.png,0.988134
173+
0.21,0.75,0.1,19.03,52.548607,0171.png,0.992662
174+
0.21,0.75,0.15,19.1,52.356021,0172.png,0.994181
175+
0.21,0.75,0.2,19.18,52.137643,0173.png,0.994229
176+
0.21,0.75,0.25,19.66,50.8647,0174.png,0.99428
177+
0.21,1.0,0.05,14.8,67.567568,0175.png,0.979666
178+
0.21,1.0,0.1,14.89,67.159167,0176.png,0.987201
179+
0.21,1.0,0.15,14.94,66.934404,0177.png,0.991718
180+
0.21,1.0,0.2,15.06,66.401062,0178.png,0.993559
181+
0.21,1.0,0.25,15.67,63.816209,0179.png,0.994131
182+
0.21,1.25,0.05,12.1,82.644628,0180.png,0.970338
183+
0.21,1.25,0.1,12.18,82.101806,0181.png,0.979753
184+
0.21,1.25,0.15,12.35,80.97166,0182.png,0.986335
185+
0.21,1.25,0.2,12.45,80.321285,0183.png,0.990858
186+
0.21,1.25,0.25,12.98,77.041602,0184.png,0.993384
187+
0.21,1.5,0.05,10.25,97.560976,0185.png,0.961003
188+
0.21,1.5,0.1,10.39,96.246391,0186.png,0.97102
189+
0.21,1.5,0.15,10.42,95.96929,0187.png,0.979003
190+
0.21,1.5,0.2,10.67,93.720712,0188.png,0.985902
191+
0.21,1.5,0.25,11.18,89.445438,0189.png,0.991085
192+
0.21,1.75,0.05,8.61,116.144019,0190.png,0.9508
193+
0.21,1.75,0.1,9.13,109.529025,0191.png,0.961241
194+
0.21,1.75,0.15,9.13,109.529025,0192.png,0.970255
195+
0.21,1.75,0.2,9.15,109.289617,0193.png,0.978823
196+
0.21,1.75,0.25,9.92,100.806452,0194.png,0.986409
197+
0.21,2.0,0.05,8.13,123.00123,0195.png,0.94228
198+
0.21,2.0,0.1,8.22,121.654501,0196.png,0.952347
199+
0.21,2.0,0.15,8.41,118.906064,0197.png,0.961575
200+
0.21,2.0,0.2,8.62,116.009281,0198.png,0.970709
201+
0.21,2.0,0.25,8.6,116.27907,0199.png,0.98025

0 commit comments

Comments
 (0)