Added more models and textures
26205
models2/bed/bed.obj
BIN
models2/bed/bed.png
Normal file
After Width: | Height: | Size: 351 KiB |
BIN
models2/bed/untitled.blend
Normal file
BIN
models2/bed/untitled.blend1
Normal file
12
models2/bed/untitled.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'untitled.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material
|
||||
Ns 250.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd bed.png
|
21616
models2/bed/untitled.obj
Normal file
BIN
models2/ceiling_lamp/ceilingLamp.png
Normal file
After Width: | Height: | Size: 93 KiB |
12
models2/ceiling_lamp/ceilinglamp.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'None'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.001
|
||||
Ns 250.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd ceilingLamp Base Color.png
|
1268
models2/ceiling_lamp/ceilinglamp.obj
Normal file
BIN
models2/ceiling_lamp/untitled.blend
Normal file
Before Width: | Height: | Size: 393 KiB After Width: | Height: | Size: 393 KiB |
Before Width: | Height: | Size: 644 KiB After Width: | Height: | Size: 644 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
7485
models2/desk/Desk0.5.obj
Normal file
BIN
models2/desk/Desk0_Desk_Material_Height.png
Normal file
After Width: | Height: | Size: 518 KiB |
BIN
models2/desk/Desk0_Desk_Material_Metallic.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
models2/desk/Desk0_Desk_Material_Normal.png
Normal file
After Width: | Height: | Size: 5.7 MiB |
BIN
models2/desk/Desk0_Desk_Material_Roughness.png
Normal file
After Width: | Height: | Size: 3.3 MiB |
32
models2/desk/Table.mtl
Normal file
@ -0,0 +1,32 @@
|
||||
# Blender 3.4.1 MTL File: 'None'
|
||||
# www.blender.org
|
||||
|
||||
newmtl initialShadingGroup
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl lambert2SG
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
|
||||
newmtl lambert3SG
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
3098
models2/desk/Table.obj
Normal file
12
models2/desk/Table2.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'None'
|
||||
# www.blender.org
|
||||
|
||||
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
|
40
models2/desk/Table2.obj
Normal file
@ -0,0 +1,40 @@
|
||||
# Blender 3.4.1
|
||||
# www.blender.org
|
||||
mtllib Table2.mtl
|
||||
o Cube
|
||||
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
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vt 0.625000 0.500000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.625000 0.750000
|
||||
vt 0.375000 0.750000
|
||||
vt 0.875000 0.500000
|
||||
vt 0.625000 0.250000
|
||||
vt 0.125000 0.500000
|
||||
vt 0.375000 0.250000
|
||||
vt 0.875000 0.750000
|
||||
vt 0.625000 1.000000
|
||||
vt 0.625000 0.000000
|
||||
vt 0.375000 1.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.125000 0.750000
|
||||
s 0
|
||||
usemtl Material
|
||||
f 1/1/1 5/5/1 7/9/1 3/3/1
|
||||
f 4/4/2 3/3/2 7/10/2 8/12/2
|
||||
f 8/13/3 7/11/3 5/6/3 6/8/3
|
||||
f 6/7/4 2/2/4 4/4/4 8/14/4
|
||||
f 2/2/5 1/1/5 3/3/5 4/4/5
|
||||
f 6/8/6 5/6/6 1/1/6 2/2/6
|
BIN
models2/desk/Wood_texture.jpg
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
models2/desk/defsk.png
Normal file
After Width: | Height: | Size: 9.7 MiB |
BIN
models2/desk/desk.png
Normal file
After Width: | Height: | Size: 231 KiB |
BIN
models2/window/untitled.blend
Normal file
BIN
models2/window/untitled.blend1
Normal file
BIN
models2/window/windowColor.png
Normal file
After Width: | Height: | Size: 20 KiB |
@ -24,7 +24,6 @@ namespace models {
|
||||
Core::RenderContext spaceshipContext;
|
||||
Core::RenderContext sphereContext;
|
||||
|
||||
Core::RenderContext windowFrame;
|
||||
Core::RenderContext bookShelf;
|
||||
Core::RenderContext window;
|
||||
Core::RenderContext potPlant;
|
||||
@ -37,7 +36,7 @@ namespace models {
|
||||
}
|
||||
namespace textures {
|
||||
GLuint sunTexture;
|
||||
GLuint windowFrameTexture;
|
||||
GLuint windowUkTexture;
|
||||
GLuint bookShelfTexture;
|
||||
GLuint potPlantTexture;
|
||||
GLuint officeChariTexture;
|
||||
@ -194,12 +193,12 @@ void renderShadowapSun() {
|
||||
|
||||
glm::mat4 lightVP = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
||||
|
||||
drawObjectDepth(sphereContext,
|
||||
lightVP,
|
||||
glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::scale(glm::vec3(0.3f)));
|
||||
drawObjectDepth(sphereContext,
|
||||
lightVP,
|
||||
glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::eulerAngleY(time) * glm::translate(glm::vec3(1.f, 0, 0)) * glm::scale(glm::vec3(0.1f)));
|
||||
//drawObjectDepth(sphereContext,
|
||||
// lightVP,
|
||||
// glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::scale(glm::vec3(0.3f)));
|
||||
//drawObjectDepth(sphereContext,
|
||||
// lightVP,
|
||||
// glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::eulerAngleY(time) * glm::translate(glm::vec3(1.f, 0, 0)) * glm::scale(glm::vec3(0.1f)));
|
||||
//drawObjectDepth(models::bedContext,
|
||||
// lightVP,
|
||||
// glm::mat4());
|
||||
@ -260,11 +259,11 @@ void renderScene(GLFWwindow* window)
|
||||
|
||||
|
||||
drawObjectPBR(models::window, glm::mat4(),
|
||||
textures::windowFrameTexture,
|
||||
textures::windowUkTexture,
|
||||
0.2,
|
||||
0.1
|
||||
);
|
||||
drawObjectPBR(models::potPlant, glm::mat4() * glm::scale(glm::vec3(0.2f)) * glm::translate(glm::vec3(-5.0f, 55.0f, -6.0f)),
|
||||
drawObjectPBR(models::potPlant, glm::mat4() * glm::scale(glm::vec3(0.2f)) * glm::translate(glm::vec3(-5.0f, 3.0f, -6.0f)),
|
||||
textures::potPlantTexture,
|
||||
1.0f,
|
||||
0.2f
|
||||
@ -284,7 +283,7 @@ void renderScene(GLFWwindow* window)
|
||||
0.4f,
|
||||
0.0f
|
||||
);
|
||||
drawObjectPBR(models::desk, glm::mat4(),
|
||||
drawObjectPBR(models::desk, glm::mat4() * glm::translate(glm::vec3(-3.0, 0.0, -3.0f)),
|
||||
textures::deskTexture,
|
||||
0.4f,
|
||||
0.0f
|
||||
@ -299,10 +298,6 @@ void renderScene(GLFWwindow* window)
|
||||
0.3f,
|
||||
0.0f
|
||||
);
|
||||
drawObjectPBR(models::windowFrame, glm::mat4(),
|
||||
textures::windowFrameTexture,
|
||||
0.2f,
|
||||
0.0f);
|
||||
drawObjectPBR(models::bookShelf, glm::mat4() * glm::scale(glm::vec3(0.01)),
|
||||
textures::bookShelfTexture,
|
||||
0.4f,
|
||||
@ -391,18 +386,25 @@ void init(GLFWwindow* window)
|
||||
loadModelToContext("./models/spaceship.obj", models::spaceshipContext);
|
||||
loadModelToContext("./models/sphere.obj", models::sphereContext);
|
||||
|
||||
loadModelToContext("./models2/Frame/Frame.obj", models::windowFrame);
|
||||
loadModelToContext("./models2/bookshelf/shelf.obj", models::bookShelf);
|
||||
loadModelToContext("./models2/potplant/Pot.obj", models::potPlant);
|
||||
loadModelToContext("./models2/lamp/Lamp_LOVMANAD_OBJ.obj", models::lamp);
|
||||
loadModelToContext("./models2/door/source/door.obj", models::door);
|
||||
loadModelToContext("./models2/bed/untitled.obj", models::bed);
|
||||
loadModelToContext("./models2/ceiling_lamp/ceilinglamp.obj", models::ceilingLamp);
|
||||
loadModelToContext("./models2/desk/Desk0.5.obj", models::desk);
|
||||
//loadModelToContext("./models2/chair/Office_chair.obj", models::officeChair);
|
||||
//loadModelToContext("./models2/window/WindowUK.obj", models::window);
|
||||
|
||||
|
||||
textures::sunTexture = Core::LoadTexture("./models/sun.jpeg");
|
||||
textures::windowFrameTexture = Core::LoadTexture("./models2/Frame/frame.png");
|
||||
textures::bookShelfTexture = Core::LoadTexture("./models2/bookshelf/SHELF_TEXTURE.bmp");
|
||||
textures::potPlantTexture = Core::LoadTexture("./models2/potplant/b3.bmp");
|
||||
textures::lampTexture = Core::LoadTexture("./models2/lamp/_Base_color.png");
|
||||
textures::doorTexture = Core::LoadTexture("./models2/door/textures/Door_albedo.bmp");
|
||||
textures::bedTexture = Core::LoadTexture("./models2/bed/bed.png");
|
||||
textures::ceilingLampTexture = Core::LoadTexture("./models2/ceiling_lamp/ceilingLamp.png");
|
||||
textures::deskTexture = Core::LoadTexture("./models2/desk/defsk.png");
|
||||
}
|
||||
|
||||
void shutdown(GLFWwindow* window)
|
||||
|