pull/521/head
Benjamin Hansen 4 months ago
parent e4c9af8e6d
commit 677300a5e9

@ -0,0 +1,13 @@
# Blender MTL File: 'happy-cube.blend'
# Material Count: 1
newmtl Material
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd happy-tree.png

@ -0,0 +1,124 @@
# Blender v3.6.5 OBJ File: 'happy-cube.blend'
# www.blender.org
mtllib happy-cube.mtl
o Cube
v 0.950565 0.950565 -1.000000
v 0.950565 1.000000 -0.950565
v 1.000000 0.950565 -0.950565
v 0.950565 -1.000000 -0.950565
v 0.950565 -0.950565 -1.000000
v 1.000000 -0.950565 -0.950565
v 1.000000 0.950565 0.950565
v 0.950565 1.000000 0.950565
v 0.950565 0.950565 1.000000
v 1.000000 -0.950565 0.950565
v 0.950565 -0.950565 1.000000
v 0.950565 -1.000000 0.950565
v -0.950565 0.950565 -1.000000
v -1.000000 0.950565 -0.950565
v -0.950565 1.000000 -0.950565
v -1.000000 -0.950565 -0.950565
v -0.950565 -0.950565 -1.000000
v -0.950565 -1.000000 -0.950565
v -1.000000 0.950565 0.950565
v -0.950565 0.950565 1.000000
v -0.950565 1.000000 0.950565
v -0.950565 -1.000000 0.950565
v -0.950565 -0.950565 1.000000
v -1.000000 -0.950565 0.950565
vt 0.024718 0.975282
vt 0.975282 0.975282
vt 0.975282 0.024718
vt 0.024718 0.024718
vt 0.024718 0.024718
vt 0.024718 0.975282
vt 0.975282 0.975282
vt 0.975282 0.024718
vt 0.975282 0.024718
vt 0.975282 0.975282
vt 0.024718 0.975282
vt 0.024718 0.024718
vt 0.975282 0.975282
vt 0.024718 0.975282
vt 0.024718 0.024718
vt 0.975282 0.024718
vt 0.975282 0.024718
vt 0.975282 0.975282
vt 0.024718 0.975282
vt 0.024718 0.024718
vt 0.975282 1.000000
vt 1.000000 0.975282
vt 0.975282 1.000000
vt 1.000000 0.975282
vt 1.000000 0.024718
vt 0.975282 0.000000
vt 1.000000 0.024718
vt 0.975282 0.000000
vt 0.024718 1.000000
vt 0.000000 0.975282
vt 0.000000 0.975282
vt 0.024718 1.000000
vt 0.000000 0.024718
vt 0.024718 0.000000
vt 0.024718 0.000000
vt 0.000000 0.024718
vt 1.000000 0.024718
vt 0.975282 0.024718
vt 0.975282 0.975282
vt 0.000000 0.975282
vt 1.000000 0.975282
vt 0.024718 0.975282
vt 0.024718 0.024718
vt 0.000000 0.024718
vn -0.3416 -0.8756 -0.3416
vn 0.3416 -0.8756 -0.3416
vn 0.3416 -0.8756 0.3416
vn -0.3416 -0.8756 0.3416
vn -0.8756 -0.3416 0.3416
vn -0.8756 0.3416 0.3416
vn -0.8756 0.3416 -0.3416
vn -0.8756 -0.3416 -0.3416
vn 0.3416 -0.3416 0.8756
vn 0.3416 0.3416 0.8756
vn -0.3416 0.3416 0.8756
vn -0.3416 -0.3416 0.8756
vn 0.3416 0.8756 -0.3416
vn -0.3416 0.8756 -0.3416
vn -0.3416 0.8756 0.3416
vn 0.3416 0.8756 0.3416
vn 0.8756 -0.3416 -0.3416
vn 0.8756 0.3416 -0.3416
vn 0.8756 0.3416 0.3416
vn 0.8756 -0.3416 0.3416
vn 0.3416 0.3416 -0.8756
vn 0.3416 -0.3416 -0.8756
vn -0.3416 0.3416 -0.8756
vn -0.3416 -0.3416 -0.8756
usemtl Material
s 1
f 18/1/1 4/2/2 12/3/3 22/4/4
f 24/5/5 19/6/6 14/7/7 16/8/8
f 11/9/9 9/10/10 20/11/11 23/12/12
f 2/13/13 15/14/14 21/15/15 8/16/16
f 6/17/17 3/18/18 7/19/19 10/20/20
f 1/21/21 2/13/13 3/22/18
f 4/2/2 5/23/22 6/24/17
f 7/25/19 8/16/16 9/26/10
f 10/27/20 11/28/9 12/3/3
f 13/29/23 14/30/7 15/14/14
f 16/31/8 17/32/24 18/1/1
f 19/33/6 20/34/11 21/15/15
f 22/4/4 23/35/12 24/36/5
f 18/1/1 22/4/4 24/36/5 16/31/8
f 4/2/2 18/1/1 17/32/24 5/23/22
f 3/22/18 6/37/17 5/38/22 1/39/21
f 23/12/12 20/11/11 19/40/6 24/36/5
f 9/10/10 11/9/9 10/27/20 7/41/19
f 13/42/23 17/43/24 16/44/8 14/30/7
f 8/16/16 21/15/15 20/34/11 9/26/10
f 2/13/13 8/16/16 7/25/19 3/22/18
f 22/4/4 12/3/3 11/28/9 23/35/12
f 21/15/15 15/14/14 14/30/7 19/33/6
f 15/14/14 2/13/13 1/21/21 13/29/23
f 12/3/3 4/2/2 6/24/17 10/27/20
f 17/43/24 13/42/23 1/39/21 5/38/22

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@ -124,7 +124,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -124,7 +124,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -114,7 +114,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -114,7 +114,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -115,7 +115,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -130,7 +130,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -298,7 +298,7 @@ impl ModelLoader {
m.mesh.positions[i * 3 + 2],
],
// tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1], 0.0]
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -140,7 +140,7 @@ pub async fn load_model(
);
model::ModelVertex {
position: p.into(), // UPDATED!
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -114,7 +114,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -348,7 +348,7 @@ pub async fn load_model(
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

@ -245,7 +245,7 @@ let meshes = models
m.mesh.positions[i * 3 + 1],
m.mesh.positions[i * 3 + 2],
],
tex_coords: [m.mesh.texcoords[i * 2], m.mesh.texcoords[i * 2 + 1]],
tex_coords: [m.mesh.texcoords[i * 2], 1.0 - m.mesh.texcoords[i * 2 + 1]],
normal: [
m.mesh.normals[i * 3],
m.mesh.normals[i * 3 + 1],

Loading…
Cancel
Save