Basic physics with boxes

This commit is contained in:
grayson committed 2021-10-25 00:40:44 -05:00
1 parent 1d97a6f543
commit b4c704f5ec
259 files changed
+48478 -91

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
-200
View File
@@ -1,200 +0,0 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
mtllib cone.mtl
o Cone
v 0.000000 -1.000000 -1.000000
v 0.195090 -1.000000 -0.980785
v 0.382683 -1.000000 -0.923880
v 0.555570 -1.000000 -0.831470
v 0.707107 -1.000000 -0.707107
v 0.831470 -1.000000 -0.555570
v 0.923880 -1.000000 -0.382683
v 0.980785 -1.000000 -0.195090
v 1.000000 -1.000000 0.000000
v 0.980785 -1.000000 0.195090
v 0.923880 -1.000000 0.382683
v 0.831470 -1.000000 0.555570
v 0.707107 -1.000000 0.707107
v 0.555570 -1.000000 0.831470
v 0.382683 -1.000000 0.923880
v 0.195090 -1.000000 0.980785
v -0.000000 -1.000000 1.000000
v -0.195090 -1.000000 0.980785
v -0.382683 -1.000000 0.923880
v -0.555570 -1.000000 0.831470
v -0.707107 -1.000000 0.707107
v -0.831469 -1.000000 0.555570
v -0.923880 -1.000000 0.382684
v -0.980785 -1.000000 0.195090
v -1.000000 -1.000000 -0.000000
v -0.980785 -1.000000 -0.195090
v -0.923879 -1.000000 -0.382684
v -0.831470 -1.000000 -0.555570
v -0.707107 -1.000000 -0.707107
v -0.555570 -1.000000 -0.831470
v -0.382683 -1.000000 -0.923880
v -0.195090 -1.000000 -0.980785
v 0.000000 1.000000 0.000000
vt 0.250000 0.490000
vt 0.250000 0.250000
vt 0.296822 0.485388
vt 0.341844 0.471731
vt 0.383337 0.449553
vt 0.419706 0.419706
vt 0.449553 0.383337
vt 0.471731 0.341844
vt 0.485388 0.296822
vt 0.490000 0.250000
vt 0.485388 0.203178
vt 0.471731 0.158156
vt 0.449553 0.116663
vt 0.419706 0.080294
vt 0.383337 0.050447
vt 0.341844 0.028269
vt 0.296822 0.014612
vt 0.250000 0.010000
vt 0.203178 0.014612
vt 0.158156 0.028269
vt 0.116663 0.050447
vt 0.080294 0.080294
vt 0.050447 0.116663
vt 0.028269 0.158156
vt 0.014612 0.203178
vt 0.010000 0.250000
vt 0.014612 0.296822
vt 0.028269 0.341844
vt 0.050447 0.383337
vt 0.080294 0.419706
vt 0.116663 0.449553
vt 0.158156 0.471731
vt 0.985388 0.296822
vt 0.796822 0.014612
vt 0.514612 0.203178
vt 0.203178 0.485388
vt 0.703178 0.485388
vt 0.750000 0.490000
vt 0.796822 0.485388
vt 0.841844 0.471731
vt 0.883337 0.449553
vt 0.919706 0.419706
vt 0.949553 0.383337
vt 0.971731 0.341844
vt 0.990000 0.250000
vt 0.985388 0.203178
vt 0.971731 0.158156
vt 0.949553 0.116663
vt 0.919706 0.080294
vt 0.883337 0.050447
vt 0.841844 0.028269
vt 0.750000 0.010000
vt 0.703178 0.014612
vt 0.658156 0.028269
vt 0.616663 0.050447
vt 0.580294 0.080294
vt 0.550447 0.116663
vt 0.528269 0.158156
vt 0.510000 0.250000
vt 0.514612 0.296822
vt 0.528269 0.341844
vt 0.550447 0.383337
vt 0.580294 0.419706
vt 0.616663 0.449553
vt 0.658156 0.471731
vn 0.0000 0.4472 -0.8944
vn 0.0000 1.0000 0.0000
vn 0.1745 0.4472 -0.8772
vn 0.3423 0.4472 -0.8263
vn 0.4969 0.4472 -0.7437
vn 0.6325 0.4472 -0.6325
vn 0.7437 0.4472 -0.4969
vn 0.8263 0.4472 -0.3423
vn 0.8772 0.4472 -0.1745
vn 0.8944 0.4472 0.0000
vn 0.8772 0.4472 0.1745
vn 0.8263 0.4472 0.3423
vn 0.7437 0.4472 0.4969
vn 0.6325 0.4472 0.6325
vn 0.4969 0.4472 0.7437
vn 0.3423 0.4472 0.8263
vn 0.1745 0.4472 0.8772
vn -0.0000 0.4472 0.8944
vn -0.1745 0.4472 0.8772
vn -0.3423 0.4472 0.8263
vn -0.4969 0.4472 0.7437
vn -0.6325 0.4472 0.6325
vn -0.7437 0.4472 0.4969
vn -0.8263 0.4472 0.3423
vn -0.8772 0.4472 0.1745
vn -0.8944 0.4472 0.0000
vn -0.8772 0.4472 -0.1745
vn -0.8263 0.4472 -0.3423
vn -0.7437 0.4472 -0.4969
vn -0.6325 0.4472 -0.6325
vn -0.4969 0.4472 -0.7437
vn -0.3423 0.4472 -0.8263
vn 0.0000 -1.0000 0.0000
vn -0.1745 0.4472 -0.8772
usemtl None
s 1
f 1/1/1 33/2/2 2/3/3
f 2/3/3 33/2/2 3/4/4
f 3/4/4 33/2/2 4/5/5
f 4/5/5 33/2/2 5/6/6
f 5/6/6 33/2/2 6/7/7
f 6/7/7 33/2/2 7/8/8
f 7/8/8 33/2/2 8/9/9
f 8/9/9 33/2/2 9/10/10
f 9/10/10 33/2/2 10/11/11
f 10/11/11 33/2/2 11/12/12
f 11/12/12 33/2/2 12/13/13
f 12/13/13 33/2/2 13/14/14
f 13/14/14 33/2/2 14/15/15
f 14/15/15 33/2/2 15/16/16
f 15/16/16 33/2/2 16/17/17
f 16/17/17 33/2/2 17/18/18
f 17/18/18 33/2/2 18/19/19
f 18/19/19 33/2/2 19/20/20
f 19/20/20 33/2/2 20/21/21
f 20/21/21 33/2/2 21/22/22
f 21/22/22 33/2/2 22/23/23
f 22/23/23 33/2/2 23/24/24
f 23/24/24 33/2/2 24/25/25
f 24/25/25 33/2/2 25/26/26
f 25/26/26 33/2/2 26/27/27
f 26/27/27 33/2/2 27/28/28
f 27/28/28 33/2/2 28/29/29
f 28/29/29 33/2/2 29/30/30
f 29/30/30 33/2/2 30/31/31
f 30/31/31 33/2/2 31/32/32
f 8/33/33 16/34/33 24/35/33
f 31/32/32 33/2/2 32/36/34
f 32/36/34 33/2/2 1/1/1
f 32/37/33 1/38/33 2/39/33
f 2/39/33 3/40/33 4/41/33
f 4/41/33 5/42/33 6/43/33
f 6/43/33 7/44/33 8/33/33
f 8/33/33 9/45/33 10/46/33
f 10/46/33 11/47/33 12/48/33
f 12/48/33 13/49/33 14/50/33
f 14/50/33 15/51/33 16/34/33
f 16/34/33 17/52/33 18/53/33
f 18/53/33 19/54/33 20/55/33
f 20/55/33 21/56/33 22/57/33
f 22/57/33 23/58/33 24/35/33
f 24/35/33 25/59/33 26/60/33
f 26/60/33 27/61/33 24/35/33
f 27/61/33 28/62/33 24/35/33
f 28/62/33 29/63/33 30/64/33
f 30/64/33 31/65/33 28/62/33
f 31/65/33 32/37/33 28/62/33
f 32/37/33 2/39/33 8/33/33
f 2/39/33 4/41/33 8/33/33
f 4/41/33 6/43/33 8/33/33
f 8/33/33 10/46/33 12/48/33
f 12/48/33 14/50/33 8/33/33
f 14/50/33 16/34/33 8/33/33
f 16/34/33 18/53/33 24/35/33
f 18/53/33 20/55/33 24/35/33
f 20/55/33 22/57/33 24/35/33
f 24/35/33 28/62/33 32/37/33
f 32/37/33 8/33/33 24/35/33
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
-46
View File
@@ -1,46 +0,0 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
mtllib cube.mtl
o Cube_Cube.001
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.625000 0.250000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.375000 0.750000
vt 0.625000 0.750000
vt 0.375000 1.000000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.875000 0.500000
vt 0.625000 1.000000
vt 0.875000 0.750000
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
usemtl None
s off
f 2/1/1 3/2/1 1/3/1
f 4/4/2 7/5/2 3/2/2
f 8/6/3 5/7/3 7/5/3
f 6/8/4 1/9/4 5/7/4
f 7/5/5 1/10/5 3/11/5
f 4/12/6 6/8/6 8/6/6
f 2/1/1 4/4/1 3/2/1
f 4/4/2 8/6/2 7/5/2
f 8/6/3 6/8/3 5/7/3
f 6/8/4 2/13/4 1/9/4
f 7/5/5 5/7/5 1/10/5
f 4/12/6 2/14/6 6/8/6
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
-358
View File
@@ -1,358 +0,0 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
mtllib cylinder.mtl
o Cylinder_Cylinder.001
v 0.000000 -1.000000 -1.000000
v 0.000000 1.000000 -1.000000
v 0.195090 -1.000000 -0.980785
v 0.195090 1.000000 -0.980785
v 0.382683 -1.000000 -0.923880
v 0.382683 1.000000 -0.923880
v 0.555570 -1.000000 -0.831470
v 0.555570 1.000000 -0.831470
v 0.707107 -1.000000 -0.707107
v 0.707107 1.000000 -0.707107
v 0.831470 -1.000000 -0.555570
v 0.831470 1.000000 -0.555570
v 0.923880 -1.000000 -0.382683
v 0.923880 1.000000 -0.382683
v 0.980785 -1.000000 -0.195090
v 0.980785 1.000000 -0.195090
v 1.000000 -1.000000 0.000000
v 1.000000 1.000000 0.000000
v 0.980785 -1.000000 0.195090
v 0.980785 1.000000 0.195090
v 0.923880 -1.000000 0.382683
v 0.923880 1.000000 0.382683
v 0.831470 -1.000000 0.555570
v 0.831470 1.000000 0.555570
v 0.707107 -1.000000 0.707107
v 0.707107 1.000000 0.707107
v 0.555570 -1.000000 0.831470
v 0.555570 1.000000 0.831470
v 0.382683 -1.000000 0.923880
v 0.382683 1.000000 0.923880
v 0.195090 -1.000000 0.980785
v 0.195090 1.000000 0.980785
v -0.000000 -1.000000 1.000000
v -0.000000 1.000000 1.000000
v -0.195090 -1.000000 0.980785
v -0.195090 1.000000 0.980785
v -0.382683 -1.000000 0.923880
v -0.382683 1.000000 0.923880
v -0.555570 -1.000000 0.831470
v -0.555570 1.000000 0.831470
v -0.707107 -1.000000 0.707107
v -0.707107 1.000000 0.707107
v -0.831469 -1.000000 0.555570
v -0.831469 1.000000 0.555570
v -0.923880 -1.000000 0.382684
v -0.923880 1.000000 0.382684
v -0.980785 -1.000000 0.195090
v -0.980785 1.000000 0.195090
v -1.000000 -1.000000 -0.000000
v -1.000000 1.000000 -0.000000
v -0.980785 -1.000000 -0.195090
v -0.980785 1.000000 -0.195090
v -0.923879 -1.000000 -0.382684
v -0.923879 1.000000 -0.382684
v -0.831470 -1.000000 -0.555570
v -0.831470 1.000000 -0.555570
v -0.707107 -1.000000 -0.707107
v -0.707107 1.000000 -0.707107
v -0.555570 -1.000000 -0.831470
v -0.555570 1.000000 -0.831470
v -0.382683 -1.000000 -0.923880
v -0.382683 1.000000 -0.923880
v -0.195090 -1.000000 -0.980785
v -0.195090 1.000000 -0.980785
vt 1.000000 1.000000
vt 0.968750 0.500000
vt 1.000000 0.500000
vt 0.968750 1.000000
vt 0.937500 0.500000
vt 0.937500 1.000000
vt 0.906250 0.500000
vt 0.906250 1.000000
vt 0.875000 0.500000
vt 0.875000 1.000000
vt 0.843750 0.500000
vt 0.843750 1.000000
vt 0.812500 0.500000
vt 0.812500 1.000000
vt 0.781250 0.500000
vt 0.781250 1.000000
vt 0.750000 0.500000
vt 0.750000 1.000000
vt 0.718750 0.500000
vt 0.718750 1.000000
vt 0.687500 0.500000
vt 0.687500 1.000000
vt 0.656250 0.500000
vt 0.656250 1.000000
vt 0.625000 0.500000
vt 0.625000 1.000000
vt 0.593750 0.500000
vt 0.593750 1.000000
vt 0.562500 0.500000
vt 0.562500 1.000000
vt 0.531250 0.500000
vt 0.531250 1.000000
vt 0.500000 0.500000
vt 0.500000 1.000000
vt 0.468750 0.500000
vt 0.468750 1.000000
vt 0.437500 0.500000
vt 0.437500 1.000000
vt 0.406250 0.500000
vt 0.406250 1.000000
vt 0.375000 0.500000
vt 0.375000 1.000000
vt 0.343750 0.500000
vt 0.343750 1.000000
vt 0.312500 0.500000
vt 0.312500 1.000000
vt 0.281250 0.500000
vt 0.281250 1.000000
vt 0.250000 0.500000
vt 0.250000 1.000000
vt 0.218750 0.500000
vt 0.218750 1.000000
vt 0.187500 0.500000
vt 0.187500 1.000000
vt 0.156250 0.500000
vt 0.156250 1.000000
vt 0.125000 0.500000
vt 0.125000 1.000000
vt 0.093750 0.500000
vt 0.093750 1.000000
vt 0.062500 0.500000
vt 0.028269 0.341844
vt 0.158156 0.028269
vt 0.471731 0.158156
vt 0.062500 1.000000
vt 0.031250 0.500000
vt 0.031250 1.000000
vt 0.000000 0.500000
vt 0.985388 0.296822
vt 0.796822 0.014612
vt 0.514612 0.203178
vt 0.341844 0.471731
vt 0.296822 0.485388
vt 0.158156 0.471731
vt 0.250000 0.490000
vt 0.203178 0.485388
vt 0.116663 0.449553
vt 0.080294 0.419706
vt 0.050447 0.383337
vt 0.014612 0.296822
vt 0.010000 0.250000
vt 0.014612 0.203178
vt 0.028269 0.158156
vt 0.050447 0.116663
vt 0.080294 0.080294
vt 0.116663 0.050447
vt 0.203178 0.014612
vt 0.250000 0.010000
vt 0.296822 0.014612
vt 0.341844 0.028269
vt 0.383337 0.050447
vt 0.419706 0.080294
vt 0.449553 0.116663
vt 0.485388 0.203178
vt 0.490000 0.250000
vt 0.485388 0.296822
vt 0.471731 0.341844
vt 0.449553 0.383337
vt 0.419706 0.419706
vt 0.383337 0.449553
vt 0.000000 1.000000
vt 0.703178 0.485388
vt 0.750000 0.490000
vt 0.796822 0.485388
vt 0.841844 0.471731
vt 0.883337 0.449553
vt 0.919706 0.419706
vt 0.949553 0.383337
vt 0.971731 0.341844
vt 0.990000 0.250000
vt 0.985388 0.203178
vt 0.971731 0.158156
vt 0.949553 0.116663
vt 0.919706 0.080294
vt 0.883337 0.050447
vt 0.841844 0.028269
vt 0.750000 0.010000
vt 0.703178 0.014612
vt 0.658156 0.028269
vt 0.616663 0.050447
vt 0.580294 0.080294
vt 0.550447 0.116663
vt 0.528269 0.158156
vt 0.510000 0.250000
vt 0.514612 0.296822
vt 0.528269 0.341844
vt 0.550447 0.383337
vt 0.580294 0.419706
vt 0.616663 0.449553
vt 0.658156 0.471731
vn 0.0000 0.0000 -1.0000
vn 0.1951 0.0000 -0.9808
vn 0.3827 0.0000 -0.9239
vn 0.5556 0.0000 -0.8315
vn 0.7071 0.0000 -0.7071
vn 0.8315 0.0000 -0.5556
vn 0.9239 0.0000 -0.3827
vn 0.9808 0.0000 -0.1951
vn 1.0000 0.0000 0.0000
vn 0.9808 0.0000 0.1951
vn 0.9239 0.0000 0.3827
vn 0.8315 0.0000 0.5556
vn 0.7071 0.0000 0.7071
vn 0.5556 0.0000 0.8315
vn 0.3827 0.0000 0.9239
vn 0.1951 0.0000 0.9808
vn 0.0000 0.0000 1.0000
vn -0.1951 0.0000 0.9808
vn -0.3827 0.0000 0.9239
vn -0.5556 0.0000 0.8315
vn -0.7071 0.0000 0.7071
vn -0.8315 0.0000 0.5556
vn -0.9239 0.0000 0.3827
vn -0.9808 0.0000 0.1951
vn -1.0000 0.0000 0.0000
vn -0.9808 0.0000 -0.1951
vn -0.9239 0.0000 -0.3827
vn -0.8315 0.0000 -0.5556
vn -0.7071 0.0000 -0.7071
vn -0.5556 0.0000 -0.8315
vn -0.3827 0.0000 -0.9239
vn 0.0000 1.0000 -0.0000
vn -0.1951 0.0000 -0.9808
vn 0.0000 -1.0000 0.0000
usemtl None
s 1
f 2/1/1 3/2/2 1/3/1
f 4/4/2 5/5/3 3/2/2
f 6/6/3 7/7/4 5/5/3
f 8/8/4 9/9/5 7/7/4
f 10/10/5 11/11/6 9/9/5
f 12/12/6 13/13/7 11/11/6
f 14/14/7 15/15/8 13/13/7
f 16/16/8 17/17/9 15/15/8
f 18/18/9 19/19/10 17/17/9
f 20/20/10 21/21/11 19/19/10
f 22/22/11 23/23/12 21/21/11
f 24/24/12 25/25/13 23/23/12
f 26/26/13 27/27/14 25/25/13
f 28/28/14 29/29/15 27/27/14
f 30/30/15 31/31/16 29/29/15
f 32/32/16 33/33/17 31/31/16
f 34/34/17 35/35/18 33/33/17
f 36/36/18 37/37/19 35/35/18
f 38/38/19 39/39/20 37/37/19
f 40/40/20 41/41/21 39/39/20
f 42/42/21 43/43/22 41/41/21
f 44/44/22 45/45/23 43/43/22
f 46/46/23 47/47/24 45/45/23
f 48/48/24 49/49/25 47/47/24
f 50/50/25 51/51/26 49/49/25
f 52/52/26 53/53/27 51/51/26
f 54/54/27 55/55/28 53/53/27
f 56/56/28 57/57/29 55/55/28
f 58/58/29 59/59/30 57/57/29
f 60/60/30 61/61/31 59/59/30
f 54/62/32 38/63/32 22/64/32
f 62/65/31 63/66/33 61/61/31
f 64/67/33 1/68/1 63/66/33
f 15/69/34 31/70/34 47/71/34
f 2/1/1 4/4/2 3/2/2
f 4/4/2 6/6/3 5/5/3
f 6/6/3 8/8/4 7/7/4
f 8/8/4 10/10/5 9/9/5
f 10/10/5 12/12/6 11/11/6
f 12/12/6 14/14/7 13/13/7
f 14/14/7 16/16/8 15/15/8
f 16/16/8 18/18/9 17/17/9
f 18/18/9 20/20/10 19/19/10
f 20/20/10 22/22/11 21/21/11
f 22/22/11 24/24/12 23/23/12
f 24/24/12 26/26/13 25/25/13
f 26/26/13 28/28/14 27/27/14
f 28/28/14 30/30/15 29/29/15
f 30/30/15 32/32/16 31/31/16
f 32/32/16 34/34/17 33/33/17
f 34/34/17 36/36/18 35/35/18
f 36/36/18 38/38/19 37/37/19
f 38/38/19 40/40/20 39/39/20
f 40/40/20 42/42/21 41/41/21
f 42/42/21 44/44/22 43/43/22
f 44/44/22 46/46/23 45/45/23
f 46/46/23 48/48/24 47/47/24
f 48/48/24 50/50/25 49/49/25
f 50/50/25 52/52/26 51/51/26
f 52/52/26 54/54/27 53/53/27
f 54/54/27 56/56/28 55/55/28
f 56/56/28 58/58/29 57/57/29
f 58/58/29 60/60/30 59/59/30
f 60/60/30 62/65/31 61/61/31
f 6/72/32 4/73/32 62/74/32
f 4/73/32 2/75/32 62/74/32
f 2/75/32 64/76/32 62/74/32
f 62/74/32 60/77/32 58/78/32
f 58/78/32 56/79/32 62/74/32
f 56/79/32 54/62/32 62/74/32
f 54/62/32 52/80/32 50/81/32
f 50/81/32 48/82/32 46/83/32
f 46/83/32 44/84/32 42/85/32
f 42/85/32 40/86/32 38/63/32
f 38/63/32 36/87/32 34/88/32
f 34/88/32 32/89/32 30/90/32
f 30/90/32 28/91/32 26/92/32
f 26/92/32 24/93/32 22/64/32
f 22/64/32 20/94/32 18/95/32
f 18/95/32 16/96/32 14/97/32
f 14/97/32 12/98/32 10/99/32
f 10/99/32 8/100/32 6/72/32
f 54/62/32 50/81/32 38/63/32
f 50/81/32 46/83/32 38/63/32
f 46/83/32 42/85/32 38/63/32
f 38/63/32 34/88/32 30/90/32
f 30/90/32 26/92/32 38/63/32
f 26/92/32 22/64/32 38/63/32
f 22/64/32 18/95/32 6/72/32
f 18/95/32 14/97/32 6/72/32
f 14/97/32 10/99/32 6/72/32
f 6/72/32 62/74/32 54/62/32
f 6/72/32 54/62/32 22/64/32
f 62/65/31 64/67/33 63/66/33
f 64/67/33 2/101/1 1/68/1
f 63/102/34 1/103/34 3/104/34
f 3/104/34 5/105/34 7/106/34
f 7/106/34 9/107/34 11/108/34
f 11/108/34 13/109/34 15/69/34
f 15/69/34 17/110/34 19/111/34
f 19/111/34 21/112/34 23/113/34
f 23/113/34 25/114/34 27/115/34
f 27/115/34 29/116/34 31/70/34
f 31/70/34 33/117/34 35/118/34
f 35/118/34 37/119/34 39/120/34
f 39/120/34 41/121/34 43/122/34
f 43/122/34 45/123/34 47/71/34
f 47/71/34 49/124/34 51/125/34
f 51/125/34 53/126/34 47/71/34
f 53/126/34 55/127/34 47/71/34
f 55/127/34 57/128/34 59/129/34
f 59/129/34 61/130/34 55/127/34
f 61/130/34 63/102/34 55/127/34
f 63/102/34 3/104/34 15/69/34
f 3/104/34 7/106/34 15/69/34
f 7/106/34 11/108/34 15/69/34
f 15/69/34 19/111/34 23/113/34
f 23/113/34 27/115/34 15/69/34
f 27/115/34 31/70/34 15/69/34
f 31/70/34 35/118/34 47/71/34
f 35/118/34 39/120/34 47/71/34
f 39/120/34 43/122/34 47/71/34
f 47/71/34 55/127/34 63/102/34
f 63/102/34 15/69/34 47/71/34
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
-17
View File
@@ -1,17 +0,0 @@
# Blender v2.93.3 OBJ File: ''
# www.blender.org
mtllib plane.mtl
o Plane
v -1.000000 0.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 0.000000 -1.000000
v 1.000000 0.000000 -1.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 2/1/1 3/2/1 1/3/1
f 2/1/1 4/4/1 3/2/1
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
File diff suppressed because it is too large. Load diff
-10
View File
@@ -1,10 +0,0 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 10
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
File diff suppressed because it is too large. Load diff
@@ -1,16 +0,0 @@
#version 330 core
in vec3 texCoord;
uniform samplerCube cm;
out vec4 color;
void main() {
vec3 tc;
tc = vec3(-texCoord.x, texCoord.y, texCoord.z);
if (texCoord.y > 0.999999 || texCoord.y < -0.999999) {
tc = vec3(texCoord.x, texCoord.y, texCoord.z);
}
color = texture(cm, tc);
}
@@ -1,15 +0,0 @@
#version 330 core
layout(location = 0) in vec3 pos;
uniform mat4 view;
uniform mat4 proj;
out vec3 texCoord;
void main() {
texCoord = pos;
vec4 vertexPos = proj * view * vec4(pos, 1.0);
gl_Position = vertexPos.xyww;
}
@@ -1,9 +0,0 @@
#version 330 core
uniform float opacity;
out vec4 color;
void main() {
color = vec4(vec3(0.0), opacity);
}
@@ -1,7 +0,0 @@
#version 330 core
layout(location = 0) in vec2 pos;
void main() {
gl_Position = vec4(pos, 0.0, 1.0);
}
@@ -1,30 +0,0 @@
#version 330 core
in vec3 fragPos;
in vec2 texCoord;
in vec3 normal;
in mat3 tbn;
flat in int matNum;
uniform bool hasDiffuseTex[32];
uniform sampler2D diffuseTexture[32];
uniform vec3 diffuseColor[32];
uniform bool hasSpecTex[32];
uniform sampler2D specularTexture[32];
uniform float specPower[32];
uniform bool hasNormTex[32];
uniform sampler2D normalTexture[32];
layout(location = 0) out vec3 pos;
layout(location = 1) out vec3 normals;
layout(location = 2) out vec3 diffuse;
layout(location = 3) out vec3 specular;
void main() {
pos = fragPos;
normals = hasNormTex[matNum] ? normalize(tbn * (texture(normalTexture[matNum], texCoord).xyz * 2.0 - 1.0)) : normal;
diffuse = hasDiffuseTex[matNum] ? texture(diffuseTexture[matNum], texCoord).rgb : diffuseColor[matNum];
specular.r = specPower[matNum];
specular.g = hasSpecTex[matNum] ? texture(specularTexture[matNum], texCoord).r : 0.2;
specular.b = 1.0;
}
@@ -1,32 +0,0 @@
#version 330 core
layout(location = 0) in vec3 pos;
layout(location = 1) in vec2 texCoords;
layout(location = 2) in vec3 normals;
layout(location = 3) in vec3 tangent;
layout(location = 4) in int matN;
uniform mat4 model[60];
uniform mat4 view;
uniform mat4 proj;
out vec3 fragPos;
out vec2 texCoord;
out vec3 normal;
out mat3 tbn;
flat out int matNum;
void main() {
vec4 world = model[gl_InstanceID] * vec4(pos, 1.0);
fragPos = world.xyz;
texCoord = texCoords;
mat3 normalMat = transpose(inverse(mat3(model[gl_InstanceID])));
vec3 t = normalize(normalMat * tangent);
vec3 n = normalize(normalMat * normals);
normal = n;
vec3 b = cross(n, t);
tbn = mat3(t, b, n);
matNum = matN;
gl_Position = proj * view * world;
}
@@ -1,133 +0,0 @@
#version 330 core
in vec2 texCoord;
in vec4 fragPosLightSpace[16];
struct Camera {
vec3 pos;
};
struct Light {
//Directional = 1, Point = 2
int type;
vec3 pos;
vec3 color;
float strength;
sampler2D directionalDepthTex;
samplerCube pointDepthTex;
};
uniform Camera camera;
uniform Light light[12];
uniform int numberOfLights;
uniform bool isContinued;
uniform float farPlane;
uniform sampler2D gBPos;
uniform sampler2D gBNorm;
uniform sampler2D gBDiff;
uniform sampler2D gBSpec;
out vec4 outColor;
float calcShadowDirectional(int lightNum, vec4 fragPosLight, vec3 no, vec3 lDir) {
vec3 fp = fragPosLight.xyz / fragPosLight.w;
fp = fp * 0.5 + 0.5;
float current = fp.z;
float bias = max(0.05 * (1.0 - dot(no, lDir)), 0.005);
float shad = 0.0f;
vec2 texSize = 1.0 / textureSize(light[lightNum].directionalDepthTex, 0);
for (int x = -1; x <= 1; x++) {
for (int y = -1; y <= 1; y++) {
float pcfDepth = texture(light[lightNum].directionalDepthTex, fp.xy + vec2(x, y) * texSize).r;
shad += current - bias > pcfDepth ? 1.0 : 0.0;
}
}
shad /= 9.0;
if (current > 1.0)
shad = 0.0;
return shad;
}
vec3 offsets[20] = vec3[](
vec3(1, 1, 1), vec3(1, -1, 1), vec3(-1, -1, 1), vec3(-1, 1, 1),
vec3(1, 1, -1), vec3(1, -1, -1), vec3(-1, -1, -1), vec3(-1, 1, -1),
vec3(1, 1, 0), vec3(1, -1, 0), vec3(-1, -1, 0), vec3(-1, 1, 0),
vec3(1, 0, 1), vec3(-1, 0, 1), vec3(1, 0, -1), vec3(-1, 0, -1),
vec3(0, 1, 1), vec3(0, -1, 1), vec3(0, -1, -1), vec3(0, 1, -1)
);
float calcShadowPoint(int lightNum, vec3 no, vec3 lDir, vec3 fp) {
vec3 fragLight = fp - light[lightNum].pos;
float current = length(fragLight);
float bias = 0.15;
float closest = 0.0f;
float shad = 0.0f;
int samples = 20;
float viewDist = length(camera.pos - fp);
float disk = (1.0 + (viewDist / farPlane)) / 50.0f;
for (int i = 0; i < samples; i++) {
closest = texture(light[lightNum].pointDepthTex, fragLight + offsets[i] * disk).r;
closest *= farPlane;
if (current - bias > closest)
shad += 1.0f;
}
shad /= float(samples);
return shad;
}
void main() {
vec3 specTemp = texture(gBSpec, texCoord).rgb;
if (specTemp.b != 1.0)
discard;
vec3 color = vec3(0.0);
vec3 fragPos = texture(gBPos, texCoord).xyz;
vec3 norm = texture(gBNorm, texCoord).xyz;
vec3 matDiff = texture(gBDiff, texCoord).rgb;
float specPower = specTemp.r;
float matSpec = specTemp.g;
float ambientStrength = 0.1f;
vec3 ambient = ambientStrength * matDiff;
if (!isContinued)
color += ambient;
for (int i = 0; i < numberOfLights; i++) {
if (light[i].type == 1) {
vec3 lightDir = normalize(light[i].pos - fragPos);
float diff = max(dot(norm, lightDir), 0.0);
vec3 diffuse = light[i].color * diff * matDiff * (light[i].strength / 2.0f);
vec3 viewDir = normalize(camera.pos - fragPos);
vec3 reflectDir = reflect(-lightDir, norm);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), specPower);
vec3 specular = light[i].color * spec * matSpec * (light[i].strength / 2.0f);
float shadow = calcShadowDirectional(i, fragPosLightSpace[i], norm, lightDir);
color += (diffuse + specular) * (1.0 - shadow);
continue;
}
if (light[i].type == 2) {
vec3 lightDir = normalize(light[i].pos - fragPos);
float diff = max(dot(norm, lightDir), 0.0);
vec3 diffuse = light[i].color * diff * matDiff * (light[i].strength / 2.5f);
vec3 viewDir = normalize(camera.pos - fragPos);
vec3 halfway = normalize(lightDir + viewDir);
float spec = pow(max(dot(norm, halfway), 0.0), specPower);
vec3 specular = light[i].color * spec * matSpec * (light[i].strength / 2.5f);
float length = length(light[i].pos - fragPos);
float att = clamp(10.0 / length, 0.0, 1.0) * light[i].strength;
float shadow = calcShadowPoint(i, norm, lightDir, fragPos);
color += ((diffuse + specular) * (1.0 - shadow) * att);
continue;
}
}
//TODO: Move this to a post-processing pass (what about the UI textures?)
float gamma = 2.2;
color.rgb = pow(color.rgb, vec3(1.0 / gamma));
outColor = vec4(color, 1.0);
}
@@ -1,20 +0,0 @@
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 texCoords;
uniform mat4 lightSpaceMat[16];
uniform int numMats;
uniform sampler2D gBPos;
out vec2 texCoord;
out vec4 fragPosLightSpace[16];
void main() {
texCoord = texCoords;
vec3 fragPos = texture(gBPos, texCoord).xyz;
for (int i = 0; i < numMats; i++) {
fragPosLightSpace[i] = lightSpaceMat[i] * vec4(fragPos, 1.0);
}
gl_Position = vec4(pos, 0.0, 1.0);
}
@@ -1,5 +0,0 @@
#version 330 core
void main() {
}
@@ -1,12 +0,0 @@
#version 330 core
layout(location = 0) in vec3 pos;
uniform mat4 lightSpace;
uniform mat4 model[60];
out vec3 texCoord;
void main() {
gl_Position = lightSpace * model[gl_InstanceID] * vec4(pos, 1.0);
}
@@ -1,12 +0,0 @@
#version 330 core
in vec4 fragPos;
uniform vec3 lightPos;
uniform float farPlane;
void main() {
float dist = length(fragPos.xyz - lightPos);
dist /= farPlane;
gl_FragDepth = dist;
}
@@ -1,20 +0,0 @@
#version 330 core
layout(triangles) in;
layout(triangle_strip, max_vertices = 18) out;
uniform mat4 lightSpaceMat[6];
out vec4 fragPos;
void main() {
for (int face = 0; face < 6; face++) {
gl_Layer = face;
for (int i = 0; i < 3; i++) {
fragPos = gl_in[i].gl_Position;
gl_Position = lightSpaceMat[face] * fragPos;
EmitVertex();
}
EndPrimitive();
}
}
@@ -1,9 +0,0 @@
#version 330 core
layout(location = 0) in vec3 pos;
uniform mat4 model[60];
void main() {
gl_Position = model[gl_InstanceID] * vec4(pos, 1.0);
}
@@ -1,14 +0,0 @@
#version 330 core
in vec2 texCoord;
uniform sampler2D text;
uniform vec3 textColor;
uniform float opacity;
out vec4 color;
void main() {
vec4 temp = vec4(1.0, 1.0, 1.0, texture(text, texCoord).r);
color = vec4(textColor.xyz, opacity) * temp;
}
@@ -1,13 +0,0 @@
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 texCoords;
uniform mat4 proj;
out vec2 texCoord;
void main() {
gl_Position = proj * vec4(pos, 0.0, 1.0);
texCoord = texCoords;
}
@@ -1,17 +0,0 @@
#version 330 core
in vec2 texCoord;
uniform sampler2D tex;
uniform float opacity;
out vec4 outColor;
void main() {
vec4 texColor = texture(tex, texCoord);
vec4 color = texColor;
//TODO: Move this to a post-processing pass too
float gamma = 2.2;
color.rgb = pow(color.rgb, vec3(1.0 / gamma));
outColor = vec4(color.rgb, texColor.a * opacity);
}
@@ -1,13 +0,0 @@
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 texCoords;
uniform mat4 proj;
out vec2 texCoord;
void main() {
gl_Position = proj * vec4(pos, 0.0, 1.0);
texCoord = texCoords;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 KiB