Signed-off-by: Adrian Charkiewicz <adrcha2@st.amu.edu.pl>

This commit is contained in:
Adrian Charkiewicz 2021-01-24 00:40:45 +01:00
parent be98e05537
commit 4aab45c76c
13 changed files with 1024021 additions and 17 deletions

13148
models/Corvette-F3.obj Normal file

File diff suppressed because it is too large Load Diff

13148
models/corvette.obj Normal file

File diff suppressed because it is too large Load Diff

997216
models/objSpaceship.obj Normal file

File diff suppressed because it is too large Load Diff

464
models/spaceship.obj Normal file
View File

@ -0,0 +1,464 @@
# Exported from Wings 3D 1.0.1
#48 vertices, 92 faces
v -0.46604296 -4.6098739e-2 6.1004010e-2
v -0.46604296 4.5631895e-2 6.1004010e-2
v -0.28477197 -9.3266190e-2 -0.41163609
v -0.28477197 4.5631895e-2 -0.41163609
v -5.3436673e-2 -4.9075029e-2 0.72044817
v -5.3436673e-2 -0.10214269 0.72044817
v 0.0000000e+0 -4.9075029e-2 0.74414179
v 0.0000000e+0 -0.11873436 0.74414179
v 0.0000000e+0 0.11653721 -0.35075536
v 0.0000000e+0 -0.16403757 -0.35075536
v 0.0000000e+0 0.16403757 6.1004010e-2
v 0.0000000e+0 -0.16403757 6.1004010e-2
v -0.64756828 -3.8727536e-2 -0.23804752
v -0.64756828 7.1441743e-2 -0.23804752
v -0.49663244 7.1441743e-2 -0.74414179
v -0.49663244 -3.8727536e-2 -0.74414179
v -4.0833684e-2 -0.10214269 0.73456352
v -4.0833684e-2 -4.9075029e-2 0.73456352
v -0.16961230 0.11653721 -0.38119573
v -0.16961230 -0.14744589 -0.38119573
v -0.16961230 0.16403757 6.1004010e-2
v -0.16961230 -0.14744589 6.1004010e-2
v -9.1308654e-2 4.5778787e-2 0.47242135
v -9.1308654e-2 -0.10009243 0.47242135
v 0.0000000e+0 4.5778787e-2 0.47242135
v 0.0000000e+0 -0.11668411 0.47242135
v -0.18261731 -6.9341139e-2 0.47242135
v -0.18261731 -1.7215671e-3 0.47242135
v 0.46604296 -4.6098739e-2 6.1004010e-2
v 0.46604296 4.5631895e-2 6.1004010e-2
v 0.28477197 -9.3266190e-2 -0.41163609
v 0.28477197 4.5631895e-2 -0.41163609
v 5.3436673e-2 -4.9075029e-2 0.72044817
v 5.3436673e-2 -0.10214269 0.72044817
v 0.64756828 -3.8727536e-2 -0.23804752
v 0.64756828 7.1441743e-2 -0.23804752
v 0.49663244 7.1441743e-2 -0.74414179
v 0.49663244 -3.8727536e-2 -0.74414179
v 4.0833684e-2 -0.10214269 0.73456352
v 4.0833684e-2 -4.9075029e-2 0.73456352
v 0.16961230 0.11653721 -0.38119573
v 0.16961230 -0.14744589 -0.38119573
v 0.16961230 0.16403757 6.1004010e-2
v 0.16961230 -0.14744589 6.1004010e-2
v 9.1308654e-2 4.5778787e-2 0.47242135
v 9.1308654e-2 -0.10009243 0.47242135
v 0.18261731 -6.9341139e-2 0.47242135
v 0.18261731 -1.7215671e-3 0.47242135
vt 0.0000000e+0 0.69053970
vt 4.2285593e-2 0.71525416
vt 0.11847455 0.48783383
vt 0.16076015 0.51254829
vt 0.16331352 0.33807909
vt 0.17536475 0.59545214
vt 0.18715376 0.64617830
vt 0.21512694 0.12420912
vt 0.23028866 0.37309998
vt 0.27933871 3.3287708e-2
vt 0.29111566 1.8231410e-2
vt 0.29780728 0.0000000e+0
vt 0.30306274 0.16395866
vt 0.32256180 5.8152293e-2
vt 0.33503069 5.1982011e-2
vt 0.34659842 0.15855392
vt 0.34866807 4.3914835e-2
vt 0.35966131 0.56514644
vt 0.36786859 0.34315696
vt 0.38304782 0.66577476
vt 0.38362189 0.14708561
vt 0.40944282 0.52981351
vt 0.43912922 0.32433135
vt 0.44897715 0.70072227
vt 0.48119448 0.50585981
vt 0.52771590 0.47388085
vt 0.52771590 0.68855148
vt 0.53171542 0.29271280
vt 0.54359004 0.11090107
vt 0.54696463 8.9466723e-4
vt 0.56615771 0.0000000e+0
vt 0.58393029 6.3125387e-4
vt 0.58452235 0.11195282
vt 0.60240334 0.48892951
vt 0.60614015 0.29553098
vt 0.62473227 0.11194349
vt 0.66991430 0.50491521
vt 0.75162596 0.29695078
vt 0.77873865 0.65209135
vt 0.84024960 0.13148316
vt 0.84024960 0.42828199
vt 0.90677601 0.35344281
vt 0.92024753 0.0000000e+0
vt 1.00000000 0.20728785
vn -0.85484036 0.0000000e+0 0.51889108
vn -0.25024660 -0.96818192 6.4366946e-4
vn -0.41030048 -0.90951551 -6.6596220e-2
vn -0.82350309 0.0000000e+0 0.56731178
vn -0.31890558 -0.93276809 0.16805628
vn -0.31484356 -0.93485312 0.16408281
vn -2.7217819e-2 -0.99959657 -8.1173501e-3
vn -0.32350669 -0.94622588 0.0000000e+0
vn -0.82350309 0.0000000e+0 0.56731178
vn -0.85484036 0.0000000e+0 0.51889108
vn -0.85484036 0.0000000e+0 0.51889108
vn 8.6753709e-2 0.99567401 3.3272527e-2
vn -0.36724289 0.91939897 -0.14084814
vn -0.34874278 0.87308361 0.34073961
vn -0.82350309 0.0000000e+0 0.56731178
vn 0.84335584 0.0000000e+0 -0.53735549
vn -0.25024660 -0.96818192 6.4366946e-4
vn -0.41030048 -0.90951551 -6.6596220e-2
vn 0.25555460 0.0000000e+0 -0.96679462
vn 8.6753709e-2 0.99567401 3.3272527e-2
vn 0.84335584 0.0000000e+0 -0.53735549
vn 0.25555460 0.0000000e+0 -0.96679462
vn -0.36724289 0.91939897 -0.14084814
vn 0.84335584 0.0000000e+0 -0.53735549
vn 0.25555460 0.0000000e+0 -0.96679462
vn -0.50427448 0.85860405 -9.2229808e-2
vn 8.2673579e-2 0.99627162 2.4656288e-2
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.74593766 0.0000000e+0 0.66601577
vn -0.42279812 0.82385482 0.37749832
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.74593766 0.0000000e+0 0.66601577
vn 1.1166894e-2 -0.99988794 -9.9704414e-3
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.31890277 -0.94690597 4.0866878e-2
vn -0.74593766 0.0000000e+0 0.66601577
vn -0.22836934 0.0000000e+0 0.97357457
vn -7.7079267e-2 0.94131828 0.32860109
vn 0.22836934 0.0000000e+0 0.97357457
vn 7.7079267e-2 0.94131828 0.32860109
vn -0.22836934 0.0000000e+0 0.97357457
vn -0.38916924 -0.91867155 6.7748717e-2
vn -0.22836934 0.0000000e+0 0.97357457
vn -0.17877724 -0.98386157 -7.4236827e-3
vn 0.22836934 0.0000000e+0 0.97357457
vn 0.38916924 -0.91867155 6.7748717e-2
vn 0.22836934 0.0000000e+0 0.97357457
vn 0.17877724 -0.98386157 -7.4236827e-3
vn 0.17664795 0.0000000e+0 -0.98427410
vn 0.0000000e+0 0.99341178 -0.11459949
vn 0.17664795 0.0000000e+0 -0.98427410
vn 1.9164607e-2 0.99409750 -0.10678429
vn -0.17664795 0.0000000e+0 -0.98427410
vn 0.0000000e+0 0.99341178 -0.11459949
vn -0.17664795 0.0000000e+0 -0.98427410
vn -1.9164607e-2 0.99409750 -0.10678429
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn 0.17664795 0.0000000e+0 -0.98427410
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn -0.17664795 0.0000000e+0 -0.98427410
vn 0.0000000e+0 0.99341178 -0.11459949
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.0000000e+0 0.99341178 -0.11459949
vn 0.0000000e+0 0.96108401 0.27625628
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn -9.6505640e-2 -0.98655171 0.13191807
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn -0.17764671 -0.97763993 0.11252476
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn 9.6505640e-2 -0.98655171 0.13191807
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn 0.17764671 -0.97763993 0.11252476
vn -2.7217819e-2 -0.99959657 -8.1173501e-3
vn -0.95829012 0.0000000e+0 -0.28579720
vn -0.85484036 0.0000000e+0 0.51889108
vn -0.95829012 0.0000000e+0 -0.28579720
vn -0.85484036 0.0000000e+0 0.51889108
vn 8.6753709e-2 0.99567401 3.3272527e-2
vn 8.2673579e-2 0.99627162 2.4656288e-2
vn -0.95829012 0.0000000e+0 -0.28579720
vn -0.85484036 0.0000000e+0 0.51889108
vn -0.95829012 0.0000000e+0 -0.28579720
vn 0.84335584 0.0000000e+0 -0.53735549
vn 8.2673579e-2 0.99627162 2.4656288e-2
vn -0.95829012 0.0000000e+0 -0.28579720
vn 0.84335584 0.0000000e+0 -0.53735549
vn -0.25024660 -0.96818192 6.4366946e-4
vn -2.7217819e-2 -0.99959657 -8.1173501e-3
vn 0.84335584 0.0000000e+0 -0.53735549
vn -0.95829012 0.0000000e+0 -0.28579720
vn 1.1166894e-2 -0.99988794 -9.9704414e-3
vn -0.38916924 -0.91867155 6.7748717e-2
vn -0.22836934 0.0000000e+0 0.97357457
vn -0.74593766 0.0000000e+0 0.66601577
vn -0.22836934 0.0000000e+0 0.97357457
vn -7.7079267e-2 0.94131828 0.32860109
vn -0.74593766 0.0000000e+0 0.66601577
vn -0.42279812 0.82385482 0.37749832
vn -0.22836934 0.0000000e+0 0.97357457
vn -0.42702825 0.82086493 0.37924616
vn -0.74593766 0.0000000e+0 0.66601577
vn 0.0000000e+0 0.94033441 0.34025166
vn 0.25555460 0.0000000e+0 -0.96679462
vn 0.17664795 0.0000000e+0 -0.98427410
vn 1.9164607e-2 0.99409750 -0.10678429
vn -0.50427448 0.85860405 -9.2229808e-2
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn 0.17664795 0.0000000e+0 -0.98427410
vn -0.41030048 -0.90951551 -6.6596220e-2
vn 0.25555460 0.0000000e+0 -0.96679462
vn 0.25555460 0.0000000e+0 -0.96679462
vn 0.17664795 0.0000000e+0 -0.98427410
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn -0.32350669 -0.94622588 0.0000000e+0
vn 0.0000000e+0 0.99341178 -0.11459949
vn -0.36724289 0.91939897 -0.14084814
vn -0.34874278 0.87308361 0.34073961
vn 0.0000000e+0 0.96108401 0.27625628
vn 1.9164607e-2 0.99409750 -0.10678429
vn 0.0000000e+0 0.96108401 0.27625628
vn -0.43656100 0.83918947 0.32430777
vn -0.50427448 0.85860405 -9.2229808e-2
vn -9.6505640e-2 -0.98655171 0.13191807
vn -0.31890558 -0.93276809 0.16805628
vn -9.7356475e-2 -0.99524958 0.0000000e+0
vn -0.32350669 -0.94622588 0.0000000e+0
vn 0.0000000e+0 0.96108401 0.27625628
vn -0.43656100 0.83918947 0.32430777
vn -0.42702825 0.82086493 0.37924616
vn 0.0000000e+0 0.94033441 0.34025166
vn -9.6505640e-2 -0.98655171 0.13191807
vn 1.1166894e-2 -0.99988794 -9.9704414e-3
vn -0.38916924 -0.91867155 6.7748717e-2
vn -0.31890558 -0.93276809 0.16805628
vn -0.17877724 -0.98386157 -7.4236827e-3
vn -0.31484356 -0.93485312 0.16408281
vn -0.17764671 -0.97763993 0.11252476
vn -0.31890277 -0.94690597 4.0866878e-2
vn -7.7079267e-2 0.94131828 0.32860109
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.0000000e+0 0.94033441 0.34025166
vn 7.7079267e-2 0.94131828 0.32860109
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.0000000e+0 0.94033441 0.34025166
vn -0.17877724 -0.98386157 -7.4236827e-3
vn -0.17764671 -0.97763993 0.11252476
vn 0.17877724 -0.98386157 -7.4236827e-3
vn 0.17764671 -0.97763993 0.11252476
vn -0.31484356 -0.93485312 0.16408281
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.82350309 0.0000000e+0 0.56731178
vn -0.31890277 -0.94690597 4.0866878e-2
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.34874278 0.87308361 0.34073961
vn -0.82350309 0.0000000e+0 0.56731178
vn -0.42279812 0.82385482 0.37749832
vn -0.43656100 0.83918947 0.32430777
vn -0.88691408 0.0000000e+0 0.46193442
vn -0.82350309 0.0000000e+0 0.56731178
vn -0.42702825 0.82086493 0.37924616
vn 0.85484036 0.0000000e+0 0.51889108
vn 0.25024660 -0.96818192 6.4366946e-4
vn 0.41030048 -0.90951551 -6.6596220e-2
vn 0.82350309 0.0000000e+0 0.56731178
vn 0.31890558 -0.93276809 0.16805628
vn 0.31484356 -0.93485312 0.16408281
vn 2.7217819e-2 -0.99959657 -8.1173501e-3
vn 0.32350669 -0.94622588 0.0000000e+0
vn 0.82350309 0.0000000e+0 0.56731178
vn 0.85484036 0.0000000e+0 0.51889108
vn 0.85484036 0.0000000e+0 0.51889108
vn -8.6753709e-2 0.99567401 3.3272527e-2
vn 0.36724289 0.91939897 -0.14084814
vn 0.34874278 0.87308361 0.34073961
vn 0.82350309 0.0000000e+0 0.56731178
vn -0.84335584 0.0000000e+0 -0.53735549
vn 0.25024660 -0.96818192 6.4366946e-4
vn 0.41030048 -0.90951551 -6.6596220e-2
vn -0.25555460 0.0000000e+0 -0.96679462
vn -8.6753709e-2 0.99567401 3.3272527e-2
vn -0.84335584 0.0000000e+0 -0.53735549
vn -0.25555460 0.0000000e+0 -0.96679462
vn 0.36724289 0.91939897 -0.14084814
vn -0.84335584 0.0000000e+0 -0.53735549
vn -0.25555460 0.0000000e+0 -0.96679462
vn 0.50427448 0.85860405 -9.2229808e-2
vn -8.2673579e-2 0.99627162 2.4656288e-2
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.74593766 0.0000000e+0 0.66601577
vn 0.42279812 0.82385482 0.37749832
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.74593766 0.0000000e+0 0.66601577
vn -1.1166894e-2 -0.99988794 -9.9704414e-3
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.31890277 -0.94690597 4.0866878e-2
vn 0.74593766 0.0000000e+0 0.66601577
vn 2.7217819e-2 -0.99959657 -8.1173501e-3
vn 0.95829012 0.0000000e+0 -0.28579720
vn 0.85484036 0.0000000e+0 0.51889108
vn 0.95829012 0.0000000e+0 -0.28579720
vn 0.85484036 0.0000000e+0 0.51889108
vn -8.6753709e-2 0.99567401 3.3272527e-2
vn -8.2673579e-2 0.99627162 2.4656288e-2
vn 0.95829012 0.0000000e+0 -0.28579720
vn 0.85484036 0.0000000e+0 0.51889108
vn 0.95829012 0.0000000e+0 -0.28579720
vn -0.84335584 0.0000000e+0 -0.53735549
vn -8.2673579e-2 0.99627162 2.4656288e-2
vn 0.95829012 0.0000000e+0 -0.28579720
vn -0.84335584 0.0000000e+0 -0.53735549
vn 0.25024660 -0.96818192 6.4366946e-4
vn 2.7217819e-2 -0.99959657 -8.1173501e-3
vn -0.84335584 0.0000000e+0 -0.53735549
vn 0.95829012 0.0000000e+0 -0.28579720
vn -1.1166894e-2 -0.99988794 -9.9704414e-3
vn 0.38916924 -0.91867155 6.7748717e-2
vn 0.22836934 0.0000000e+0 0.97357457
vn 0.74593766 0.0000000e+0 0.66601577
vn 0.22836934 0.0000000e+0 0.97357457
vn 7.7079267e-2 0.94131828 0.32860109
vn 0.74593766 0.0000000e+0 0.66601577
vn 0.42279812 0.82385482 0.37749832
vn 0.22836934 0.0000000e+0 0.97357457
vn 0.42702825 0.82086493 0.37924616
vn 0.74593766 0.0000000e+0 0.66601577
vn 0.0000000e+0 0.94033441 0.34025166
vn -0.25555460 0.0000000e+0 -0.96679462
vn -0.17664795 0.0000000e+0 -0.98427410
vn -1.9164607e-2 0.99409750 -0.10678429
vn 0.50427448 0.85860405 -9.2229808e-2
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn -0.17664795 0.0000000e+0 -0.98427410
vn 0.41030048 -0.90951551 -6.6596220e-2
vn -0.25555460 0.0000000e+0 -0.96679462
vn -0.25555460 0.0000000e+0 -0.96679462
vn -0.17664795 0.0000000e+0 -0.98427410
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn 0.32350669 -0.94622588 0.0000000e+0
vn 0.0000000e+0 0.99341178 -0.11459949
vn 0.36724289 0.91939897 -0.14084814
vn 0.34874278 0.87308361 0.34073961
vn 0.0000000e+0 0.96108401 0.27625628
vn -1.9164607e-2 0.99409750 -0.10678429
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.43656100 0.83918947 0.32430777
vn 0.50427448 0.85860405 -9.2229808e-2
vn 9.6505640e-2 -0.98655171 0.13191807
vn 0.31890558 -0.93276809 0.16805628
vn 9.7356475e-2 -0.99524958 0.0000000e+0
vn 0.32350669 -0.94622588 0.0000000e+0
vn 0.0000000e+0 0.96108401 0.27625628
vn 0.43656100 0.83918947 0.32430777
vn 0.42702825 0.82086493 0.37924616
vn 0.0000000e+0 0.94033441 0.34025166
vn 9.6505640e-2 -0.98655171 0.13191807
vn -1.1166894e-2 -0.99988794 -9.9704414e-3
vn 0.38916924 -0.91867155 6.7748717e-2
vn 0.31890558 -0.93276809 0.16805628
vn 0.17877724 -0.98386157 -7.4236827e-3
vn 0.31484356 -0.93485312 0.16408281
vn 0.17764671 -0.97763993 0.11252476
vn 0.31890277 -0.94690597 4.0866878e-2
vn 0.31484356 -0.93485312 0.16408281
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.82350309 0.0000000e+0 0.56731178
vn 0.31890277 -0.94690597 4.0866878e-2
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.34874278 0.87308361 0.34073961
vn 0.82350309 0.0000000e+0 0.56731178
vn 0.42279812 0.82385482 0.37749832
vn 0.43656100 0.83918947 0.32430777
vn 0.88691408 0.0000000e+0 0.46193442
vn 0.82350309 0.0000000e+0 0.56731178
vn 0.42702825 0.82086493 0.37924616
g cube1_cube1_auv
usemtl cube1_auv
f 1/38/2 16/39/87 3/37/17
f 1/38/8 20/34/114 22/35/126
f 1/38/6 24/33/136 27/36/151
f 1/5/4 28/13/157 2/9/15
f 2/9/11 14/4/77 1/5/1
f 2/9/14 28/13/156 21/19/117
f 3/20/16 16/7/86 4/18/21
f 3/37/18 20/34/109 1/38/3
f 4/44/20 14/40/78 2/43/12
f 4/18/22 20/24/110 3/20/19
f 4/18/26 21/19/122 19/22/106
f 5/14/28 28/13/155 6/10/31
f 6/10/32 18/15/97 5/14/29
f 6/32/33 24/33/132 17/31/91
f 6/10/34 28/13/160 27/8/152
f 7/17/37 18/15/95 8/12/41
f 7/17/40 40/15/222 25/21/143
f 8/12/43 18/15/99 17/11/93
f 8/30/44 24/33/135 26/29/147
f 8/12/45 40/15/221 7/17/39
f 8/30/46 46/33/259 39/31/218
f 9/25/51 20/24/112 19/22/104
f 9/25/50 21/19/115 11/23/61
f 9/25/53 42/24/234 10/27/60
f 9/25/56 43/19/245 41/22/231
f 10/27/58 20/24/108 9/25/49
f 10/26/59 42/34/233 12/28/69
f 11/23/63 43/19/241 9/25/54
f 12/28/65 20/34/107 10/26/57
f 12/28/66 24/33/131 22/35/123
f 12/28/71 42/34/239 44/35/251
f 12/28/72 46/33/263 26/29/150
f 13/3/75 1/5/10 14/4/81
f 13/41/73 16/39/88 1/38/7
f 14/40/79 4/44/27 15/42/84
f 14/4/80 16/1/90 13/3/74
f 15/6/83 4/18/24 16/7/89
f 15/2/82 16/1/85 14/4/76
f 17/11/94 18/15/101 6/10/36
f 17/31/92 24/33/133 8/30/42
f 18/15/102 25/21/142 23/16/130
f 18/15/98 28/13/158 5/14/30
f 19/22/103 20/24/111 4/18/25
f 19/22/105 21/19/119 9/25/52
f 21/19/116 4/18/23 2/9/13
f 21/19/118 25/21/140 11/23/62
f 21/19/121 28/13/159 23/16/128
f 22/35/125 20/34/113 12/28/67
f 22/35/124 24/33/134 1/38/5
f 23/16/127 25/21/141 21/19/120
f 23/16/129 28/13/162 18/15/100
f 25/21/139 18/15/96 7/17/38
f 25/21/144 43/19/244 11/23/64
f 26/29/148 24/33/137 12/28/68
f 26/29/149 46/33/261 8/30/48
f 27/36/154 24/33/138 6/32/35
f 27/8/153 28/13/161 1/5/9
f 29/5/163 36/4/203 30/9/173
f 29/38/169 38/39/214 35/41/199
f 29/38/165 42/34/235 31/37/180
f 29/38/167 46/33/260 44/35/250
f 29/5/171 48/13/275 47/8/267
f 30/9/175 32/18/185 43/19/242
f 30/43/174 36/40/204 32/44/182
f 30/9/177 48/13/271 29/5/166
f 31/37/179 38/39/213 29/38/164
f 31/20/181 42/24/236 32/18/184
f 32/18/183 38/7/212 31/20/178
f 32/18/187 42/24/237 41/22/229
f 33/14/191 40/15/223 34/10/194
f 33/14/192 48/13/272 40/15/224
f 34/10/198 40/15/227 39/11/220
f 34/32/197 46/33/264 47/36/268
f 34/10/193 48/13/269 33/14/190
f 35/3/200 38/1/216 36/4/206
f 36/4/207 29/5/172 35/3/201
f 36/4/202 38/1/211 37/2/208
f 37/42/210 32/44/189 36/40/205
f 38/7/215 32/18/186 37/6/209
f 39/11/219 40/15/225 8/12/47
f 39/31/217 46/33/258 34/32/195
f 40/15/226 48/13/276 45/16/255
f 41/22/230 42/24/238 9/25/55
f 41/22/232 43/19/248 32/18/188
f 43/19/246 25/21/145 45/16/253
f 43/19/243 48/13/270 30/9/176
f 44/35/252 42/34/240 29/38/170
f 44/35/249 46/33/257 12/28/70
f 45/16/256 25/21/146 40/15/228
f 45/16/254 48/13/273 43/19/247
f 47/36/265 46/33/262 29/38/168
f 47/8/266 48/13/274 34/10/196

View File

@ -1,10 +1,9 @@
#include "Camera.h"
glm::mat4 Core::createPerspectiveMatrix(float zNear, float zFar)
glm::mat4 Core::createPerspectiveMatrix(float zNear, float zFar, float frustumScale)
{
const float frustumScale = 1.1f;
glm::mat4 perspective;
perspective[0][0] = frustumScale;
perspective[0][0] = 1.f;
perspective[1][1] = frustumScale;
perspective[2][2] = (zFar + zNear) / (zNear - zFar);
perspective[3][2] = (2 * zFar * zNear) / (zNear - zFar);

View File

@ -4,11 +4,6 @@
namespace Core
{
glm::mat4 createPerspectiveMatrix(float zNear = 0.1f, float zFar = 100.0f);
// position - pozycja kamery
// forward - wektor "do przodu" kamery (jednostkowy)
// up - wektor "w gore" kamery (jednostkowy)
// up i forward musza byc ortogonalne!
glm::mat4 createPerspectiveMatrix(float zNear = 0.1f, float zFar = 100.0f, float frustumScale = 1.f);
glm::mat4 createViewMatrix(glm::vec3 position, glm::vec3 forward, glm::vec3 up);
}

View File

@ -5,7 +5,7 @@
#include <iostream>
#include <cmath>
#include <ctime>
#include <vector>
#include "Shader_Loader.h"
#include "Render_Utils.h"
#include "Camera.h"
@ -20,7 +20,7 @@
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
//int winId;
GLuint program;
GLuint programTex;
GLuint programSun;
@ -31,15 +31,18 @@ Core::RenderContext armContext;
std::vector<Core::Node> arm;
int ballIndex;
GLuint textureShip_normals;
GLuint sunTexture;
GLuint earthTexture;
GLuint moonTexture;
GLuint skyboxTexture;
GLuint shipTexture;
obj::Model sphereModel;
obj::Model cubeModel;
obj::Model shipModel;
Core::RenderContext sphereContext;
Core::RenderContext cubeContext;
Core::RenderContext shipContext;
float cameraAngle = 0;
glm::vec3 cameraPos = glm::vec3(-6, 0, 0);
@ -91,6 +94,7 @@ glm::mat4 createCameraMatrix()
return Core::createViewMatrix(cameraPos, cameraDir, up);
}
float frustumScale = 1.f;
@ -196,7 +200,7 @@ glm::mat4 drawMoon(glm::mat4 planetModelMatrix, float time, glm::vec3 orbit, glm
void renderScene()
{
cameraMatrix = createCameraMatrix();
perspectiveMatrix = Core::createPerspectiveMatrix();
perspectiveMatrix = Core::createPerspectiveMatrix(0.01f, 1000.0f, frustumScale);
float time = glutGet(GLUT_ELAPSED_TIME) / 1000.f;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@ -212,14 +216,20 @@ void renderScene()
glm::mat4 sunModelMatrix = glm::mat4(1.0f);
sunModelMatrix = glm::translate(sunModelMatrix, sunPos);
sunModelMatrix = glm::rotate(sunModelMatrix, time/10.0f, glm::vec3(0.0f, 1.0f, 1.0f));
drawObjectTexture(programSun, sphereContext, sunModelMatrix, glm::vec3(0.5f, 0.8f, 0.8f), sunTexture);
glm::mat4 sunModelMatrix2 = glm::mat4(1.0f);
sunModelMatrix2 = glm::translate(sunModelMatrix2, sunPos2);
sunModelMatrix2 = glm::rotate(sunModelMatrix2, time / 10.0f, glm::vec3(0.0f, 1.0f, 1.0f));
sunModelMatrix2 = glm::rotate(sunModelMatrix2, time / 100.0f, glm::vec3(0.0f, 1.0f, 1.0f));
drawObjectTexture(programSun, sphereContext, sunModelMatrix2, glm::vec3(0.9f, 0.9f, 2.0f), sunTexture);
glm::mat4 shipModelMatrix = glm::translate(cameraPos + cameraDir * 0.6f + glm::vec3(0, -0.25f, 0)) * glm::rotate(-cameraAngle + glm::radians(90.0f), glm::vec3(0, 1, 0)) * glm::scale(glm::vec3(0.25f));
drawObjectTexture(programTex, shipContext, shipModelMatrix, glm::vec3(1.f) ,shipTexture);
glUseProgram(programTex);
lights[0].position = sunPos;
@ -252,10 +262,21 @@ void init()
programSun = shaderLoader.CreateProgram("shaders/shader_4_sun.vert", "shaders/shader_4_sun.frag");
programSkybox = shaderLoader.CreateProgram("shaders/shader_skybox.vert", "shaders/shader_skybox.frag");
//shipModel = obj::loadModelFromFile("models/spaceship.obj");
shipModel = obj::loadModelFromFile("models/spaceship.obj");
sphereModel = obj::loadModelFromFile("models/sphere.obj");
cubeModel = obj::loadModelFromFile("models/cube.obj");
sphereContext.initFromOBJ(sphereModel);
cubeContext.initFromOBJ(cubeModel);
shipContext.initFromOBJ(shipModel);
shipTexture = Core::LoadTexture("textures/spaceship.png");
sunTexture = Core::LoadTexture("textures/sun.png");
earthTexture = Core::LoadTexture("textures/earth2.png");
moonTexture = Core::LoadTexture("textures/moon.png");
@ -278,6 +299,16 @@ void shutdown()
shaderLoader.DeleteProgram(program);
}
void onReshape(int width, int height)
{
// Kiedy rozmiar okna sie zmieni, obraz jest znieksztalcony.
// Dostosuj odpowiednio macierz perspektywy i viewport.
// Oblicz odpowiednio globalna zmienna "frustumScale".
// Ustaw odpowiednio viewport - zobacz:
// https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.xhtml
frustumScale = (float)width / (float)height;
glViewport(0, 0, width, height);
}
void idle()
{
glutPostRedisplay();
@ -287,9 +318,11 @@ int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(200, 300);
glutInitWindowSize(600, 600);
glutInitWindowPosition(100, 200);
glutInitWindowSize(1240, 720);
glutCreateWindow("GRK-PROJECT WIP");
//winId = glutCreateWindow("OpenGL + PhysX");
//glutFullScreen();
glewInit();
init();
@ -297,6 +330,7 @@ int main(int argc, char** argv)
glutDisplayFunc(renderScene);
glutIdleFunc(idle);
glutReshapeFunc(onReshape);
glutMainLoop();
shutdown();

BIN
textures/basecolorShip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
textures/normalShip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
textures/spaceship.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB