Restructure scene and add some models, change light intensity
12
cw 9/models/Chair_Cube.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.008
|
||||
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
|
12
cw 9/models/Desk_Cube.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.009
|
||||
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
|
22
cw 9/models/Door1.mtl
Normal file
@ -0,0 +1,22 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Door
|
||||
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 Glossy_Reflexion.jpg
|
||||
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
|
22
cw 9/models/Door2.mtl
Normal file
@ -0,0 +1,22 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Door
|
||||
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 Glossy
|
||||
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
|
12
cw 9/models/Door3.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Door
|
||||
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
|
12
cw 9/models/DoorCircle.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Glossy_Reflexion.jpg
|
||||
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
|
12
cw 9/models/Marble_Bust.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl marble_bust_01.001
|
||||
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
|
12
cw 9/models/Pencils_Cylinder.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material.010
|
||||
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
|
12
cw 9/models/Room.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl None.008
|
||||
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
|
12
cw 9/models/Sofa_baseCube.mtl
Normal file
@ -0,0 +1,12 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
||||
|
||||
newmtl Material_Wool.jpg.001
|
||||
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
|
2
cw 9/models/plane.mtl
Normal file
@ -0,0 +1,2 @@
|
||||
# Blender 3.4.1 MTL File: 'Akwarium_room.blend'
|
||||
# www.blender.org
|
@ -131,5 +131,5 @@ void main()
|
||||
|
||||
outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1);
|
||||
//outColor = vec4(roughness,metallic,0,1);
|
||||
//outColor = vec4(test;
|
||||
//outColor = vec4(test);
|
||||
}
|
||||
|
@ -34,6 +34,11 @@ namespace models {
|
||||
Core::RenderContext sphereContext;
|
||||
Core::RenderContext windowContext;
|
||||
Core::RenderContext testContext;
|
||||
|
||||
Core::RenderContext sofaContext;
|
||||
Core::RenderContext door1Context;
|
||||
Core::RenderContext door2Context;
|
||||
Core::RenderContext door3Context;
|
||||
}
|
||||
|
||||
GLuint depthMapFBO;
|
||||
@ -49,8 +54,8 @@ Core::Shader_Loader shaderLoader;
|
||||
Core::RenderContext shipContext;
|
||||
Core::RenderContext sphereContext;
|
||||
|
||||
glm::vec3 sunPos = glm::vec3(-4.740971f, 2.149999f, 0.369280f);
|
||||
glm::vec3 sunDir = glm::vec3(-0.93633f, 0.351106, 0.003226f);
|
||||
glm::vec3 sunPos = glm::vec3(-0.028716f, 2.06441f, 3.84067f);
|
||||
glm::vec3 sunDir = glm::vec3(-0.93633f, 0.351106f, 0.003226f);
|
||||
glm::vec3 sunColor = glm::vec3(0.9f, 0.9f, 0.7f)*5;
|
||||
|
||||
glm::vec3 cameraPos = glm::vec3(0.479490f, 1.250000f, -2.124680f);
|
||||
@ -66,11 +71,11 @@ float aspectRatio = 1.f;
|
||||
float exposition = 1.f;
|
||||
|
||||
glm::vec3 pointlightPos = glm::vec3(0, 2, 0);
|
||||
glm::vec3 pointlightColor = glm::vec3(0.9, 0.6, 0.6);
|
||||
glm::vec3 pointlightColor = glm::vec3(0.9, 0.6, 0.6)*3;
|
||||
|
||||
glm::vec3 spotlightPos = glm::vec3(0, 0, 0);
|
||||
glm::vec3 spotlightConeDir = glm::vec3(0, 0, 0);
|
||||
glm::vec3 spotlightColor = glm::vec3(0.4, 0.4, 0.9)*3;
|
||||
glm::vec3 spotlightColor = glm::vec3(0.4, 0.4, 0.9)*5;
|
||||
float spotlightPhi = 3.14 / 4;
|
||||
|
||||
|
||||
@ -194,17 +199,23 @@ void renderScene(GLFWwindow* window)
|
||||
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)),
|
||||
glm::vec3(0.5, 0.5, 0.5), 0.7, 0.0);
|
||||
|
||||
drawObjectPBR(models::bedContext, glm::mat4(), glm::vec3(0.03f, 0.03f, 0.03f), 0.2f, 0.0f);
|
||||
//drawObjectPBR(models::bedContext, glm::mat4(), glm::vec3(0.03f, 0.03f, 0.03f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::chairContext, glm::mat4(), glm::vec3(0.195239f, 0.37728f, 0.8f), 0.4f, 0.0f);
|
||||
drawObjectPBR(models::deskContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::doorContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
//drawObjectPBR(models::doorContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
|
||||
drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||
//drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||
drawObjectPBR(models::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
|
||||
drawObjectPBR(models::planeContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||
drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
//drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
|
||||
drawObjectPBR(models::sofaContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
|
||||
drawObjectPBR(models::door1Context, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::door2Context, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
drawObjectPBR(models::door3Context, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||
|
||||
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f)));
|
||||
glm::vec3 spaceshipUp = glm::normalize(glm::cross(spaceshipSide, spaceshipDir));
|
||||
@ -273,21 +284,25 @@ void init(GLFWwindow* window)
|
||||
loadModelToContext("./models/sphere.obj", sphereContext);
|
||||
loadModelToContext("./models/spaceship.obj", shipContext);
|
||||
|
||||
|
||||
loadModelToContext("./models/bed.obj", models::bedContext);
|
||||
loadModelToContext("./models/chair.obj", models::chairContext);
|
||||
loadModelToContext("./models/desk.obj", models::deskContext);
|
||||
loadModelToContext("./models/door.obj", models::doorContext);
|
||||
loadModelToContext("./models/drawer.obj", models::drawerContext);
|
||||
loadModelToContext("./models/marbleBust.obj", models::marbleBustContext);
|
||||
loadModelToContext("./models/materace.obj", models::materaceContext);
|
||||
loadModelToContext("./models/pencils.obj", models::pencilsContext);
|
||||
//loadModelToContext("./models/bed.obj", models::bedContext);
|
||||
loadModelToContext("./models/Chair_Cube.obj", models::chairContext);
|
||||
loadModelToContext("./models/Desk_Cube.obj", models::deskContext);
|
||||
//loadModelToContext("./models/door.obj", models::doorContext);
|
||||
//loadModelToContext("./models/drawer.obj", models::drawerContext);
|
||||
loadModelToContext("./models/Marble_Bust.obj", models::marbleBustContext);
|
||||
//loadModelToContext("./models/materace.obj", models::materaceContext);
|
||||
loadModelToContext("./models/Pencils_Cylinder.obj", models::pencilsContext);
|
||||
loadModelToContext("./models/plane.obj", models::planeContext);
|
||||
loadModelToContext("./models/room.obj", models::roomContext);
|
||||
loadModelToContext("./models/spaceship.obj", models::spaceshipContext);
|
||||
loadModelToContext("./models/sphere.obj", models::sphereContext);
|
||||
loadModelToContext("./models/window.obj", models::windowContext);
|
||||
loadModelToContext("./models/test.obj", models::testContext);
|
||||
//loadModelToContext("./models/window.obj", models::windowContext);
|
||||
//loadModelToContext("./models/test.obj", models::testContext);
|
||||
|
||||
loadModelToContext("./models/Sofa_baseCube.obj", models::sofaContext);
|
||||
loadModelToContext("./models/Door1.obj", models::door1Context);
|
||||
loadModelToContext("./models/Door2.obj", models::door2Context);
|
||||
loadModelToContext("./models/Door3.obj", models::door3Context);
|
||||
|
||||
}
|
||||
|
||||
|
BIN
cw 9/textures/136g.jpg
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
cw 9/textures/14_5_25_d.jpg
Normal file
After Width: | Height: | Size: 875 KiB |
BIN
cw 9/textures/4_1_2_d.jpg
Normal file
After Width: | Height: | Size: 3.1 MiB |
BIN
cw 9/textures/4_browns.jpg
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
cw 9/textures/4_redsml.jpg
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
cw 9/textures/koja_(8).jpg
Normal file
After Width: | Height: | Size: 263 KiB |
BIN
cw 9/textures/leat swh.jpg
Normal file
After Width: | Height: | Size: 307 KiB |