]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
Point light relocated
authorLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 07:15:06 +0000 (09:15 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 07:15:06 +0000 (09:15 +0200)
document updated
minor level changes
pressing ESC once pauses the game without exiting it

Weave/Stage.cpp
Weave/main.cpp
doc/Weave.tex
models/level_3.blend
models/level_3.blend1
models/level_3.dae
shader/basicTexture_VS.hlsl
shader/lightingTexture_FS.hlsl

index 37bd9d9238f9a959b5e1a14914afae89547db315..71d84ae7d559695db191b00c7b76dbaedbe43b77 100644 (file)
@@ -117,6 +117,7 @@ Stage::Stage(int num)
                tmp_world = new Level("level_2", "model_levelTest_2D.jpg");
                current_world->addObject(tmp_world);
 
+
                //Player
                tmp_playerObject = new Marvin(translate(vec3(-5.38658f, 0.73429f, 30.24083f))*rotate((float)M_PI_4, vec3(0.f, 1.f, 0.f)));
 
@@ -124,21 +125,6 @@ Stage::Stage(int num)
                current_world->setLookAt(tmp_playerObject);
 
 
-               lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png");
-               current_world->addObject(lever1);
-               lever1->setAnimationLoop(false);
-
-
-               door1 = new Door(translate(vec3(-9.78039f, -1.06029f, -6.46377f)) * rotate(1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png");
-               current_world->addObject(door1);
-               door1->setup(1.5708f, vec3(0, 1, 0), 1);
-               lever1->setup(door1);
-               door2 = new Door(translate(vec3(-2.58412f, -1.06029f, -6.46377f)) * rotate(-1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png");
-               current_world->addObject(door2);
-               door2->setup(-1.5708f, vec3(0, 1, 0), 1);
-               lever1->setup(door2);
-
-
                current_world->addObject(new Level(translate(vec3(-5.50806f, 0.91084f, 19.01143f)) * rotate(-1.57f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
                current_world->addObject(new Level(translate(vec3(-5.50806f, -0.52355f, 7.75976f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
                current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -3.00258f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
@@ -157,6 +143,21 @@ Stage::Stage(int num)
                current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0))));
                current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0))));
 
+
+               lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png");
+               current_world->addObject(lever1);
+               lever1->setAnimationLoop(false);
+
+
+               door1 = new Door(translate(vec3(-9.78039f, -1.06029f, -6.46377f)) * rotate(1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png");
+               current_world->addObject(door1);
+               door1->setup(1.5708f, vec3(0, 1, 0), 1);
+               lever1->setup(door1);
+               door2 = new Door(translate(vec3(-2.58412f, -1.06029f, -6.46377f)) * rotate(-1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png");
+               current_world->addObject(door2);
+               door2->setup(-1.5708f, vec3(0, 1, 0), 1);
+               lever1->setup(door2);
+
                for (int i = -9; i < -2; i++)
                {
                        for (int j = -1; j < 3; j++)
@@ -174,6 +175,7 @@ Stage::Stage(int num)
                tmp_world = new Level("level_3", "model_levelTest_2D.jpg");
                current_world->addObject(tmp_world);
 
+
                //Player
                tmp_playerObject = new Marvin(translate(vec3(0.f, 0.73429f, 0.f)));
 
@@ -181,6 +183,12 @@ Stage::Stage(int num)
                current_world->setLookAt(tmp_playerObject);
 
 
+               current_world->addObject(new Boar(translate(vec3(-7.14729f, 0.1f, -3.08567f)) * rotate(1.5f, vec3(0, 1, 0))));
+               current_world->addObject(new Boar(translate(vec3(13.32701f, 0.1f, -2.53362f)) * rotate(1.8f, vec3(0, 1, 0))));
+               current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0))));
+               current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0))));
+
+
                lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png");
                current_world->addObject(lever1);
                lever1->setAnimationLoop(false);
@@ -196,23 +204,7 @@ Stage::Stage(int num)
                lever1->setup(door2);
 
 
-               current_world->addObject(new Level(translate(vec3(-5.50806f, 0.91084f, 19.01143f)) * rotate(-1.57f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(-5.50806f, -0.52355f, 7.75976f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -3.00258f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -6.02786f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(10.0674f, -1.3978f, -1.83059f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(10.02701f, -1.3978f, 1.3517f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(16.17073f, -1.46596f, -5.34347f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(21.94122f, -1.36633f, 2.71334f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(30.17974f, -3.34705f, -2.16098f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(18.57976f, 2.46041f, -1.78333f)) * rotate(0.51f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
-               current_world->addObject(new Level(translate(vec3(26.31248f, 1.66742f, 0.82817f)) * rotate(-0.95f, vec3(0, 1, 0)) * rotate(-0.35f, vec3(1, 0, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png"));
-
 
-               current_world->addObject(new Boar(translate(vec3(-7.14729f, 0.1f, -3.08567f)) * rotate(1.5f, vec3(0, 1, 0))));
-               current_world->addObject(new Boar(translate(vec3(13.32701f, 0.1f, -2.53362f)) * rotate(1.8f, vec3(0, 1, 0))));
-               current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0))));
-               current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0))));
                break;
        }
 }
index 7a19976f2297a59572fc39eb7680fa51b269ef1b..8debe44058583c2eb0ba6988956b534c08881eb7 100644 (file)
@@ -60,6 +60,9 @@ int main(int argc, char *argv[])
                        Stage spiel1(level);
 
                        spiel1.play();
+
+                       if (Events::halt == 1)
+                       Events::halt = false;
                }
                Events::processEvents();
                if (Events::halt == 1)
index fd1b459275693cfb2147bb44f6688d24952623a9..fb0ae9750ac863f0b44ec3e5131e6e597dbca981 100644 (file)
@@ -22,7 +22,8 @@ This was realised by using the GLM. Transform functions to create model,view and
 
 
 \subsection{Moving objects}
-The player is freely movable through the world by using WASD and Space or the left mouse button for jumping.
+The player is freely movable through the world by using WASD and Space or the left mouse button for jumping.\\
+Turning levers will open doors.
 
 
 \subsection{Texture Mapping}
@@ -31,29 +32,64 @@ Models are made with Blender and their .dae files which include their UVs (as we
 Materials are saved as Vectors with 4 entries: The intensities for the 3 different light source types and one for the glossiness.
 
 \subsection{Simple lighting and materials}
-There is one point-lightsource, one ambient light source and one directional light source. All of their positions / directions and intensities are currently hardcoded into the shader files.
+There is one point-lightsource, one ambient light source and one directional light source.\\
+The ambient and directional lights are programmed dynamically and can be adjusted. There is one point-light hardcoded into the shader files. It is located near the lever in the first level.\\
+Only the directional light casts shadows.
 
 \subsection{Controls}
-The camera can be controlled with the mouse.
-You can control the player with the WASD Keys and jump with Space or the left mouse button.
-If you hold the shift-key you can reverse time, meaning that if you jump down somewhere you can get back up by rewinding time until you're back to before you jumped.
-Pressing F3 toggles Wire Frames.
-Pressing F6 makes the Bounding Meshes and Event Boxes visible.
+The camera can be controlled with the mouse.\\
+You can control the player with the WASD Keys and jump with Space or the left mouse button.\\
+Levers can be pressed with the E key.\\
+If you hold the shift-key you can reverse time, meaning that if you jump down somewhere you can get back up by rewinding time until you're back to before you jumped.\\
+Pressing F2 shows the frames per second in the window name.\\
+Pressing F3 toggles Wire Frames.\\
+Pressing F4 toggles the texture sampling quality.\\
+Pressing F5 cycles through the Mip Mapping qualities.\\
+Pressing F6 makes the Bounding Meshes and Event Boxes visible.\\
+Pressing F8 toggles frustum culling on and off.\\
+Pressing F9 toggles transparency on and off (the doors are partly transparent at the top).\\
 You can exit by pressing ESC twice and you can restart the level by pressing ESC and then R.
 
 \subsection{Basic Gameplay}
 The player can move around the world and jump around. Collisions work properly and you can stand on ground and all that good stuff.
-Colliding with the duck or the lever doesn't do anything (it is registered, but no effect is implemented).
-Colliding with the event box triggers text in the console to appear and disables controls.
+Colliding with the boar will lose the game. This can be reverted by turning back time. Levers can be turned by pressing E.
+Green glowing objects can't be reverted back in time.
+Colliding with the win-box loads the next level.
+There are currently two levels.
+
+
+\subsection{Effects}
+Shadow Mapping with PCF (1.5 points). This is only done on the directional light but not on the pointlights.\\
+Motion Blur (1.5 points) when turning back time.\\
+Bloom (1 point): There is always a bit of bloom active, but there are also special green glowing objects in the second level that can't be turned back in time.
+
+
+\subsection{Complex Objects}
+We have several complex objects like the player, the level and the boulders.\\
+
+
+\subsection{Animated Objects}
+The player has a move animation. All other moving objects are simple transformations (like doors opening and levers turning).
+
+
+\subsection{Frustum Culling}
+This is realized with Bounding Spheres.
+
+
+\subsection{Transparency}
+The top of the doors are transparent.
+
+
+\subsection{Experimenting with OpenGL}
+VBOs, VAOs, FBOs, Mip Mapping and Texture Sampling has all been implemented.
 
 
 \section{Features}
-Pressing F2 writes the FPS in the console.
-Pressing F3 toggles Wire Frames.
-Pressing F6 makes the Bounding Boxes and Event Boxes visible.
-Pressing F10 toggles transparency.
-Collisions with the Duck and with Event Boxes trigger messages in the console.
-There is currently one Event Box that makes you lose the game and one that makes you win.
+Colliding with any of the boars will lose you the game and turn the screen red-brown.\\
+You can also jump on the to kill them.\\
+There are two levels. Winning the first one will transport you to the second one.
+The second one doesn't have a win condition implemented, but the goal is to open and free all boars.
+In order to do that you have to solve puzzles.
 
 \section{Illuminated Objects}
 There are multiple complex objects, all of which have textures and are illuminated.
index 7ac4c416f2cb490f5e4195a2b37c46794c7c4022..e8311a4d59e23411c176ebd6571d969c2120d5ea 100644 (file)
Binary files a/models/level_3.blend and b/models/level_3.blend differ
index a1e5b2a53c7aa1eb4013ca29eddd477a64157e1e..28ee2ce2a01952d79b7489bdd4d06bf3728dce54 100644 (file)
Binary files a/models/level_3.blend1 and b/models/level_3.blend1 differ
index ae4ddf44c9cf070aa5dc07cee9d1156ab245f0e9..b162ec1e0273e3d9978772e0d9d05368a8e249d3 100644 (file)
@@ -5,8 +5,8 @@
       <author>Blender User</author>
       <authoring_tool>Blender 2.77.0 commit date:2016-04-05, commit time:18:12, hash:abf6f08</authoring_tool>
     </contributor>
-    <created>2016-06-28T07:07:42</created>
-    <modified>2016-06-28T07:07:42</modified>
+    <created>2016-06-28T08:19:14</created>
+    <modified>2016-06-28T08:19:14</modified>
     <unit name="meter" meter="1"/>
     <up_axis>Z_UP</up_axis>
   </asset>
     <geometry id="Plane_005-mesh" name="Plane.005">
       <mesh>
         <source id="Plane_005-mesh-positions">
-          <float_array id="Plane_005-mesh-positions-array" count="42">-18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037</float_array>
+          <float_array id="Plane_005-mesh-positions-array" count="54">-18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037 16.74848 -1.39027 6.585386 16.74848 6.495846 6.585386 16.75419 6.458951 -5.861035 16.75365 -1.396718 -5.861036</float_array>
           <technique_common>
-            <accessor source="#Plane_005-mesh-positions-array" count="14" stride="3">
+            <accessor source="#Plane_005-mesh-positions-array" count="18" stride="3">
               <param name="X" type="float"/>
               <param name="Y" type="float"/>
               <param name="Z" type="float"/>
           </technique_common>
         </source>
         <source id="Plane_005-mesh-normals">
-          <float_array id="Plane_005-mesh-normals-array" count="66">-4.74004e-4 -0.9245765 0.3809964 0 -0.3826835 0.9238796 0 0.3826835 0.9238796 0 0.9263767 0.3765984 -0.001812338 0.9999985 0 -0.9999989 0.001519501 0 -4.80534e-4 -1 0 0.9999999 0 5.3244e-4 1 0 0 -0.9999992 -5.02838e-4 -0.001214861 0 -0.9238795 0.3826835 0 -0.3826833 0.9238796 0 0.3826833 0.9238796 -0.001704275 0.9238783 0.3826829 1.1942e-4 0.9999836 -0.005743503 -0.9999989 0.001519501 0 2.07239e-4 -0.9999979 -0.002047061 1 -6.7991e-5 3.9549e-4 1 -5.26522e-7 0 1 -1.54215e-7 0 -0.9999954 0.001519441 0.002645432 -0.9999999 2.09444e-4 -5.06022e-4</float_array>
+          <float_array id="Plane_005-mesh-normals-array" count="72">-4.74004e-4 -0.9245765 0.3809964 0 -0.3826835 0.9238796 0 0.3826835 0.9238796 0 0.9263767 0.3765984 -0.001812338 0.9999985 0 -0.9999989 0.001519501 0 -4.80534e-4 -1 0 1 4.16319e-5 4.58537e-4 1 -1.92546e-7 0 -0.9999992 -5.02838e-4 -0.001214861 1 -3.79335e-5 4.15619e-4 0 -0.9238795 0.3826835 0 -0.3826833 0.9238796 0 0.3826833 0.9238796 -0.001704275 0.9238783 0.3826829 1.1942e-4 0.9999836 -0.005743503 -0.9999989 0.001519501 0 2.07239e-4 -0.9999979 -0.002047061 0.9999999 -6.75915e-5 5.32831e-4 1 0 0 1 -4.80871e-7 0 -0.9999954 0.001519441 0.002645432 -0.9999999 2.09444e-4 -5.06022e-4 1 -6.80963e-5 3.9549e-4</float_array>
           <technique_common>
-            <accessor source="#Plane_005-mesh-normals-array" count="22" stride="3">
+            <accessor source="#Plane_005-mesh-normals-array" count="24" stride="3">
               <param name="X" type="float"/>
               <param name="Y" type="float"/>
               <param name="Z" type="float"/>
           </technique_common>
         </source>
         <source id="Plane_005-mesh-map-0">
-          <float_array id="Plane_005-mesh-map-0-array" count="132">0.7294408 0.4026927 0.5565676 0.9981268 0.7294406 0.9986009 0.5565556 0.402686 0.4585115 0.9980884 0.5565676 0.9981268 1 0.4027057 0.9022533 0.9980995 1 0.9981465 0.9022532 0.4026588 0.7296274 0.9979444 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.448051 0.4040852 0.4584999 0.4026477 0.6866806 0 0.6866807 0.4026477 0.2239893 0.4040126 0 0.9999269 1.42582e-4 0.4040188 0.2302656 0 0.4584997 0.4028625 0.2302658 0.4040126 0.2302656 0 0.06744325 0.3448463 0 0.2020063 0.9169994 0.2017202 0.8495561 0.3445602 0.6866807 0.4026477 0.7294408 0.4026927 0.5565556 0.402686 0.5565676 0.9981268 0.5565556 0.402686 0.4584997 0.4026477 0.4585115 0.9980884 1 0.4027057 0.9022532 0.4026588 0.9022533 0.9980995 0.9022532 0.4026588 0.7294408 0.4026477 0.7296274 0.9979444 0.448051 0.9993818 0.2239893 0.9994155 0.2242982 0.4040126 0.4584999 0.4026477 0.4584997 0 0.6866806 0 0.2239893 0.4040126 0.2239893 1 0 0.9999269 0.2302656 0 0.4584996 4.09817e-4 0.4584997 0.4028625 0 0.2020063 0.06744319 0.05916631 0.2302656 0 0.2302656 0 0.2302658 0.4040126 0.06744325 0.3448463 0.6866807 0.4026477 0.6866806 0 0.8495563 0.05888038 0.8495563 0.05888038 0.9169994 0.2017202 0.6866807 0.4026477</float_array>
+          <float_array id="Plane_005-mesh-map-0-array" count="156">0.7294408 0.4026927 0.5565676 0.9981268 0.7294406 0.9986009 0.5565556 0.402686 0.4585115 0.9980884 0.5565676 0.9981268 1 0.4027057 0.9022533 0.9980995 1 0.9981465 0.9022532 0.4026588 0.7296274 0.9979444 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.448051 0.4040852 0.4584999 0.4026477 0.6866806 0 0.6866807 0.4026477 0.2239893 0.4040126 0 0.9999269 1.42582e-4 0.4040188 0.4584996 0.2687116 0.2302658 0.4040126 0.2302657 0.2693417 0.2302657 0.2693417 0.06744325 0.3448463 0 0.2020063 0.9169994 0.2017202 0.8495561 0.3445602 0.6866807 0.4026477 0.2302656 0 0.4584996 0.1345607 0.2302657 0.1346709 0.7294408 0.4026927 0.5565556 0.402686 0.5565676 0.9981268 0.5565556 0.402686 0.4584997 0.4026477 0.4585115 0.9980884 1 0.4027057 0.9022532 0.4026588 0.9022533 0.9980995 0.9022532 0.4026588 0.7294408 0.4026477 0.7296274 0.9979444 0.448051 0.9993818 0.2239893 0.9994155 0.2242982 0.4040126 0.4584999 0.4026477 0.4584997 0 0.6866806 0 0.2239893 0.4040126 0.2239893 1 0 0.9999269 0.4584996 0.2687116 0.4584997 0.4028625 0.2302658 0.4040126 0 0.2020063 0.06744319 0.05916631 0.2302657 0.1346709 0.06744319 0.05916631 0.2302656 0 0.2302657 0.1346709 0.2302658 0.4040126 0.06744325 0.3448463 0.2302657 0.2693417 0 0.2020063 0.2302657 0.1346709 0.2302657 0.2693417 0.6866807 0.4026477 0.6866806 0 0.8495563 0.05888038 0.8495563 0.05888038 0.9169994 0.2017202 0.6866807 0.4026477 0.2302656 0 0.4584996 4.09817e-4 0.4584996 0.1345607</float_array>
           <technique_common>
-            <accessor source="#Plane_005-mesh-map-0-array" count="66" stride="2">
+            <accessor source="#Plane_005-mesh-map-0-array" count="78" stride="2">
               <param name="S" type="float"/>
               <param name="T" type="float"/>
             </accessor>
         <vertices id="Plane_005-mesh-vertices">
           <input semantic="POSITION" source="#Plane_005-mesh-positions"/>
         </vertices>
-        <polylist count="22">
+        <polylist count="26">
           <input semantic="VERTEX" source="#Plane_005-mesh-vertices" offset="0"/>
           <input semantic="NORMAL" source="#Plane_005-mesh-normals" offset="1"/>
           <input semantic="TEXCOORD" source="#Plane_005-mesh-map-0" offset="2" set="0"/>
-          <vcount>3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </vcount>
-          <p>3 0 0 4 0 1 2 0 2 5 1 3 6 1 4 4 1 5 7 2 6 8 2 7 6 2 8 9 3 9 0 3 10 8 3 11 1 4 12 10 4 13 0 4 14 10 5 15 2 5 16 0 5 17 13 6 18 3 6 19 2 6 20 3 7 21 11 7 22 1 7 23 3 8 24 9 8 25 7 8 26 6 9 27 8 9 28 0 9 29 3 10 30 5 10 31 4 10 32 5 11 33 7 11 34 6 11 35 7 12 36 9 12 37 8 12 38 9 13 39 1 13 40 0 13 41 1 14 42 11 14 43 10 14 44 10 15 45 13 15 46 2 15 47 13 16 48 12 16 49 3 16 50 3 17 51 12 17 52 11 17 53 7 18 54 5 18 55 3 18 56 3 19 57 1 19 58 9 19 59 0 20 60 2 20 61 4 20 62 4 21 63 6 21 64 0 21 65</p>
+          <vcount>3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </vcount>
+          <p>3 0 0 4 0 1 2 0 2 5 1 3 6 1 4 4 1 5 7 2 6 8 2 7 6 2 8 9 3 9 0 3 10 8 3 11 1 4 12 10 4 13 0 4 14 10 5 15 2 5 16 0 5 17 13 6 18 3 6 19 2 6 20 16 7 21 1 7 22 15 7 23 15 8 24 9 8 25 7 8 26 6 9 27 8 9 28 0 9 29 3 10 30 17 10 31 14 10 32 3 11 33 5 11 34 4 11 35 5 12 36 7 12 37 6 12 38 7 13 39 9 13 40 8 13 41 9 14 42 1 14 43 0 14 44 1 15 45 11 15 46 10 15 47 10 16 48 13 16 49 2 16 50 13 17 51 12 17 52 3 17 53 16 18 54 11 18 55 1 18 56 7 19 57 5 19 58 14 19 59 5 20 60 3 20 61 14 20 62 1 19 63 9 19 64 15 19 65 7 19 66 14 19 67 15 19 68 0 21 69 2 21 70 4 21 71 4 22 72 6 22 73 0 22 74 3 23 75 12 23 76 17 23 77</p>
         </polylist>
       </mesh>
     </geometry>
         </polylist>
       </mesh>
     </geometry>
+    <geometry id="Plane_000-mesh" name="Plane.000">
+      <mesh>
+        <source id="Plane_000-mesh-positions">
+          <float_array id="Plane_000-mesh-positions-array" count="54">-18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037 16.74848 -1.39027 6.585386 16.74848 6.495846 6.585386 16.75419 6.458951 -5.861035 16.75365 -1.396718 -5.861036</float_array>
+          <technique_common>
+            <accessor source="#Plane_000-mesh-positions-array" count="18" stride="3">
+              <param name="X" type="float"/>
+              <param name="Y" type="float"/>
+              <param name="Z" type="float"/>
+            </accessor>
+          </technique_common>
+        </source>
+        <source id="Plane_000-mesh-normals">
+          <float_array id="Plane_000-mesh-normals-array" count="75">4.74013e-4 0.9245764 -0.3809964 0 0.3826835 -0.9238796 0 -0.3826835 -0.9238796 0 -0.9263768 -0.3765984 -1.1942e-4 -0.9999836 0.005743503 0.9999989 -0.001519501 0 4.80534e-4 0.9999999 0 -1 -4.16514e-5 -4.58537e-4 -1 0 0 0.9999999 -2.09499e-4 5.06022e-4 -1 6.80963e-5 -3.9549e-4 0 0.9238795 -0.3826835 0 0.3826833 -0.9238796 0 -0.3826833 -0.9238796 0.001704275 -0.9238782 -0.3826828 0.001812338 -0.9999985 0 0.9999989 -0.001519501 0 -2.07239e-4 0.9999979 0.002047002 -0.9999999 6.76071e-5 -5.32831e-4 -1 4.80871e-7 0 -1 0 0 -1 -1.92546e-7 0 0.9999954 -0.001519501 -0.002645432 0.9999992 5.02969e-4 0.001214861 -1 3.79335e-5 -4.15619e-4</float_array>
+          <technique_common>
+            <accessor source="#Plane_000-mesh-normals-array" count="25" stride="3">
+              <param name="X" type="float"/>
+              <param name="Y" type="float"/>
+              <param name="Z" type="float"/>
+            </accessor>
+          </technique_common>
+        </source>
+        <source id="Plane_000-mesh-map-0">
+          <float_array id="Plane_000-mesh-map-0-array" count="156">0.5565676 0.9981268 0.7294408 0.4026927 0.7294406 0.9986009 0.4585115 0.9980884 0.5565556 0.402686 0.5565676 0.9981268 0.9022533 0.9980995 1 0.4027057 1 0.9981465 0.7296274 0.9979444 0.9022532 0.4026588 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.2239893 0.9994155 0.6866806 0 0.4584999 0.4026477 0.6866807 0.4026477 0 0.9999269 0.2239893 0.4040126 1.42582e-4 0.4040188 0.2302658 0.4040126 0.4584996 0.2687116 0.2302657 0.2693417 0 0.2020063 0.2302657 0.2693417 0.2302657 0.1346709 0.6866807 0.4026477 0.9169994 0.2017202 0.8495563 0.05888038 0.2302656 0 0.4584996 0.1345607 0.4584996 4.09817e-4 0.5565676 0.9981268 0.5565556 0.402686 0.7294408 0.4026927 0.4585115 0.9980884 0.4584997 0.4026477 0.5565556 0.402686 0.9022533 0.9980995 0.9022532 0.4026588 1 0.4027057 0.7296274 0.9979444 0.7294408 0.4026477 0.9022532 0.4026588 0.448051 0.9993818 0.448051 0.4040852 0.2242982 0.4040126 0.6866806 0 0.4584997 0 0.4584999 0.4026477 0 0.9999269 0.2239893 1 0.2239893 0.4040126 0.2302658 0.4040126 0.4584997 0.4028625 0.4584996 0.2687116 0.2302656 0 0.06744319 0.05916631 0.2302657 0.1346709 0 0.2020063 0.06744325 0.3448463 0.2302657 0.2693417 0.06744325 0.3448463 0.2302658 0.4040126 0.2302657 0.2693417 0.2302657 0.1346709 0.06744319 0.05916631 0 0.2020063 0.8495563 0.05888038 0.6866806 0 0.6866807 0.4026477 0.6866807 0.4026477 0.8495561 0.3445602 0.9169994 0.2017202 0.2302656 0 0.2302657 0.1346709 0.4584996 0.1345607</float_array>
+          <technique_common>
+            <accessor source="#Plane_000-mesh-map-0-array" count="78" stride="2">
+              <param name="S" type="float"/>
+              <param name="T" type="float"/>
+            </accessor>
+          </technique_common>
+        </source>
+        <vertices id="Plane_000-mesh-vertices">
+          <input semantic="POSITION" source="#Plane_000-mesh-positions"/>
+        </vertices>
+        <polylist count="26">
+          <input semantic="VERTEX" source="#Plane_000-mesh-vertices" offset="0"/>
+          <input semantic="NORMAL" source="#Plane_000-mesh-normals" offset="1"/>
+          <input semantic="TEXCOORD" source="#Plane_000-mesh-map-0" offset="2" set="0"/>
+          <vcount>3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </vcount>
+          <p>4 0 0 3 0 1 2 0 2 6 1 3 5 1 4 4 1 5 8 2 6 7 2 7 6 2 8 0 3 9 9 3 10 8 3 11 1 4 12 10 4 13 11 4 14 2 5 15 10 5 16 0 5 17 3 6 18 13 6 19 2 6 20 1 7 21 16 7 22 15 7 23 7 8 24 15 8 25 14 8 26 0 9 27 6 9 28 4 9 29 3 10 30 17 10 31 12 10 32 4 11 33 5 11 34 3 11 35 6 12 36 7 12 37 5 12 38 8 13 39 9 13 40 7 13 41 0 14 42 1 14 43 9 14 44 1 15 45 0 15 46 10 15 47 2 16 48 13 16 49 10 16 50 3 17 51 12 17 52 13 17 53 1 18 54 11 18 55 16 18 56 3 19 57 5 19 58 14 19 59 7 8 60 9 8 61 15 8 62 9 20 63 1 20 64 15 20 65 14 21 66 5 21 67 7 21 68 4 22 69 2 22 70 0 22 71 0 23 72 8 23 73 6 23 74 3 24 75 14 24 76 17 24 77</p>
+        </polylist>
+      </mesh>
+    </geometry>
   </library_geometries>
   <library_controllers/>
   <library_visual_scenes>
         <matrix sid="transform">0.6 0 0 -2.171479 0 0.6 0 -3.708623 0 0 0.6 0.7429211 0 0 0 1</matrix>
         <instance_geometry url="#Cylinder_005-mesh" name="Hay"/>
       </node>
+      <node id="Barn_inside" name="Barn_inside" type="NODE">
+        <matrix sid="transform">0.3 0 0 -5.894014 0 0.3 0 1.23451 0 0 0.3 1.655645 0 0 0 1</matrix>
+        <instance_geometry url="#Plane_000-mesh" name="Barn_inside"/>
+      </node>
     </visual_scene>
   </library_visual_scenes>
   <scene>
index 59f371a3c272dfac9c0f58fc26467d8530790c1e..5ef5339e33175ce7ab6f9090b843ced3c2d7e67c 100644 (file)
@@ -20,7 +20,7 @@ uniform mat4 uOldProjView, uInvProjView, uCur2OldModel;
 
 void main()
 {
-       PointLightPosition1 = (uView * vec4(0.0f, 1.0f, 0.0f, 1.f)).xyz;
+       PointLightPosition1 = (uView * vec4(2.4f, 3.7f, -5.54817f, 1.0f)).xyz;
        DirectionalLightDirection1 = normalize((uView * vec4(DirectionalLightDirection, 0.0f)).xyz);
 
        mat4 L = mat4(0.5f);
index e2559d9b1977e5ae264dcf29dc6cb85d1783c14f..c50b5c2c915e50c1cbc332ea9264d38f3d07d6c1 100644 (file)
@@ -32,7 +32,7 @@ void main()
        float specularConst = material[3];
        vec4 uvColor = texture(uColorTexture, fUVs);
 
-       vec3 PointLightColor1 = vec3(2.0f, 2.0f, 2.0f);
+       vec3 PointLightColor1 = vec3(0.7f);
 
        vec3 cameraVec = normalize(eyePosition);
        vec3 worldPointLightDir1 = PointLightPosition1 - eyePosition;