changed walls to white; added couch and coffee table; #2

Merged
s464965 merged 1 commits from furniture-1 into master 2023-01-14 19:11:00 +01:00
33 changed files with 401469 additions and 45 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,33 +1,33 @@
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(513,5): warning MSB8028: Katalog pośredni (Debug\) zawiera pliki udostępnione z innego projektu (grk-cw9.vcxproj). Może to spowodować niepoprawne zachowanie podczas oczyszczania i ponownej kompilacji.
c:\software\vs19\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(513,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (grk-cw9.vcxproj). This can lead to incorrect clean and rebuild behavior.
main.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra
C:\Users\Genos\Source\Repos\GRK_Room\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : zobacz poprzednią definicję „APIENTRY”
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(95,30): warning C4305: "inicjowanie": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(116,38): warning C4305: "=": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(139,16): warning C4305: "inicjowanie": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(158,15): warning C4101: "textureID": lokalna zmienna, do której nie istnieje odwołanie
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(250,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(271,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(280,108): warning C4305: "argument": obcięcie z "double" do "T"
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
J:\GrafikaKomputerowa\grk\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(91,30): warning C4305: 'initializing': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(112,38): warning C4305: '=': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(135,16): warning C4305: 'initializing': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(154,15): warning C4101: 'textureID': unreferenced local variable
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(246,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(267,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(276,108): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(288,87): warning C4305: "argument": obcięcie z "double" do "T"
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(284,87): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(288,223): warning C4305: "argument": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(291,59): warning C4305: "argument": obcięcie z "double" do "T"
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(284,223): warning C4305: 'argument': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(287,59): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(292,37): warning C4305: "argument": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(324,2): warning C4305: "argument": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(433,21): warning C4305: "-=": obcięcie z "double" do "float"
C:\Users\Genos\source\repos\GRK_Room\cw 9\src\room.hpp(435,21): warning C4305: "+=": obcięcie z "double" do "float"
Box.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
LINK : warning LNK4098: domyślna biblioteka „MSVCRT” powoduje konflikt z innymi bibliotekami; użyj opcji /NODEFAULTLIB:biblioteka
grk-cw9.vcxproj -> C:\Users\Genos\Source\Repos\GRK_Room\Debug\room.exe
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(288,37): warning C4305: 'argument': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(316,2): warning C4305: 'argument': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(421,21): warning C4305: '-=': truncation from 'double' to 'float'
J:\GrafikaKomputerowa\grk\cw 9\src\room.hpp(423,21): warning C4305: '+=': truncation from 'double' to 'float'
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
grk-cw9.vcxproj -> J:\GrafikaKomputerowa\grk\Debug\room.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\Genos\Source\Repos\GRK_Room\Debug\room.exe</FullPath>
<FullPath>J:\GrafikaKomputerowa\grk\Debug\room.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:
Debug|Win32|C:\Users\Genos\Source\Repos\GRK_Room\|
Debug|Win32|J:\GrafikaKomputerowa\grk\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,29 @@
# Blender MTL File: 'Wood_Table.blend'
# Material Count: 2
newmtl Wood_Table
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.779450 0.779450 0.779450
Ks 0.206477 0.106529 0.011122
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd textures\table_Col.png
map_Bump textures\\Wood_Table_N.jpg
map_Ks textures\\Wood_Table_C_2.jpg
map_Ns textures\\Wood_Table_C_2.jpg
newmtl Wood_Table_Glass
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 0.400000
illum 2
map_Kd textures\Wood_Table_N.jpg
map_Bump textures\\Wood_Table_N.jpg
refl textures\\Reflexion.jpg

2039
cw 9/models/coffeeTable.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 30.05.2016 15:23:59
newmtl wire_036036036
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.1412 0.1412 0.1412
Kd 0.1412 0.1412 0.1412
Ks 0.3500 0.3500 0.3500
newmtl wire_135006006
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.5294 0.0235 0.0235
Kd 0.5294 0.0235 0.0235
Ks 0.3500 0.3500 0.3500
newmtl wire_177027088
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6941 0.1059 0.3451
Kd 0.6941 0.1059 0.3451
Ks 0.3500 0.3500 0.3500
newmtl wire_177088027
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6941 0.3451 0.1059
Kd 0.6941 0.3451 0.1059
Ks 0.3500 0.3500 0.3500
newmtl wire_228184153
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.8941 0.7216 0.6000
Kd 0.8941 0.7216 0.6000
Ks 0.3500 0.3500 0.3500
newmtl wire_154154229
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6039 0.6039 0.8980
Kd 0.6039 0.6039 0.8980
Ks 0.3500 0.3500 0.3500

File diff suppressed because it is too large Load Diff

52
cw 9/models/couch.mtl Normal file
View File

@ -0,0 +1,52 @@
# Blender MTL File: 'sofa01.blend'
# Material Count: 5
newmtl Material.002
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.390722 0.186268 0.428691
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
newmtl Material.003
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.428691 0.132868 0.114435
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
newmtl Material.004
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.428691 0.205878 0.063647
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
newmtl m_sofa
Ns 9.000004
Ka 1.000000 1.000000 1.000000
Kd 0.661863 0.556516 0.421331
Ks 0.000000 0.000000 0.000000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 1
newmtl m_sofa_bottom
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.132863 0.112958 0.087189
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2

11058
cw 9/models/couch.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ int main(int argc, char** argv)
#endif
// tworzenie okna za pomoca glfw
GLFWwindow* window = glfwCreateWindow(500, 500, "FirstWindow", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(500, 500, "The Best Room", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;

View File

@ -23,14 +23,10 @@ const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
int WIDTH = 500, HEIGHT = 500;
namespace models {
Core::RenderContext bedContext;
Core::RenderContext chairContext;
Core::RenderContext deskContext;
Core::RenderContext couchContext;
Core::RenderContext coffeeTableContext;
Core::RenderContext doorContext;
Core::RenderContext drawerContext;
Core::RenderContext marbleBustContext;
Core::RenderContext materaceContext;
Core::RenderContext pencilsContext;
Core::RenderContext planeContext;
Core::RenderContext roomContext;
Core::RenderContext spaceshipContext;
@ -91,7 +87,7 @@ glm::vec3 pointlightColor = glm::vec3(0.9, 0.6, 0.6);
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(1.0, 1.0, 1.0)*10;
float spotlightPhi = 3.14 / 4;
glm::mat4 lightVP = glm::ortho(-10.f, 10.f, -10.f, 10.f, 1.0f, 30.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
@ -291,17 +287,13 @@ 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::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::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
drawObjectPBR(models::couchContext, glm::scale(glm::vec3(0.5f)) * glm::translate(glm::vec3(8.f, 0, -0.4f)) * glm::eulerAngleY(3.15f), glm::vec3(0.03f, 0.03f, 0.03f), 0.2f, 0.0f);
drawObjectPBR(models::coffeeTableContext, glm::translate(glm::vec3(2.5f, 0, 0.5f)), glm::vec3(1.f, 1.f, 1.f), 0.4f, 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::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
drawObjectPBR(models::planeContext, scaleToRoom(glm::mat4()), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
drawObjectPBR(models::roomContext, scaleToRoom(glm::mat4()), glm::vec3(0.2f, 0.2f, 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::roomContext, scaleToRoom(glm::mat4()), glm::vec3(1.0f, 1.0f, 1.0f), 0.8f, 0.0f);
drawObjectPBR(models::windowContext, glm::translate(glm::vec3(-2.9f, 0, 0)), 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));
@ -377,14 +369,10 @@ void init(GLFWwindow* window)
loadModelToContext("./models/cube.obj", cubeContext);
loadModelToContext("./models/bed.obj", models::bedContext);
loadModelToContext("./models/chair.obj", models::chairContext);
loadModelToContext("./models/desk.obj", models::deskContext);
loadModelToContext("./models/couch.obj", models::couchContext);
loadModelToContext("./models/coffeeTable.obj", models::coffeeTableContext);
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/plane.obj", models::planeContext);
loadModelToContext("./models/room.obj", models::roomContext);
loadModelToContext("./models/spaceship.obj", models::spaceshipContext);