bug fishes
|
@ -71,3 +71,18 @@
|
||||||
1342 1428 1666147894956961753 Step_2 ba935c9c2d26b32e
|
1342 1428 1666147894956961753 Step_2 ba935c9c2d26b32e
|
||||||
1 1075 1666147964142379106 CMakeFiles/Step_2.dir/src/world.cpp.o 528709b06ba304b9
|
1 1075 1666147964142379106 CMakeFiles/Step_2.dir/src/world.cpp.o 528709b06ba304b9
|
||||||
1075 1160 1666147964226380888 Step_2 ba935c9c2d26b32e
|
1075 1160 1666147964226380888 Step_2 ba935c9c2d26b32e
|
||||||
|
1 1176 1666150252074198441 CMakeFiles/Step_2.dir/src/math/colliders.cpp.o 961741316937a4a5
|
||||||
|
1 1337 1666150252238202725 CMakeFiles/Step_2.dir/src/raytracing.cpp.o f57e640d9f276756
|
||||||
|
2 1516 1666150252414207323 CMakeFiles/Step_2.dir/src/world.cpp.o 528709b06ba304b9
|
||||||
|
2 1600 1666150252498209517 CMakeFiles/Step_2.dir/src/util/models.cpp.o 507adcdc012771a9
|
||||||
|
1 1939 1666150252838218400 CMakeFiles/Step_2.dir/src/main.cpp.o 6490b92c9a765459
|
||||||
|
1939 2028 1666150252926220698 Step_2 ba935c9c2d26b32e
|
||||||
|
1 1187 1666150651777081346 CMakeFiles/Step_2.dir/src/raytracing.cpp.o f57e640d9f276756
|
||||||
|
1 1367 1666150651957086402 CMakeFiles/Step_2.dir/src/util/models.cpp.o 507adcdc012771a9
|
||||||
|
2 1369 1666150651957086402 CMakeFiles/Step_2.dir/src/world.cpp.o 528709b06ba304b9
|
||||||
|
1 1539 1666150652129091231 CMakeFiles/Step_2.dir/src/main.cpp.o 6490b92c9a765459
|
||||||
|
1539 1627 1666150652217093702 Step_2 ba935c9c2d26b32e
|
||||||
|
1 902 1666150926996912836 CMakeFiles/Step_2.dir/src/raytracing.cpp.o f57e640d9f276756
|
||||||
|
1 1036 1666150927132916751 CMakeFiles/Step_2.dir/src/world.cpp.o 528709b06ba304b9
|
||||||
|
1 1260 1666150927356923195 CMakeFiles/Step_2.dir/src/main.cpp.o 6490b92c9a765459
|
||||||
|
1260 1355 1666150927448925842 Step_2 ba935c9c2d26b32e
|
||||||
|
|
After Width: | Height: | Size: 81 KiB |
|
@ -1,3 +1,3 @@
|
||||||
Start testing: Oct 18 22:52 EDT
|
Start testing: Oct 18 23:42 EDT
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
End testing: Oct 18 22:52 EDT
|
End testing: Oct 18 23:42 EDT
|
||||||
|
|
|
@ -5,3 +5,80 @@
|
||||||
872 910 1665980922483063320 Step_2 91a91bee2cf74815
|
872 910 1665980922483063320 Step_2 91a91bee2cf74815
|
||||||
1 880 1665979635969200880 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
1 880 1665979635969200880 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
0 2189 1665979637277239946 CMakeFiles/Step_2.dir/src/image/image.cpp.o 4d16c0d3199b9aa8
|
0 2189 1665979637277239946 CMakeFiles/Step_2.dir/src/image/image.cpp.o 4d16c0d3199b9aa8
|
||||||
|
1 1112 1666150207401038752 CMakeFiles/Step_2.dir/src/globals.cpp.o 5fc3599d89d4b8a2
|
||||||
|
9 1179 1666150207469040507 CMakeFiles/Step_2.dir/src/math/colliders.cpp.o 7957915dde476a69
|
||||||
|
9 1216 1666150207509041538 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
9 1453 1666150207745047625 CMakeFiles/Step_2.dir/src/util/debug.cpp.o e1fa95ca3d6a9ce2
|
||||||
|
10 1688 1666150207981053713 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
10 1796 1666150208085056398 CMakeFiles/Step_2.dir/src/util/parser.cpp.o 4bae007146d86363
|
||||||
|
10 1827 1666150208117057223 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
8 2025 1666150208317062382 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1 2595 1666150208885077037 CMakeFiles/Step_2.dir/src/image/image.cpp.o 4d16c0d3199b9aa8
|
||||||
|
2595 2636 1666150208925078071 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1374 1666150235217759135 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1374 1416 1666150235261760279 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1185 1666150291559235224 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1185 1226 1666150291599236279 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1115 1666150303207543067 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1115 1156 1666150303251544231 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1094 1666150346056682795 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1094 1138 1666150346100683971 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1243 1666150573742900456 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1243 1284 1666150573782901569 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 890 1666150633180559711 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
0 1275 1666150633564570471 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
0 1343 1666150633632572375 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1343 1384 1666150633672573495 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1324 1666150696234332838 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1324 1367 1666150696274333968 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 894 1666150814293683426 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
1 1207 1666150814605692327 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1 1332 1666150814729695867 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1332 1373 1666150814769697008 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 914 1666150835958302077 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
1 1322 1666150836366313739 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
0 1024 1666150843462516618 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1024 1067 1666150843506517875 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1331 1666151079657324648 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1331 1374 1666151079701325924 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 872 1666151281319201524 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
0 1325 1666151281771214746 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1325 1368 1666151281811215915 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 861 1666151325328489741 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
861 903 1666151325368490914 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 858 1666151365245659632 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
858 900 1666151365285660804 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 827 1666151459548428351 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
827 868 1666151459588429527 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 848 1666151613520961287 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
848 893 1666151613564962583 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 849 1666151635229601416 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
849 890 1666151635269602595 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 825 1666151682586998614 CMakeFiles/Step_2.dir/src/raytracing.cpp.o e78f62563fb6428
|
||||||
|
0 1161 1666151682923008531 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1161 1205 1666151682967009829 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1080 1666151691303255877 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1080 1121 1666151691343257061 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1081 1666151729744390871 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1081 1121 1666151729784392052 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1064 1666151741296732075 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1064 1102 1666151741336733256 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1094 1666151768373532001 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1094 1135 1666151768413533183 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1061 1666151804658604382 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1061 1101 1666151804698605565 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1094 1666151845799820822 CMakeFiles/Step_2.dir/src/util/models.cpp.o 12734a9214cf8718
|
||||||
|
1094 1139 1666151845843822121 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1248 1666151994891921776 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1248 1290 1666151994931922751 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1089 1666152375197700511 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1 1264 1666152375373705230 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1264 1303 1666152375413706302 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1049 1666153673822386848 CMakeFiles/Step_2.dir/src/world.cpp.o 713f22c63a585103
|
||||||
|
1049 1131 1666153673902389160 Step_2 2fd6ed1a72fdaa11
|
||||||
|
0 1257 1666153944002203790 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1257 1298 1666153944042204950 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1256 1666153973791066740 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1257 1295 1666153973827067782 Step_2 2fd6ed1a72fdaa11
|
||||||
|
1 1275 1666154467458454007 CMakeFiles/Step_2.dir/src/main.cpp.o 387235f0a298f257
|
||||||
|
1275 1318 1666154467498455228 Step_2 2fd6ed1a72fdaa11
|
||||||
|
|
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 303 KiB |
After Width: | Height: | Size: 364 KiB |
After Width: | Height: | Size: 351 KiB |
After Width: | Height: | Size: 445 KiB |
|
@ -1,3 +1,3 @@
|
||||||
Start testing: Oct 17 00:28 EDT
|
Start testing: Oct 19 00:41 EDT
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
End testing: Oct 17 00:28 EDT
|
End testing: Oct 19 00:41 EDT
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
# Blender 3.3.1
|
||||||
|
# www.blender.org
|
||||||
|
mtllib cube.mtl
|
||||||
|
o Cube
|
||||||
|
v -250.000000 -250.000000 250.000000
|
||||||
|
v -250.000000 250.000000 250.000000
|
||||||
|
v -250.000000 -250.000000 -250.000000
|
||||||
|
v -250.000000 250.000000 -250.000000
|
||||||
|
v 250.000000 -250.000000 250.000000
|
||||||
|
v 250.000000 250.000000 250.000000
|
||||||
|
v 250.000000 -250.000000 -250.000000
|
||||||
|
v 250.000000 250.000000 -250.000000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
s 0
|
||||||
|
f 3/6/1 2/2/1 1/1/1
|
||||||
|
f 7/14/2 4/8/2 3/4/2
|
||||||
|
f 5/9/3 8/16/3 7/14/3
|
||||||
|
f 1/1/4 6/12/4 5/10/4
|
||||||
|
f 1/1/5 7/15/5 3/5/5
|
||||||
|
f 6/13/6 4/8/6 8/16/6
|
||||||
|
f 3/6/1 4/7/1 2/2/1
|
||||||
|
f 7/14/2 8/16/2 4/8/2
|
||||||
|
f 5/9/3 6/11/3 8/16/3
|
||||||
|
f 1/1/4 2/2/4 6/12/4
|
||||||
|
f 1/1/5 5/10/5 7/15/5
|
||||||
|
f 6/13/6 2/3/6 4/8/6
|
|
@ -0,0 +1,47 @@
|
||||||
|
# Blender 3.3.1
|
||||||
|
# www.blender.org
|
||||||
|
mtllib cubeflipped.mtl
|
||||||
|
o Cube
|
||||||
|
v -250.000000 -250.000000 250.000000
|
||||||
|
v -250.000000 250.000000 250.000000
|
||||||
|
v -250.000000 -250.000000 -250.000000
|
||||||
|
v -250.000000 250.000000 -250.000000
|
||||||
|
v 250.000000 -250.000000 250.000000
|
||||||
|
v 250.000000 250.000000 250.000000
|
||||||
|
v 250.000000 -250.000000 -250.000000
|
||||||
|
v 250.000000 250.000000 -250.000000
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
s 0
|
||||||
|
f 3/6/1 1/1/1 2/2/1
|
||||||
|
f 7/14/2 3/4/2 4/8/2
|
||||||
|
f 5/9/3 7/14/3 8/16/3
|
||||||
|
f 1/1/4 5/10/4 6/12/4
|
||||||
|
f 1/1/5 3/5/5 7/15/5
|
||||||
|
f 6/13/6 8/16/6 4/8/6
|
||||||
|
f 3/6/1 2/2/1 4/7/1
|
||||||
|
f 7/14/2 4/8/2 8/16/2
|
||||||
|
f 5/9/3 8/16/3 6/11/3
|
||||||
|
f 1/1/4 6/12/4 2/2/4
|
||||||
|
f 1/1/5 7/15/5 5/10/5
|
||||||
|
f 6/13/6 4/8/6 2/3/6
|
|
@ -0,0 +1,255 @@
|
||||||
|
# Blender 3.3.1
|
||||||
|
# www.blender.org
|
||||||
|
mtllib house.mtl
|
||||||
|
o Cube
|
||||||
|
v -0.800000 -1.000000 1.000000
|
||||||
|
v -0.800000 1.000000 1.000000
|
||||||
|
v -0.800000 -1.000000 -1.000000
|
||||||
|
v -0.800000 1.000000 -1.000000
|
||||||
|
v 0.800000 -1.000000 1.000000
|
||||||
|
v 0.800000 1.000000 1.000000
|
||||||
|
v 0.800000 -1.000000 -1.000000
|
||||||
|
v 0.800000 1.000000 -1.000000
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 2/4/1 3/8/1 1/1/1
|
||||||
|
f 4/9/2 7/13/2 3/8/2
|
||||||
|
f 8/14/3 5/11/3 7/13/3
|
||||||
|
f 6/12/4 1/2/4 5/11/4
|
||||||
|
f 7/13/5 1/3/5 3/7/5
|
||||||
|
f 4/10/6 6/12/6 8/14/6
|
||||||
|
f 2/4/1 4/9/1 3/8/1
|
||||||
|
f 4/9/2 8/14/2 7/13/2
|
||||||
|
f 8/14/3 6/12/3 5/11/3
|
||||||
|
f 6/12/4 2/5/4 1/2/4
|
||||||
|
f 7/13/5 5/11/5 1/3/5
|
||||||
|
f 4/10/6 2/6/6 6/12/6
|
||||||
|
o Cube.001
|
||||||
|
v -1.000000 1.719057 0.057522
|
||||||
|
v -1.000000 1.832386 -0.037572
|
||||||
|
v -1.000000 0.433482 -1.474567
|
||||||
|
v -1.000000 0.546811 -1.569661
|
||||||
|
v 1.000000 1.719057 0.057522
|
||||||
|
v 1.000000 1.832386 -0.037572
|
||||||
|
v 1.000000 0.433482 -1.474567
|
||||||
|
v 1.000000 0.546811 -1.569661
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.6428 -0.7660
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 0.6428 0.7660
|
||||||
|
vn -0.0000 -0.7660 0.6428
|
||||||
|
vn -0.0000 0.7660 -0.6428
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 10/18/7 11/22/7 9/15/7
|
||||||
|
f 12/23/8 15/27/8 11/22/8
|
||||||
|
f 16/28/9 13/25/9 15/27/9
|
||||||
|
f 14/26/10 9/16/10 13/25/10
|
||||||
|
f 15/27/11 9/17/11 11/21/11
|
||||||
|
f 12/24/12 14/26/12 16/28/12
|
||||||
|
f 10/18/7 12/23/7 11/22/7
|
||||||
|
f 12/23/8 16/28/8 15/27/8
|
||||||
|
f 16/28/9 14/26/9 13/25/9
|
||||||
|
f 14/26/10 10/19/10 9/16/10
|
||||||
|
f 15/27/11 13/25/11 9/17/11
|
||||||
|
f 12/24/12 10/20/12 14/26/12
|
||||||
|
o Cube.002
|
||||||
|
v -1.000000 0.433482 1.461952
|
||||||
|
v -1.000000 0.546811 1.557046
|
||||||
|
v -1.000000 1.719057 -0.070137
|
||||||
|
v -1.000000 1.832386 0.024957
|
||||||
|
v 1.000000 0.433482 1.461952
|
||||||
|
v 1.000000 0.546811 1.557046
|
||||||
|
v 1.000000 1.719057 -0.070137
|
||||||
|
v 1.000000 1.832386 0.024957
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 0.6428 -0.7660
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.6428 0.7660
|
||||||
|
vn -0.0000 -0.7660 -0.6428
|
||||||
|
vn -0.0000 0.7660 0.6428
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 18/32/13 19/36/13 17/29/13
|
||||||
|
f 20/37/14 23/41/14 19/36/14
|
||||||
|
f 24/42/15 21/39/15 23/41/15
|
||||||
|
f 22/40/16 17/30/16 21/39/16
|
||||||
|
f 23/41/17 17/31/17 19/35/17
|
||||||
|
f 20/38/18 22/40/18 24/42/18
|
||||||
|
f 18/32/13 20/37/13 19/36/13
|
||||||
|
f 20/37/14 24/42/14 23/41/14
|
||||||
|
f 24/42/15 22/40/15 21/39/15
|
||||||
|
f 22/40/16 18/33/16 17/30/16
|
||||||
|
f 23/41/17 21/39/17 17/31/17
|
||||||
|
f 20/38/18 18/34/18 22/40/18
|
||||||
|
o Cube.003
|
||||||
|
v 0.787552 -0.999883 0.157434
|
||||||
|
v 0.787552 -0.426687 0.157434
|
||||||
|
v 0.787552 -0.999883 -0.157434
|
||||||
|
v 0.787552 -0.426687 -0.157434
|
||||||
|
v 0.836243 -0.999883 0.157434
|
||||||
|
v 0.836243 -0.426687 0.157434
|
||||||
|
v 0.836243 -0.999883 -0.157434
|
||||||
|
v 0.836243 -0.426687 -0.157434
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 26/46/19 27/50/19 25/43/19
|
||||||
|
f 28/51/20 31/55/20 27/50/20
|
||||||
|
f 32/56/21 29/53/21 31/55/21
|
||||||
|
f 30/54/22 25/44/22 29/53/22
|
||||||
|
f 31/55/23 25/45/23 27/49/23
|
||||||
|
f 28/52/24 30/54/24 32/56/24
|
||||||
|
f 26/46/19 28/51/19 27/50/19
|
||||||
|
f 28/51/20 32/56/20 31/55/20
|
||||||
|
f 32/56/21 30/54/21 29/53/21
|
||||||
|
f 30/54/22 26/47/22 25/44/22
|
||||||
|
f 31/55/23 29/53/23 25/45/23
|
||||||
|
f 28/52/24 26/48/24 30/54/24
|
||||||
|
o Cube.004
|
||||||
|
v 0.787552 -0.090162 0.721031
|
||||||
|
v 0.787552 0.409838 0.721031
|
||||||
|
v 0.787552 -0.090162 0.221031
|
||||||
|
v 0.787552 0.409838 0.221031
|
||||||
|
v 0.836243 -0.090162 0.721031
|
||||||
|
v 0.836243 0.409838 0.721031
|
||||||
|
v 0.836243 -0.090162 0.221031
|
||||||
|
v 0.836243 0.409838 0.221031
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 34/60/25 35/64/25 33/57/25
|
||||||
|
f 36/65/26 39/69/26 35/64/26
|
||||||
|
f 40/70/27 37/67/27 39/69/27
|
||||||
|
f 38/68/28 33/58/28 37/67/28
|
||||||
|
f 39/69/29 33/59/29 35/63/29
|
||||||
|
f 36/66/30 38/68/30 40/70/30
|
||||||
|
f 34/60/25 36/65/25 35/64/25
|
||||||
|
f 36/65/26 40/70/26 39/69/26
|
||||||
|
f 40/70/27 38/68/27 37/67/27
|
||||||
|
f 38/68/28 34/61/28 33/58/28
|
||||||
|
f 39/69/29 37/67/29 33/59/29
|
||||||
|
f 36/66/30 34/62/30 38/68/30
|
||||||
|
o Cube.005
|
||||||
|
v 0.787552 -0.090162 -0.227981
|
||||||
|
v 0.787552 0.409838 -0.227981
|
||||||
|
v 0.787552 -0.090162 -0.727981
|
||||||
|
v 0.787552 0.409838 -0.727981
|
||||||
|
v 0.836243 -0.090162 -0.227981
|
||||||
|
v 0.836243 0.409838 -0.227981
|
||||||
|
v 0.836243 -0.090162 -0.727981
|
||||||
|
v 0.836243 0.409838 -0.727981
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
s 0
|
||||||
|
f 42/74/31 43/78/31 41/71/31
|
||||||
|
f 44/79/32 47/83/32 43/78/32
|
||||||
|
f 48/84/33 45/81/33 47/83/33
|
||||||
|
f 46/82/34 41/72/34 45/81/34
|
||||||
|
f 47/83/35 41/73/35 43/77/35
|
||||||
|
f 44/80/36 46/82/36 48/84/36
|
||||||
|
f 42/74/31 44/79/31 43/78/31
|
||||||
|
f 44/79/32 48/84/32 47/83/32
|
||||||
|
f 48/84/33 46/82/33 45/81/33
|
||||||
|
f 46/82/34 42/75/34 41/72/34
|
||||||
|
f 47/83/35 45/81/35 41/73/35
|
||||||
|
f 44/80/36 42/76/36 46/82/36
|
|
@ -45,24 +45,25 @@ namespace Raytracing {
|
||||||
std::vector<Triangle> triangles;
|
std::vector<Triangle> triangles;
|
||||||
ModelData& data;
|
ModelData& data;
|
||||||
// basically we have to store this crap here because c++ loves to copy stuff
|
// basically we have to store this crap here because c++ loves to copy stuff
|
||||||
std::vector<Object*> createdTreeObjects;
|
//std::vector<Object*> createdTreeObjects{};
|
||||||
BVHTree* tree;
|
//BVHTree* tree = nullptr;
|
||||||
public:
|
public:
|
||||||
ModelObject(const Vec4& position, ModelData& data, Material* material): Object(material, position), data(data) {
|
ModelObject(const Vec4& position, ModelData& data, Material* material): Object(material, position), data(data) {
|
||||||
// since all of this occurs before the main ray tracing algorithm it's fine to do sequentially
|
// since all of this occurs before the main ray tracing algorithm it's fine to do sequentially
|
||||||
triangles = data.toTriangles();
|
triangles = data.toTriangles();
|
||||||
this->aabb = data.aabb;
|
this->aabb = data.aabb;
|
||||||
createdTreeObjects = Raytracing::ModelData::createBVHTree(triangles, position);
|
//createdTreeObjects = Raytracing::ModelData::createBVHTree(triangles, position);
|
||||||
tree = new BVHTree(createdTreeObjects);
|
//tree = new BVHTree(createdTreeObjects);
|
||||||
}
|
}
|
||||||
[[nodiscard]] virtual HitData checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const;
|
[[nodiscard]] virtual HitData checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const;
|
||||||
virtual Object* clone() {
|
virtual Object* clone() {
|
||||||
return new ModelObject(position, data, material);
|
return new ModelObject(position, data, material);
|
||||||
}
|
}
|
||||||
virtual ~ModelObject() {
|
virtual ~ModelObject() {
|
||||||
for (auto* p : createdTreeObjects)
|
// Disabled for now, causing bugs when on release mode.
|
||||||
delete(p);
|
//for (auto* p : createdTreeObjects)
|
||||||
delete(tree);
|
// delete(p);
|
||||||
|
//delete(tree);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ namespace Raytracing {
|
||||||
* saving on computation
|
* saving on computation
|
||||||
*/
|
*/
|
||||||
// TODO: the above todo has been done, now we need to test the performance advantage of the BVH
|
// TODO: the above todo has been done, now we need to test the performance advantage of the BVH
|
||||||
BVHTree* bvhTree = nullptr;
|
//BVHTree* bvhTree = nullptr;
|
||||||
std::unordered_map<std::string, Material*> materials;
|
std::unordered_map<std::string, Material*> materials;
|
||||||
public:
|
public:
|
||||||
World() = default;
|
World() = default;
|
||||||
|
|
|
@ -44,11 +44,12 @@ int main(int argc, char** args) {
|
||||||
// not perfect (contains duplicates) but good enough.
|
// not perfect (contains duplicates) but good enough.
|
||||||
parser.printAllInInfo();
|
parser.printAllInInfo();
|
||||||
|
|
||||||
Raytracing::Image image(445, 256);
|
//Raytracing::Image image(445, 256);
|
||||||
|
Raytracing::Image image(910, 512);
|
||||||
|
|
||||||
Raytracing::Camera camera(90, image);
|
Raytracing::Camera camera(90, image);
|
||||||
//camera.setPosition({0, 0, 1});
|
//camera.setPosition({0, 0, 1});
|
||||||
camera.lookAt(Raytracing::Vec4(-3,3,3), Raytracing::Vec4(0, 0, 0), Raytracing::Vec4(0, 1, 0));
|
camera.lookAt(Raytracing::Vec4(-2,2,2), Raytracing::Vec4(0, 0, 0), Raytracing::Vec4(0, 1, 0));
|
||||||
|
|
||||||
Raytracing::World world;
|
Raytracing::World world;
|
||||||
|
|
||||||
|
@ -66,17 +67,18 @@ int main(int argc, char** args) {
|
||||||
|
|
||||||
//world.add(new Raytracing::SphereObject(Raytracing::vec4(0,0,-1,0), 0.5, world.getMaterial("redDiffuse")));
|
//world.add(new Raytracing::SphereObject(Raytracing::vec4(0,0,-1,0), 0.5, world.getMaterial("redDiffuse")));
|
||||||
//world.add(new Raytracing::SphereObject(Raytracing::vec4(-1,0,-1,0), 0.5, world.getMaterial("blueMetal")));
|
//world.add(new Raytracing::SphereObject(Raytracing::vec4(-1,0,-1,0), 0.5, world.getMaterial("blueMetal")));
|
||||||
//world.add(new Raytracing::SphereObject(Raytracing::vec4(1,0,-1,0), 0.5, world.getMaterial("redMetal")));
|
//world.add(new Raytracing::SphereObject(Raytracing::Vec4(1,0,-1,0), 0.5, world.getMaterial("redMetal")));
|
||||||
world.add(new Raytracing::SphereObject(Raytracing::Vec4(0,-100.5,-1,0), 100, world.getMaterial("greenDiffuse")));
|
world.add(new Raytracing::SphereObject(Raytracing::Vec4(0,-100.5,-1,0), 100, world.getMaterial("greenDiffuse")));
|
||||||
//world.add(new Raytracing::TriangleObject(Raytracing::vec4(0,0.1,-0.5f,0), {{-0.5, -0.5, 0.0}, {0.5, -0.5, 0.0}, {0.0, 0.5, 0}}, world.getMaterial("greenDiffuse")));
|
//world.add(new Raytracing::TriangleObject(Raytracing::Vec4(0,0.1,-0.5f,0), {{-0.5, -0.5, 0.0}, {0.5, -0.5, 0.0}, {0.0, 0.5, 0}}, world.getMaterial("greenDiffuse")));
|
||||||
world.add(new Raytracing::ModelObject({0, 0, -1}, spider, world.getMaterial("redDiffuse")));
|
world.add(new Raytracing::ModelObject({0, 1, -1}, spider, world.getMaterial("redDiffuse")));
|
||||||
world.add(new Raytracing::ModelObject({2, 0, 0}, house, world.getMaterial("blueDiffuse")));
|
world.add(new Raytracing::ModelObject({2, 0, 0}, house, world.getMaterial("blueDiffuse")));
|
||||||
world.add(new Raytracing::ModelObject({5, 0, 0}, house, world.getMaterial("blueDiffuse")));
|
world.add(new Raytracing::ModelObject({5, 5, -10}, house, world.getMaterial("blueDiffuse")));
|
||||||
world.add(new Raytracing::ModelObject({5, 0, -5}, house, world.getMaterial("blueDiffuse")));
|
world.add(new Raytracing::ModelObject({5, 0, -10}, house, world.getMaterial("blueDiffuse")));
|
||||||
world.add(new Raytracing::ModelObject({-5, 5, 5}, house, world.getMaterial("blueDiffuse")));
|
world.add(new Raytracing::ModelObject({5, 5, 0}, house, world.getMaterial("blueDiffuse")));
|
||||||
|
|
||||||
Raytracing::Raycaster raycaster {camera, image, world, parser};
|
Raytracing::Raycaster raycaster {camera, image, world, parser};
|
||||||
|
|
||||||
|
ilog << "Running raycaster!\n";
|
||||||
raycaster.run();
|
raycaster.run();
|
||||||
|
|
||||||
Raytracing::ImageOutput imageOutput(image);
|
Raytracing::ImageOutput imageOutput(image);
|
||||||
|
@ -95,6 +97,7 @@ int main(int argc, char** args) {
|
||||||
timeString << now->tm_min;
|
timeString << now->tm_min;
|
||||||
timeString << ":";
|
timeString << ":";
|
||||||
timeString << now->tm_sec;
|
timeString << now->tm_sec;
|
||||||
|
ilog << "Writing Image!\n";
|
||||||
imageOutput.write(parser.getOptionValue("--output") + timeString.str(), parser.getOptionValue("--format"));
|
imageOutput.write(parser.getOptionValue("--output") + timeString.str(), parser.getOptionValue("--format"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -69,6 +69,7 @@ namespace Raytracing {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sources for designing these various algorithms
|
* Sources for designing these various algorithms
|
||||||
|
* TODO: test these methods for performance
|
||||||
* https://www.realtimerendering.com/intersections.html
|
* https://www.realtimerendering.com/intersections.html
|
||||||
* https://web.archive.org/web/20090803054252/http://tog.acm.org/resources/GraphicsGems/gems/RayBox.c
|
* https://web.archive.org/web/20090803054252/http://tog.acm.org/resources/GraphicsGems/gems/RayBox.c
|
||||||
* https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-box-intersection
|
* https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-box-intersection
|
||||||
|
@ -79,6 +80,7 @@ namespace Raytracing {
|
||||||
bool AABB::simpleSlabRayAABBMethod(const Ray& ray, PRECISION_TYPE tmin, PRECISION_TYPE tmax){
|
bool AABB::simpleSlabRayAABBMethod(const Ray& ray, PRECISION_TYPE tmin, PRECISION_TYPE tmax){
|
||||||
// branch less design
|
// branch less design
|
||||||
// adapted from 2d to fit our 3d scene.
|
// adapted from 2d to fit our 3d scene.
|
||||||
|
// (turns out this is actually a pretty standard design, but could use some optimization)
|
||||||
PRECISION_TYPE tx1 = (min.x() - ray.getStartingPoint().x())*ray.getInverseDirection().x();
|
PRECISION_TYPE tx1 = (min.x() - ray.getStartingPoint().x())*ray.getInverseDirection().x();
|
||||||
PRECISION_TYPE tx2 = (max.x() - ray.getStartingPoint().x())*ray.getInverseDirection().x();
|
PRECISION_TYPE tx2 = (max.x() - ray.getStartingPoint().x())*ray.getInverseDirection().x();
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,7 @@ namespace Raytracing {
|
||||||
return {0,0,0};
|
return {0,0,0};
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec4 dir = ray.getDirection().normalize();
|
// skybox color
|
||||||
auto t = 0.5f * (dir.y() + 1.0);
|
return {0.5, 0.7, 1.0};
|
||||||
return (1.0 - t) * Vec4(1.0, 1.0, 1.0) + t * Vec4(0.5, 0.7, 1.0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,6 +13,7 @@ Raytracing::ModelData Raytracing::OBJLoader::loadModel(std::string file) {
|
||||||
modelFile.open(file);
|
modelFile.open(file);
|
||||||
std::stringstream modelSource;
|
std::stringstream modelSource;
|
||||||
|
|
||||||
|
std::cout.flush();
|
||||||
// read the entire file into a string
|
// read the entire file into a string
|
||||||
modelSource << modelFile.rdbuf();
|
modelSource << modelFile.rdbuf();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Raytracing {
|
||||||
delete (p);
|
delete (p);
|
||||||
for (const auto& p: materials)
|
for (const auto& p: materials)
|
||||||
delete (p.second);
|
delete (p.second);
|
||||||
delete(bvhTree);
|
//delete(bvhTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
HitData SphereObject::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
HitData SphereObject::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
||||||
|
@ -57,7 +57,7 @@ namespace Raytracing {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<HitData, Object*> World::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
std::pair<HitData, Object*> World::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
||||||
if (bvhTree != nullptr){
|
/*if (bvhTree != nullptr){
|
||||||
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
||||||
Object* objPtr = nullptr;
|
Object* objPtr = nullptr;
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ namespace Raytracing {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {hResult, objPtr};
|
return {hResult, objPtr};
|
||||||
} else {
|
} else {*/
|
||||||
// rejection algo without using a binary space partitioning data structure
|
// rejection algo without using a binary space partitioning data structure
|
||||||
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
||||||
Object* objPtr = nullptr;
|
Object* objPtr = nullptr;
|
||||||
|
@ -100,11 +100,11 @@ namespace Raytracing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {hResult, objPtr};
|
return {hResult, objPtr};
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::generateBVH() {
|
void World::generateBVH() {
|
||||||
bvhTree = new BVHTree(objects);
|
//bvhTree = new BVHTree(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScatterResults DiffuseMaterial::scatter(const Ray& ray, const HitData& hitData) const {
|
ScatterResults DiffuseMaterial::scatter(const Ray& ray, const HitData& hitData) const {
|
||||||
|
@ -161,7 +161,8 @@ namespace Raytracing {
|
||||||
|
|
||||||
// At this stage we can compute t to find out where the intersection point is on the line.
|
// At this stage we can compute t to find out where the intersection point is on the line.
|
||||||
PRECISION_TYPE t = f * Vec4::dot(edge2, q);
|
PRECISION_TYPE t = f * Vec4::dot(edge2, q);
|
||||||
if (t > EPSILON) {
|
// keep t in reasonable bounds, ensuring we respect depth
|
||||||
|
if (t > EPSILON && t >= min && t <= max) {
|
||||||
// ray intersects
|
// ray intersects
|
||||||
Vec4 rayIntersectionPoint = ray.along(t);
|
Vec4 rayIntersectionPoint = ray.along(t);
|
||||||
Vec4 normal;
|
Vec4 normal;
|
||||||
|
@ -183,13 +184,24 @@ namespace Raytracing {
|
||||||
}
|
}
|
||||||
|
|
||||||
HitData ModelObject::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
HitData ModelObject::checkIfHit(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) const {
|
||||||
/*auto hResult = HitData{false, Vec4(), Vec4(), max};
|
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
||||||
for (const Triangle& t : triangles) {
|
for (const Triangle& t : triangles) {
|
||||||
auto cResult = checkIfTriangleGotHit(t, position, ray, min, hResult.length);
|
auto cResult = checkIfTriangleGotHit(t, position, ray, min, hResult.length);
|
||||||
if (cResult.hit)
|
if (cResult.hit)
|
||||||
hResult = cResult;
|
hResult = cResult;
|
||||||
}*/
|
}
|
||||||
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
// if you've made it to this point this will be in the parallel step version
|
||||||
|
// I've run out of time to mess with this
|
||||||
|
// and I hate that he made this due in the middle of exam / assignment season
|
||||||
|
// it's really hard for me to get in there and obsess over this
|
||||||
|
// when i got 4 other classes cram-ing as much useless bullshit into the next week and a half for no reason other than
|
||||||
|
// "hahahahha I rambled about nonsense in class for the last few weeks let's test your knowledge with a tedious assignment!!! woooooo!!!!!"
|
||||||
|
// this is honestly the only good 3rd year class I've taken so far
|
||||||
|
// Only if I had more time. THINK OF THE GRAPHS I COULD'VE MADE!!!
|
||||||
|
// I had plans (and still do) to make graphs of every little performance bottleneck
|
||||||
|
// but it's impossible when you got all this stuff due, C++ decides it hates you and wants to segfault for dumb reasons, and the program takes 20 MINUTES TO RUN!
|
||||||
|
// would've been able to get the GUI stuff in and fix the BVH by visualizing the bounding boxes
|
||||||
|
/*auto hResult = HitData{false, Vec4(), Vec4(), max};
|
||||||
|
|
||||||
auto intersected = tree->rayIntersect(ray, min, max);
|
auto intersected = tree->rayIntersect(ray, min, max);
|
||||||
|
|
||||||
|
@ -200,7 +212,7 @@ namespace Raytracing {
|
||||||
auto cResult = checkIfTriangleGotHit(((EmptyObject*)(t))->tri, position, ray, min, hResult.length);
|
auto cResult = checkIfTriangleGotHit(((EmptyObject*)(t))->tri, position, ray, min, hResult.length);
|
||||||
if (cResult.hit)
|
if (cResult.hit)
|
||||||
hResult = cResult;
|
hResult = cResult;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return hResult;
|
return hResult;
|
||||||
}
|
}
|
||||||
|
|