@@ -45,7 +45,7 @@ namespace viknell_scene
4545 wr::TextureHandle bamboo_roughness = texture_pool->LoadFromFile (" resources/materials/bamboo/bamboo-wood-semigloss-roughness.png" , false , true );
4646 wr::TextureHandle bamboo_metallic = texture_pool->LoadFromFile (" resources/materials/bamboo/bamboo-wood-semigloss-metal.png" , false , true );
4747
48- equirectangular_environment_map = texture_pool->LoadFromFile (" resources/materials/SunTemple_Skybox .hdr" , false , false );
48+ equirectangular_environment_map = texture_pool->LoadFromFile (" resources/materials/Circus_Backstage_3k .hdr" , false , false );
4949
5050 // Create Materials
5151 mirror_material = material_pool->Create ();
@@ -69,7 +69,7 @@ namespace viknell_scene
6969 bamboo_material_internal->SetMetallic (bamboo_metallic);
7070
7171 plane_model = model_pool->Load <wr::VertexColor>(material_pool.get (), texture_pool.get (), " resources/models/plane.fbx" );
72- test_model = model_pool->LoadWithMaterials <wr::VertexColor>(material_pool.get (), texture_pool.get (), " resources/materials/SunTemple .fbx" );
72+ test_model = model_pool->LoadWithMaterials <wr::VertexColor>(material_pool.get (), texture_pool.get (), " resources/models/xbot .fbx" );
7373 sphere_model = model_pool->Load <wr::VertexColor>(material_pool.get (), texture_pool.get (), " resources/models/sphere.fbx" );
7474 }
7575
@@ -84,12 +84,8 @@ namespace viknell_scene
8484
8585 static std::shared_ptr<DebugCamera> camera;
8686 static std::shared_ptr<SplineNode> camera_spline_node;
87- static std::shared_ptr<SplineNode> light_1_spline_node;
88- static std::shared_ptr<SplineNode> light_2_spline_node;
8987 static std::shared_ptr<wr::LightNode> directional_light_node;
9088 static std::shared_ptr<wr::MeshNode> test_model;
91- static std::shared_ptr<wr::LightNode> point_light_1;
92- static std::shared_ptr<wr::LightNode> point_light_2;
9389 static float t = 0 ;
9490
9591 void CreateScene (wr::SceneGraph* scene_graph, wr::Window* window)
@@ -99,21 +95,19 @@ namespace viknell_scene
9995 camera->SetSpeed (10 );
10096
10197 camera_spline_node = scene_graph->CreateChild <SplineNode>(nullptr , " Camera Spline" , false );
102- light_1_spline_node = scene_graph->CreateChild <SplineNode>(nullptr , " Light 1 Spline" , true );
103- light_2_spline_node = scene_graph->CreateChild <SplineNode>(nullptr , " Light 2 Spline" , true );
10498
10599 scene_graph->m_skybox = resources::equirectangular_environment_map;
106100 auto skybox = scene_graph->CreateChild <wr::SkyboxNode>(nullptr , resources::equirectangular_environment_map);
107101
108102 // Geometry
109- // auto floor = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::plane_model);
110- // auto roof = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::plane_model);
111- // auto back_wall = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::plane_model);
112- // auto left_wall = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::plane_model);
113- // auto right_wall = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::plane_model);
103+ auto floor = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::plane_model);
104+ auto roof = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::plane_model);
105+ auto back_wall = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::plane_model);
106+ auto left_wall = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::plane_model);
107+ auto right_wall = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::plane_model);
114108 test_model = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::test_model);
115- // auto sphere = scene_graph->CreateChild<wr::MeshNode>(nullptr, resources::sphere_model);
116- /* floor->SetPosition({0, -1, 0});
109+ auto sphere = scene_graph->CreateChild <wr::MeshNode>(nullptr , resources::sphere_model);
110+ floor->SetPosition ({0 , -1 , 0 });
117111 floor->SetRotation ({90_deg, 0 , 0 });
118112 floor->AddMaterial (resources::bamboo_material);
119113 sphere->SetPosition ({1 , -1 , -1 });
@@ -130,23 +124,21 @@ namespace viknell_scene
130124 left_wall->AddMaterial (resources::bamboo_material);
131125 right_wall->SetPosition ({1 , 0 , 0 });
132126 right_wall->SetRotation ({0 , 90_deg, 0 });
133- right_wall->AddMaterial(resources::bamboo_material);*/
127+ right_wall->AddMaterial (resources::bamboo_material);
134128 test_model->SetPosition ({0 , -1 , 0 });
135129 test_model->SetRotation ({0 , 180_deg, 0 });
136130 test_model->SetScale ({0 .01f ,0 .01f ,0 .01f });
137131
138-
139132 // Lights
140- auto point_light_0 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::POINT, DirectX::XMVECTOR{ 1000 / 255 , 1000 / 255 , 1000 / 255 });
141- // point_light_0->SetRadius(3.0f);
142- point_light_0->SetPosition ({ 0 , 2.5 , 0 });
143- point_light_0->SetRadius (10000 .f );
133+ auto point_light_0 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::DIRECTIONAL, DirectX::XMVECTOR{ 1 , 1 , 1 });
134+ point_light_0->SetRotation ({20.950 , 0.98 , 0 });
135+ point_light_0->SetPosition ({-0.002 , 0.080 , 1.404 });
144136
145- point_light_1 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::POINT, DirectX::XMVECTOR{3000 / 255 , 0 , 0 });
137+ auto point_light_1 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::POINT, DirectX::XMVECTOR{1 , 0 , 0 });
146138 point_light_1->SetRadius (5 .0f );
147139 point_light_1->SetPosition ({0.5 , 0 , -0.3 });
148140
149- point_light_2 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::POINT, DirectX::XMVECTOR{0 , 0 , 3000 / 255 });
141+ auto point_light_2 = scene_graph->CreateChild <wr::LightNode>(nullptr , wr::LightType::POINT, DirectX::XMVECTOR{0 , 0 , 1 });
150142 point_light_2->SetRadius (5 .0f );
151143 point_light_2->SetPosition ({-0.5 , 0.5 , -0.3 });
152144
@@ -163,7 +155,5 @@ namespace viknell_scene
163155
164156 camera->Update (ImGui::GetIO ().DeltaTime );
165157 camera_spline_node->UpdateSplineNode (ImGui::GetIO ().DeltaTime , camera);
166- light_1_spline_node->UpdateSplineNode (ImGui::GetIO ().DeltaTime , point_light_1);
167- light_2_spline_node->UpdateSplineNode (ImGui::GetIO ().DeltaTime , point_light_2);
168158 }
169159} /* cube_scene */
0 commit comments