WEBVTT 1 00:00:05.524 --> 00:00:09.904 Game Basics Game Level Design 2 00:00:09.904 --> 00:00:12.124 GCC Academy 3 00:00:27.576 --> 00:00:29.296 Hello everyone 4 00:00:29.296 --> 00:00:32.376 This is Tak Kwang-wook, in charge of Unity Game Programming 5 00:00:32.376 --> 00:00:35.136 In this section, we will work on decorating the space, 6 00:00:35.136 --> 00:00:37.736 focusing on the level design process 7 00:00:37.736 --> 00:00:41.496 We will learn how to create a 3D model based on an apartment floor plan, 8 00:00:41.496 --> 00:00:43.256 apply colors to the 3D model, 9 00:00:43.256 --> 00:00:47.072 and match lighting to make the space look realistic 10 00:00:47.072 --> 00:00:50.932 Creating a 3D Space Using a 2D Floor Plan and Applying Materials 11 00:00:50.932 --> 00:00:54.790 I searched for an apartment floor plan online 12 00:00:55.330 --> 00:00:57.630 Based on this floor plan, 13 00:00:57.631 --> 00:01:00.594 I will create a 3D model in Unity 14 00:01:01.250 --> 00:01:05.650 The floor plan is in millimeters, 15 00:01:05.650 --> 00:01:08.770 but the unit used in Unity 16 00:01:09.210 --> 00:01:12.570 is the same as 1 meter 17 00:01:12.930 --> 00:01:15.690 For example, 18 00:01:15.691 --> 00:01:17.151 let's look at this number 19 00:01:17.370 --> 00:01:20.810 A measurement of 1840mm in the floor plan 20 00:01:20.810 --> 00:01:24.470 will be represented as 10.84m in Unity, 21 00:01:24.470 --> 00:01:27.970 converted into meters 22 00:01:29.329 --> 00:01:30.570 Please note this unit conversion 23 00:01:30.770 --> 00:01:34.050 We will continuously refer to the image 24 00:01:34.443 --> 00:01:37.023 that we have open for guidance 25 00:01:37.130 --> 00:01:39.310 If you have a dual monitor setup, 26 00:01:39.405 --> 00:01:41.765 I recommend displaying this image on the second monitor 27 00:01:41.765 --> 00:01:45.130 and checking it while working on Unity 28 00:01:45.594 --> 00:01:46.774 Please notice that 29 00:01:47.130 --> 00:01:49.649 I have created a new scene 30 00:01:49.649 --> 00:01:54.290 and saved it as Interior 31 00:01:54.770 --> 00:01:58.069 Let’s start by creating the apartment in this space 32 00:01:58.449 --> 00:02:00.370 First, we will create the floor 33 00:02:00.370 --> 00:02:04.610 The floor is 10.84m in width 34 00:02:04.610 --> 00:02:07.349 and 4.3m in length 35 00:02:09.849 --> 00:02:13.129 Let’s create the floor by following these dimensions 36 00:02:13.129 --> 00:02:16.690 Click the + button to create a 3D Object and choose a Cube 37 00:02:16.690 --> 00:02:18.529 We will name the cube 38 00:02:18.529 --> 00:02:22.049 as Ground to represent the floor 39 00:02:22.489 --> 00:02:25.210 So this cube will be our floor 40 00:02:25.210 --> 00:02:29.530 When adding any object, I will place it at the origin as a rule 41 00:02:30.590 --> 00:02:32.549 So it's at the origin 42 00:02:34.449 --> 00:02:38.690 Looking at the floor plan, the width is 10.84m 43 00:02:39.330 --> 00:02:40.710 so enter 18,040 for the Z-axis 44 00:02:40.806 --> 00:02:43.006 and 10.84 for the X-axis 45 00:02:43.010 --> 00:02:48.550 In Unity, the Z-axis points forward, 46 00:02:48.550 --> 00:02:53.309 X-axis points to the right, and the Y-axis points upward 47 00:02:53.489 --> 00:02:56.670 This is likely what you're seeing now 48 00:02:56.970 --> 00:02:58.750 In Unity, 49 00:02:59.104 --> 00:03:02.884 Z is the forward direction, 50 00:03:03.369 --> 00:03:05.750 X is to the right, 51 00:03:05.750 --> 00:03:06.470 or the red, 52 00:03:06.470 --> 00:03:08.890 the red arrow pointing to the right 53 00:03:08.890 --> 00:03:11.129 So this is Right 54 00:03:11.130 --> 00:03:13.470 The right side 55 00:03:13.470 --> 00:03:15.890 And the green Y is up, 56 00:03:15.890 --> 00:03:18.090 so the Y axis is Up 57 00:03:18.090 --> 00:03:19.331 The upward direction 58 00:03:19.331 --> 00:03:21.169 So, generally, with the Gizmo, 59 00:03:21.169 --> 00:03:22.809 the blue arrow faces the front, 60 00:03:23.229 --> 00:03:24.730 the red arrow points to the right, 61 00:03:24.831 --> 00:03:27.251 and the green arrow points upward 62 00:03:28.690 --> 00:03:31.130 When these arrows align as such, we can consider the direction correct 63 00:03:31.490 --> 00:03:37.289 Based on this, let’s set the X-axis as the width, the Z-axis as the depth, 64 00:03:37.289 --> 00:03:41.569 a nd the Y-axis as the height 65 00:03:42.369 --> 00:03:46.351 Since the floor plan is a long apartment on the right, 66 00:03:47.332 --> 00:03:50.572 let’s input 10.84 for the X-axis 67 00:03:50.770 --> 00:03:53.010 To do this, select the cube, 68 00:03:53.110 --> 00:03:54.910 or our Ground, 69 00:03:55.050 --> 00:03:59.289 and enter 10.84 in the Scale X value 70 00:03:59.289 --> 00:04:02.250 The cube should now stretch horizontally 71 00:04:03.050 --> 00:04:07.929 For the Z-axis, the value is 4300, 72 00:04:07.929 --> 00:04:09.970 so we will input 4.3 73 00:04:09.970 --> 00:04:15.290 4.3 for the Z-axis 74 00:04:16.130 --> 00:04:19.410 Now the floor is sized correctly, but the height is too thick 75 00:04:19.410 --> 00:04:20.971 It's a very thick floor 76 00:04:20.971 --> 00:04:25.890 Typically, walls are about 10cm thick, 77 00:04:25.890 --> 00:04:30.649 so we will adjust the Y-axis to 0.1 78 00:04:30.649 --> 00:04:33.890 to represent a 10cm wall thickness 79 00:04:33.890 --> 00:04:34.649 Done 80 00:04:34.650 --> 00:04:35.902 We're done with the floor 81 00:04:36.529 --> 00:04:38.311 Let's move on from the left side 82 00:04:38.311 --> 00:04:42.021 Next, we will begin with the balcony, bedroom, and kitchen 83 00:04:42.021 --> 00:04:43.747 We will start by creating the bathroom and bedroom 84 00:04:43.890 --> 00:04:47.169 and place them on the right side for a natural layout 85 00:04:47.169 --> 00:04:48.350 That will be the order 86 00:04:48.770 --> 00:04:51.649 The exact measurements are not the main focus here 87 00:04:51.649 --> 00:04:55.250 The goal today 88 00:04:55.250 --> 00:04:58.289 is not to have these exact numbers, 89 00:04:58.289 --> 00:05:02.810 but is to get the general feel and proportion right 90 00:05:03.250 --> 00:05:05.069 So we'll proceed with that 91 00:05:05.809 --> 00:05:10.710 To start, we will create the left wall of the balcony 92 00:05:11.090 --> 00:05:14.950 Click the + button, select 3D Object, and choose Cube 93 00:05:15.530 --> 00:05:19.729 This will be the balcony, so let’s name it 94 00:05:19.729 --> 00:05:21.990 Balcony, 95 00:05:22.770 --> 00:05:25.850 and since it's the first, Balcony01 96 00:05:26.370 --> 00:05:29.590 Place it near the correct location 97 00:05:31.530 --> 00:05:32.849 and adjust the size first 98 00:05:32.849 --> 00:05:39.910 For the depth, we’ll input 4.3 99 00:05:40.930 --> 00:05:43.849 the wall thickness is 0.1, 100 00:05:43.849 --> 00:05:45.849 which is our x-axis, 101 00:05:45.849 --> 00:05:50.089 the horizontal thickness, so X is 0.1 102 00:05:50.689 --> 00:05:54.170 and the height is 1 now 103 00:05:54.530 --> 00:05:59.009 For a regular house, we need at least 2m 104 00:05:59.009 --> 00:06:03.689 Y-axis will be 2m for human height 105 00:06:04.289 --> 00:06:05.929 Now, we can move it 106 00:06:06.289 --> 00:06:08.729 Move it 107 00:06:08.729 --> 00:06:13.969 Now that the wall is sized, we'll snap it as we learned 108 00:06:13.969 --> 00:06:19.050 Se the V key to snap it to the correct corner 109 00:06:19.050 --> 00:06:23.809 by dragging and dropping it to the corner 110 00:06:24.449 --> 00:06:28.610 For the upper wall, follow the same process 111 00:06:28.610 --> 00:06:30.630 Let's make a balcony wall 112 00:06:31.370 --> 00:06:34.090 Click the + button, choose Cube, 113 00:06:34.090 --> 00:06:36.330 and name it 114 00:06:36.330 --> 00:06:40.130 Balcony 02 for the wall 115 00:06:40.650 --> 00:06:43.969 This wall will be used as the top wall, 116 00:06:43.969 --> 00:06:45.449 so let’s start by creating the width first 117 00:06:45.449 --> 00:06:51.289 Looking at the floor plan, the width is 1340, 118 00:06:51.289 --> 00:06:56.549 o it’s best to set 1.34 for the X-axis 119 00:06:57.289 --> 00:07:02.050 The height is set to 2m, 120 00:07:02.050 --> 00:07:05.209 which is standard for human height 121 00:07:05.449 --> 00:07:08.829 We’ve also set the wall thickness 122 00:07:09.710 --> 00:07:11.730 to 0.1m or 10cm 123 00:07:12.169 --> 00:07:13.009 Now, let’s move the wall 124 00:07:13.009 --> 00:07:13.830 Press V 125 00:07:14.129 --> 00:07:15.150 Snap it into place at the corner 126 00:07:15.530 --> 00:07:16.190 Move 127 00:07:18.236 --> 00:07:19.076 Perfect 128 00:07:21.129 --> 00:07:23.530 Now that the wall is positioned, 129 00:07:23.530 --> 00:07:27.450 let’s copy the Balcony 2 to use on the floor 130 00:07:27.810 --> 00:07:29.189 Let's copy Balcony02 131 00:07:29.190 --> 00:07:31.190 Press Ctrl-D to duplicate 132 00:07:31.449 --> 00:07:35.929 and rename it as Balcony 3 or 03 133 00:07:36.249 --> 00:07:38.010 and now Move 134 00:07:38.330 --> 00:07:42.830 Now, position it in place using the snap feature with the V key, 135 00:07:43.650 --> 00:07:44.609 and the wall is successfully created 136 00:07:46.129 --> 00:07:50.070 Next, for the right wall, we’ll use the left wall as a reference 137 00:07:52.090 --> 00:07:53.349 Duplicate Balcony 1 138 00:07:54.249 --> 00:07:56.890 by pressing Ctrl-D 139 00:07:56.890 --> 00:08:00.950 Rename it to Balcony 4 and position it 140 00:08:00.950 --> 00:08:03.470 That's a simple way of doing this 141 00:08:03.770 --> 00:08:05.389 Once done, use the V key to snap it into place, 142 00:08:06.409 --> 00:08:07.469 and the wall will be set 143 00:08:09.249 --> 00:08:11.870 With this, the Balcony partition is now created 144 00:08:13.770 --> 00:08:16.969 Next, we will create the right bedroom 145 00:08:17.289 --> 00:08:19.729 We will start 146 00:08:19.729 --> 00:08:23.750 by creating the wall on the left side, 147 00:08:24.610 --> 00:08:30.169 which will divide the balcony and the bedroom 148 00:08:30.169 --> 00:08:31.890 This can be done using one wall, but 149 00:08:31.890 --> 00:08:36.129 when we apply materials later, 150 00:08:36.129 --> 00:08:37.970 we’ll see that 151 00:08:37.970 --> 00:08:39.628 for different colors and textures, 152 00:08:39.628 --> 00:08:42.169 objects can only have one color at a time 153 00:08:43.969 --> 00:08:47.610 To change the color of the object, we need to use several techniques 154 00:08:48.050 --> 00:08:51.689 Therefore, we will create one more wall 155 00:08:51.689 --> 00:08:53.491 to have two walls, 156 00:08:53.491 --> 00:08:56.630 each with a different color 157 00:08:57.090 --> 00:09:00.449 Let’s duplicate the wall 4 158 00:09:00.449 --> 00:09:02.909 So Duplicate the wall at 4 159 00:09:02.910 --> 00:09:04.890 by pressing Ctrl-D, 160 00:09:04.890 --> 00:09:07.490 separate it for clarity 161 00:09:07.490 --> 00:09:09.571 and name it 162 00:09:09.571 --> 00:09:10.868 Big Room for clarity 163 00:09:11.490 --> 00:09:15.776 BigRoom01 164 00:09:15.776 --> 00:09:17.355 This will be 165 00:09:18.490 --> 00:09:20.109 a very clear name for it 166 00:09:21.409 --> 00:09:24.170 Use V to snap it on 167 00:09:27.090 --> 00:09:29.189 This wall will be for the large bedroom 168 00:09:29.190 --> 00:09:31.110 We will now create the bedroom on the right 169 00:09:31.569 --> 00:09:34.290 You could create a new object by pressing the plus button, 170 00:09:34.290 --> 00:09:39.210 but it might be easier to copy the balcony wall on the left like this 171 00:09:39.210 --> 00:09:43.009 Let’s press Ctrl-D to duplicate it 172 00:09:43.009 --> 00:09:49.489 and rename it as Big Room 02 173 00:09:51.369 --> 00:09:53.249 Now, let’s adjust the size 174 00:09:53.249 --> 00:09:58.210 For the X-axis, the width is 3150 175 00:09:58.210 --> 00:10:04.388 So, we will set 3.15 for the X-axis, 176 00:10:05.598 --> 00:10:09.337 and that will be the width of the bedroom 177 00:10:11.710 --> 00:10:13.449 Since this is a copy of the balcony object, 178 00:10:13.449 --> 00:10:18.030 there’s no need to adjust the height or thickness 179 00:10:18.290 --> 00:10:24.530 We will just move it using the snap feature, and that should be fine 180 00:10:24.530 --> 00:10:25.910 Now, the wall is positioned properly 181 00:10:29.330 --> 00:10:34.809 For the bottom part, we will copy the Big Room 02 object 182 00:10:34.809 --> 00:10:40.370 by pressing Ctrl-D, and quickly move it into place 183 00:10:46.449 --> 00:10:48.570 Looking at the current Hierarchy, 184 00:10:49.650 --> 00:10:53.169 we’ve been duplicating 185 00:10:53.809 --> 00:10:55.071 and moving objects from the balcony, 186 00:10:55.071 --> 00:10:57.877 but this makes the structure a bit harder to manage 187 00:10:57.890 --> 00:11:01.052 So, let’s organize the balcony objects separately 188 00:11:01.052 --> 00:11:04.474 and the big room objects separately 189 00:11:08.330 --> 00:11:12.650 Now, we will create the bedroom and bathroom from the other end 190 00:11:12.650 --> 00:11:18.290 It would be good to copy the Big Room object for this 191 00:11:18.290 --> 00:11:21.970 Let’s press Ctrl-D to duplicate it and move it 192 00:11:23.210 --> 00:11:26.130 We’ll move it down 193 00:11:26.641 --> 00:11:27.841 and name it 194 00:11:28.270 --> 00:11:29.930 Small Room 195 00:11:55.129 --> 00:11:57.949 You can adjust the measurements as you like 196 00:11:58.189 --> 00:12:00.550 As long as the overall feel is similar, it doesn’t need to be exact 197 00:12:01.410 --> 00:12:06.969 Now, let’s create the bathroom at the end 198 00:12:25.769 --> 00:12:28.770 Next, let’s create the outer walls 199 00:12:28.770 --> 00:12:30.751 We’ll make the walls stretch, 200 00:12:31.900 --> 00:12:32.900 stretch 201 00:12:33.511 --> 00:12:35.631 along the outside of the apartment 202 00:12:36.290 --> 00:12:42.229 So that this can be the wall for the entire house 203 00:12:42.689 --> 00:12:45.350 So for this wall, 204 00:12:45.799 --> 00:12:47.799 let’s add a new wall 205 00:12:47.970 --> 00:12:51.910 Press the plus button, select 3D Object, 206 00:12:54.330 --> 00:13:02.160 and name it Wall 207 00:13:05.210 --> 00:13:08.969 When we place it, it will protrude at the bottom, 208 00:13:09.489 --> 00:13:12.869 but we will ignore that for now 209 00:13:13.449 --> 00:13:17.850 We will copy this outer wall as well, just like we did with the other one 210 00:13:44.184 --> 00:13:48.204 This will complete the basic shape of the apartment 211 00:13:48.464 --> 00:13:50.864 Now, let’s add colors to the walls 212 00:13:50.865 --> 00:13:52.542 Let's color this house 213 00:13:53.944 --> 00:13:59.964 Before we start coloring, let’s review the principles of material expression in 3D space 214 00:14:00.184 --> 00:14:03.305 Most 3D programs, 215 00:14:03.306 --> 00:14:06.386 like Unity, Blender, Max, or Maya, 216 00:14:06.386 --> 00:14:08.479 these 3D programs 217 00:14:08.744 --> 00:14:13.643 use a similar structure to show objects 218 00:14:14.383 --> 00:14:17.005 First, there are points, lines, and planes 219 00:14:17.006 --> 00:14:21.823 to form a mesh that shapes the object 220 00:14:22.099 --> 00:14:24.779 Then, there are elements like numbers, colors, 221 00:14:25.346 --> 00:14:29.285 or images to express texture, 222 00:14:29.640 --> 00:14:34.040 which is material These two elements 223 00:14:34.259 --> 00:14:39.139 are what allow us to visually represent a 3D object 224 00:14:40.699 --> 00:14:44.841 For visual representation, these two elements are essential 225 00:14:45.201 --> 00:14:48.201 In Unity, there is also a component called collider 226 00:14:48.941 --> 00:14:53.461 to define areas for collision detection 227 00:14:53.921 --> 00:14:57.640 There are also other components 228 00:14:57.640 --> 00:15:00.021 that combine to form a game object 229 00:15:00.841 --> 00:15:04.141 Now, we will apply materials 230 00:15:04.141 --> 00:15:09.721 to add colors to the object 231 00:15:11.665 --> 00:15:15.945 Let’s start by coloring the living room 232 00:15:16.325 --> 00:15:21.225 Materials are created in the Project window 233 00:15:21.665 --> 00:15:26.985 To organize resources easily, 234 00:15:26.985 --> 00:15:29.245 we will create a folder 235 00:15:29.245 --> 00:15:32.625 Right-click on the Assets folder and create a new folder 236 00:15:32.626 --> 00:15:36.506 Or click on the plus button to select on it 237 00:15:36.506 --> 00:15:38.285 and create a new folder 238 00:15:38.864 --> 00:15:42.145 We'll make an Art foler 239 00:15:42.146 --> 00:15:44.367 to add the Assets here 240 00:15:46.145 --> 00:15:48.285 Inside this folder, 241 00:15:49.253 --> 00:15:50.613 right-click 242 00:15:50.614 --> 00:15:52.534 or press the plus button 243 00:15:52.534 --> 00:15:53.384 I will choose 244 00:15:53.385 --> 00:15:56.285 to right-click in the empty space 245 00:15:57.924 --> 00:16:02.184 Coose Create > Material 246 00:16:02.184 --> 00:16:06.705 to create a new material 247 00:16:07.305 --> 00:16:09.224 Let’s name it MAT 248 00:16:09.225 --> 00:16:10.175 for Material 249 00:16:10.176 --> 00:16:12.076 MAT_ 250 00:16:12.164 --> 00:16:16.084 We're going to color the living room orange 251 00:16:16.084 --> 00:16:18.745 So let's say Orange 252 00:16:19.702 --> 00:16:22.802 for this Material name 253 00:16:23.725 --> 00:16:25.766 Once the material is created, 254 00:16:25.766 --> 00:16:29.226 you can see various options in the Inspector window on the right 255 00:16:29.285 --> 00:16:34.704 Next, the current state shows two lines extending downward 256 00:16:34.984 --> 00:16:37.904 If you grab these two lines and move them upward, 257 00:16:37.904 --> 00:16:43.864 you will be able to see the preview of the Material 258 00:16:44.624 --> 00:16:47.505 At the top, you’ll notice an option labeled Albedo 259 00:16:47.505 --> 00:16:51.785 Next to it is a small white square 260 00:16:52.545 --> 00:16:57.565 Clicking this square will allow you to choose a color 261 00:16:58.105 --> 00:17:00.924 Let’s click on the orange color here 262 00:17:01.285 --> 00:17:03.965 The outer circle is where you select the color 263 00:17:03.965 --> 00:17:06.665 I’ll rotate it towards orange 264 00:17:07.325 --> 00:17:12.965 and adjust the saturation and brightness by using the inner square 265 00:17:13.365 --> 00:17:19.185 Right now, the black circle is set to white, 266 00:17:19.525 --> 00:17:21.104 which is why no color is appearing 267 00:17:21.105 --> 00:17:26.144 If I move this circle towards the upper-right corner, 268 00:17:26.144 --> 00:17:29.725 you will see that orange appears 269 00:17:30.385 --> 00:17:31.585 You can see it in the preview 270 00:17:32.145 --> 00:17:38.645 So this Material can be thought of as orange-colored paint 271 00:17:40.654 --> 00:17:43.634 Now, let’s apply this Material to the wall 272 00:17:44.334 --> 00:17:47.694 To put it to the wall, 273 00:17:48.174 --> 00:17:50.614 we can either drag and drop the material 274 00:17:50.974 --> 00:17:51.859 onto the wall 275 00:17:51.920 --> 00:17:55.446 or click the wall, 276 00:17:55.934 --> 00:18:02.514 go to the Inspector, and find the Mesh Renderer component 277 00:18:02.734 --> 00:18:05.874 In the Materials section, 278 00:18:07.094 --> 00:18:08.614 you see the menu for it 279 00:18:08.614 --> 00:18:13.514 You can drag and drop the material there as well 280 00:18:13.814 --> 00:18:14.853 They're the same, 281 00:18:14.854 --> 00:18:16.514 either by dragging and dropping 282 00:18:16.514 --> 00:18:20.943 or directly applying it through the Materials section 283 00:18:22.812 --> 00:18:25.781 After that, 284 00:18:25.782 --> 00:18:29.004 when we try to apply it to the interior walls, 285 00:18:29.283 --> 00:18:31.563 you will see that the outer walls, 286 00:18:32.992 --> 00:18:34.532 the exterior 287 00:18:34.533 --> 00:18:36.123 and even the large room 288 00:18:36.432 --> 00:18:39.472 The walls there are also all colored in 289 00:18:39.771 --> 00:18:43.443 Since only one material can be applied to each object, 290 00:18:43.444 --> 00:18:45.863 at least according to the settings now, 291 00:18:46.308 --> 00:18:50.967 both sides of the object will be orange by default 292 00:18:51.492 --> 00:18:53.183 To prevent this, 293 00:18:53.466 --> 00:19:00.485 like the living room and large rooms, 294 00:19:00.716 --> 00:19:03.756 we need to create separate walls for each section, 295 00:19:04.052 --> 00:19:05.723 like inside the wall here, 296 00:19:05.804 --> 00:19:08.929 and this area where it meets the large room, 297 00:19:09.591 --> 00:19:10.591 and then here 298 00:19:11.012 --> 00:19:16.692 We need to make separate walls for all these 299 00:19:19.332 --> 00:19:22.231 I'll do that and come back 300 00:19:24.972 --> 00:19:30.712 After creating the interior wall to match the living room, 301 00:19:30.713 --> 00:19:35.744 I painted it with an orange material 302 00:19:37.911 --> 00:19:44.501 Now, let’s make the large room inside orange as well 303 00:19:45.451 --> 00:19:48.282 You might want to do it like this 304 00:19:48.283 --> 00:19:50.203 Drag and drop, 305 00:19:50.517 --> 00:19:54.297 change the material’s color to orange 306 00:19:54.651 --> 00:19:57.771 This could be your thought process 307 00:19:57.888 --> 00:19:59.808 What happens is, 308 00:20:00.411 --> 00:20:05.603 the material on the interior of the living room, 309 00:20:06.739 --> 00:20:10.139 which was orange, also changes to yellow 310 00:20:10.252 --> 00:20:17.252 You can see that the material asset in the project window is shared across the scene view 311 00:20:17.252 --> 00:20:21.592 Therefore, if you want to make it yellow here, 312 00:20:21.911 --> 00:20:25.091 you’ll need to create a new material of a different color 313 00:20:26.051 --> 00:20:27.052 Now, let’s switch back, 314 00:20:27.445 --> 00:20:31.745 create a new material 315 00:20:31.745 --> 00:20:32.430 by right-clicking 316 00:20:32.632 --> 00:20:33.393 Create 317 00:20:33.913 --> 00:20:34.608 Material 318 00:20:35.033 --> 00:20:39.033 I'll name it MAT_YELLOW 319 00:20:39.033 --> 00:20:43.820 Click on the Albedo white square, change the color to yellow, 320 00:20:43.821 --> 00:20:47.123 then drag and drop the new color onto the large room’s wall 321 00:20:47.843 --> 00:20:53.192 Now, the large room will be painted yellow 322 00:20:54.412 --> 00:20:57.292 Thus, we see that materials 323 00:20:57.972 --> 00:21:01.853 are composed of a single texture in Unity 324 00:21:02.466 --> 00:21:08.266 Now, we will create new materials for each room, 325 00:21:09.945 --> 00:21:13.231 and apply different colors to each 326 00:21:14.211 --> 00:21:18.591 You’ll see various options in the Inspector window 327 00:21:18.996 --> 00:21:20.896 We’ve only changed the color for now 328 00:21:22.171 --> 00:21:25.213 But there are other options you can adjust 329 00:21:25.538 --> 00:21:26.838 Let’s now explore 330 00:21:26.938 --> 00:21:29.209 some basic concepts of materials 331 00:21:29.412 --> 00:21:32.772 Let's learn about the theory behind materials 332 00:21:33.682 --> 00:21:36.582 Looking at the Inspector, 333 00:21:36.772 --> 00:21:43.112 you’ll see the name we created at the top, 334 00:21:43.629 --> 00:21:46.828 and below that, the Shader section 335 00:21:46.828 --> 00:21:48.572 Right now, it’s set to Standard 336 00:21:48.573 --> 00:21:51.353 So let’s take a look at this shader 337 00:21:52.332 --> 00:21:55.673 A shader is a formula or function 338 00:21:55.673 --> 00:21:58.930 that decides how something will look 339 00:21:58.930 --> 00:22:00.699 It's like a function 340 00:22:01.305 --> 00:22:04.172 For example, it can make an object look like liquid, 341 00:22:04.173 --> 00:22:05.522 cartoonish, 342 00:22:06.117 --> 00:22:07.577 translucent, 343 00:22:08.404 --> 00:22:10.744 or make the outline visible 344 00:22:10.745 --> 00:22:16.641 This is a formula for various visual effects 345 00:22:17.241 --> 00:22:24.931 The basic formula for this shader is the PBR system 346 00:22:24.931 --> 00:22:28.311 Unity uses the PBR system 347 00:22:31.892 --> 00:22:33.413 So what is it? 348 00:22:33.981 --> 00:22:36.841 PBR stands 349 00:22:37.752 --> 00:22:40.553 for Physically Based Rendering 350 00:22:40.554 --> 00:22:47.195 In the real world, light reflects off the surface of objects and this reflection is what our eyes recognize as the object 351 00:22:47.452 --> 00:22:52.752 In 3D spaces, Unity mimics this real-world phenomenon 352 00:22:53.724 --> 00:22:59.403 Light is shot towards an object, 353 00:22:59.743 --> 00:23:03.832 and when it hits the surface, the material shader computes it using complex physics formulas 354 00:23:03.968 --> 00:23:07.368 The camera then captures this reflected light, 355 00:23:07.572 --> 00:23:10.722 allowing us to recognize the material of the object 356 00:23:11.861 --> 00:23:14.200 By simulating reality, 357 00:23:14.201 --> 00:23:17.210 we can achieve realistic, lifelike visuals 358 00:23:17.211 --> 00:23:19.971 In the past, complex physical calculations 359 00:23:19.971 --> 00:23:22.022 weren’t feasible for real-time engines, 360 00:23:22.335 --> 00:23:28.654 so they were mostly used in 3D rendering software like 3ds Max, Maya, or Blender. 361 00:23:28.771 --> 00:23:31.133 However, with advancements in computer performance, 362 00:23:31.214 --> 00:23:37.453 By adding certain properties to the existing physical calculations and reclassifying several parameters, 363 00:23:37.453 --> 00:23:41.992 we can now achieve near-photorealistic results in real-time engines 364 00:23:42.352 --> 00:23:49.011 Another big advantage of the PBR system is that 365 00:23:49.011 --> 00:23:51.053 with just one shader, 366 00:23:51.053 --> 00:23:54.925 we can express everyday materials we use in life 367 00:23:55.572 --> 00:23:59.592 In the material instance window, 368 00:23:59.988 --> 00:24:02.647 by adjusting these values, 369 00:24:02.972 --> 00:24:08.215 you can create materials that resemble plastic, wood, stone, and more 370 00:24:08.849 --> 00:24:13.889 In the past, different shaders were required to represent various materials, 371 00:24:14.051 --> 00:24:17.013 and each shader had 372 00:24:17.014 --> 00:24:18.844 unique parameters, 373 00:24:19.194 --> 00:24:21.374 such as numbers, colors, 374 00:24:21.375 --> 00:24:23.254 and coordinates 375 00:24:23.412 --> 00:24:26.362 These are examples of parameters 376 00:24:26.548 --> 00:24:29.828 These parameters needed to be adjusted individually 377 00:24:29.829 --> 00:24:31.371 Even for the same material, 378 00:24:31.538 --> 00:24:36.377 you often had to input parameters differently depending on the situation 379 00:24:36.377 --> 00:24:37.952 It was not efficient 380 00:24:38.154 --> 00:24:42.074 However, with the introduction of the PBR System, 381 00:24:42.361 --> 00:24:45.901 it became possible to create and express various materials 382 00:24:46.051 --> 00:24:49.092 in a unified way using a single shader, 383 00:24:49.158 --> 00:24:53.038 significantly improving content quality 384 00:24:53.211 --> 00:24:57.312 Even by simply modifying a few key properties of the shader, 385 00:24:57.413 --> 00:24:59.613 it’s possible to create a variety of materials 386 00:25:00.252 --> 00:25:05.373 Here, Albedo, Metallic, and Smoothness 387 00:25:05.373 --> 00:25:11.150 are examples of what can create such textures 388 00:25:11.371 --> 00:25:14.283 Keys to this PBR System 389 00:25:15.164 --> 00:25:17.904 are Albedo, Metallic, and Smoothness 390 00:25:18.352 --> 00:25:25.472 And we'll also learn about one more commonly used parameter 391 00:25:25.532 --> 00:25:29.112 First, Albedo, you’ve likely already experienced it, 392 00:25:29.243 --> 00:25:30.984 as we used the color picker 393 00:25:30.984 --> 00:25:37.443 on the right to change colors earlier 394 00:25:37.583 --> 00:25:41.372 Albedo represents the inherent color 395 00:25:41.769 --> 00:25:43.889 of the material 396 00:25:43.972 --> 00:25:48.871 You might have already noticed this change in the preview window when you adjusted it earlier 397 00:25:49.651 --> 00:25:51.163 Next is Metallic 398 00:25:51.605 --> 00:25:54.685 Metallic represents 399 00:25:55.120 --> 00:25:57.119 whether the material is metallic or not 400 00:25:57.218 --> 00:26:00.718 If the value is 0, it’s non-metallic; if it’s 1, it’s metallic 401 00:26:01.012 --> 00:26:04.143 For instance, setting the slider to 0 represents a non-metal material like rubber, 402 00:26:05.241 --> 00:26:08.021 and setting it to 1 changes it 403 00:26:08.022 --> 00:26:09.722 to a metallic material like gold 404 00:26:09.722 --> 00:26:10.872 0 for non-metal, 405 00:26:11.514 --> 00:26:12.674 1 for metal 406 00:26:12.815 --> 00:26:17.135 You can observe the change in the preview window below 407 00:26:18.211 --> 00:26:21.572 When set to 0, it looks like a rubber texture 408 00:26:21.573 --> 00:26:23.089 Like rubber 409 00:26:23.252 --> 00:26:26.013 When set to 1, it resembles gold 410 00:26:26.014 --> 00:26:27.761 Now, Smoothness 411 00:26:27.762 --> 00:26:32.711 Smoothness refers to the surface smoothness of the material 412 00:26:32.711 --> 00:26:35.553 If the surface is highly smooth and polished, 413 00:26:35.798 --> 00:26:37.899 it reflects surrounding light directly, 414 00:26:37.899 --> 00:26:40.598 like a mirror, with a shiny surface 415 00:26:40.598 --> 00:26:42.182 Conversely, if the surface is rough, 416 00:26:42.183 --> 00:26:46.385 it diffuses light and diffuses the surrounding objects, 417 00:26:46.824 --> 00:26:51.064 resulting in a blurred appearance 418 00:26:51.064 --> 00:26:55.413 Setting Smoothness to 0 makes the surface rough 419 00:26:56.346 --> 00:26:58.266 and matte, 420 00:26:58.267 --> 00:27:00.406 making it look blurry 421 00:27:00.652 --> 00:27:02.242 Setting it to 1 422 00:27:02.445 --> 00:27:04.025 makes it highly polished 423 00:27:04.026 --> 00:27:08.447 and reflective, which gives us 424 00:27:08.448 --> 00:27:12.514 the impression of it being very crisp and clear 425 00:27:13.171 --> 00:27:16.371 Currently, the reflected material 426 00:27:16.858 --> 00:27:19.018 shows the default environment, 427 00:27:19.291 --> 00:27:21.614 as you can see on top, 428 00:27:21.614 --> 00:27:24.653 such as the gray ground, 429 00:27:24.654 --> 00:27:25.894 horizon, 430 00:27:25.895 --> 00:27:29.457 and sky seen in the scene view 431 00:27:29.457 --> 00:27:30.351 Like this 432 00:27:30.601 --> 00:27:33.811 This is the reflection this is makeing 433 00:27:33.811 --> 00:27:36.633 For example, because the Smoothness is set to 1 and Metallic is set to 1, 434 00:27:36.634 --> 00:27:38.571 the material 435 00:27:39.096 --> 00:27:43.336 looks like shiny gold 436 00:27:43.638 --> 00:27:51.051 If we look at the yellow wall applied in the scene, 437 00:27:51.052 --> 00:27:53.714 it reflects the sky above smoothly, 438 00:27:53.971 --> 00:27:56.751 this color of the sky above, 439 00:27:56.752 --> 00:27:59.572 acting almost like a mirror 440 00:27:59.731 --> 00:28:03.533 By adjusting Albedo, Metallic, 441 00:28:03.533 --> 00:28:06.073 and Smoothness, 442 00:28:06.772 --> 00:28:09.931 you can create countless material variations 443 00:28:10.291 --> 00:28:13.391 For the yellow wall, because it isn’t metallic, 444 00:28:13.391 --> 00:28:14.912 the Metallic value should be set to 0 445 00:28:15.971 --> 00:28:21.572 Additionally, walls typically aren’t fully shiny or entirely rough 446 00:28:21.572 --> 00:28:23.653 By adjusting the Smoothness 447 00:28:23.654 --> 00:28:29.193 to about 0.3, 448 00:28:29.472 --> 00:28:33.791 you can create a rough texture with a slightly glossy appearance, resembling a realistic wallpaper 449 00:28:34.491 --> 00:28:39.372 Similarly, the orange color can be adjusted to a similar nuance 450 00:28:39.372 --> 00:28:40.617 Like this 451 00:28:41.692 --> 00:28:43.711 You can also change the metallic property in a similar manner 452 00:28:45.491 --> 00:28:47.852 For instance, setting it to 0.3 creates this kind of effect 453 00:28:51.092 --> 00:28:56.931 The combination of Albedo, Metallic, and Smoothness forms the most basic elements for representing materials 454 00:28:57.171 --> 00:29:02.111 Among the additional commonly used elements is something called a Normal Map 455 00:29:02.572 --> 00:29:03.371 Normal Map 456 00:29:03.372 --> 00:29:07.410 A Normal Map refers to an image texture 457 00:29:07.410 --> 00:29:08.512 Image texture 458 00:29:08.753 --> 00:29:10.172 Let’s search for it on the internet 459 00:29:10.172 --> 00:29:12.351 When you search for Normal Map 460 00:29:13.411 --> 00:29:16.452 on Google, like this, 461 00:29:16.452 --> 00:29:20.731 you’ll see images with a bluish tint appearing like this 462 00:29:20.731 --> 00:29:22.211 These images 463 00:29:22.212 --> 00:29:25.816 are special textures used to make flat meshes 464 00:29:26.171 --> 00:29:31.771 appear as though they have a complex and detailed surface 465 00:29:32.371 --> 00:29:36.513 If there are more polygons, or rectangles or triangles 466 00:29:36.513 --> 00:29:38.133 forming the surface, 467 00:29:39.452 --> 00:29:40.852 it’s easier to represent curves 468 00:29:40.852 --> 00:29:43.312 and details 469 00:29:43.731 --> 00:29:47.711 However, the more polygons there are, 470 00:29:47.712 --> 00:29:50.057 the more data the system needs to process, 471 00:29:50.057 --> 00:29:52.692 which can degrade performance 472 00:29:52.692 --> 00:29:55.652 Thus, many high-quality games 473 00:29:55.793 --> 00:29:59.133 use Normal Map data to make materials 474 00:29:59.133 --> 00:30:04.772 appear detailed without increasing the polygon count 475 00:30:04.772 --> 00:30:06.251 Let’s apply it 476 00:30:07.171 --> 00:30:09.592 I’ll download an image of bricks 477 00:30:09.772 --> 00:30:13.231 by right-clicking and saving it 478 00:30:17.491 --> 00:30:20.132 Once downloaded, 479 00:30:20.132 --> 00:30:24.012 we can bring the image into the Unity project 480 00:30:24.012 --> 00:30:26.772 by drag and drop 481 00:30:26.772 --> 00:30:35.171 Now, the Normal Map data imported from Google is in the Unity project 482 00:30:35.172 --> 00:30:35.945 Simple, right? 483 00:30:36.491 --> 00:30:38.511 Let’s apply this image to 484 00:30:38.512 --> 00:30:41.952 the yellow material 485 00:30:41.952 --> 00:30:43.431 that we’ve been working 486 00:30:43.931 --> 00:30:45.913 Drag and drop it 487 00:30:45.913 --> 00:30:49.163 into the square checkbox next to the Normal Map option 488 00:30:49.163 --> 00:30:50.171 This rectangle 489 00:30:50.508 --> 00:30:53.068 Let's drag and drop it in there 490 00:30:53.291 --> 00:30:57.772 When you do, an error appears stating that the texture type doesn’t match the Normal Map setting 491 00:30:57.772 --> 00:30:59.893 This means, 492 00:30:59.893 --> 00:31:03.393 as it’s a special type of texture, 493 00:31:03.652 --> 00:31:06.868 you need to configure this asset 494 00:31:07.295 --> 00:31:10.795 as a Normal Map, a special feature 495 00:31:11.291 --> 00:31:14.971 On the right side, under the texture type setting, 496 00:31:14.971 --> 00:31:17.931 change it from Default to Normal Map 497 00:31:18.491 --> 00:31:21.931 Scroll down and click on Apply 498 00:31:21.931 --> 00:31:25.892 Apply allows you to save the changes, 499 00:31:29.372 --> 00:31:31.751 resolving the error 500 00:31:32.051 --> 00:31:33.332 After applying, 501 00:31:33.393 --> 00:31:34.411 you’ll notice that 502 00:31:34.652 --> 00:31:37.232 the surface now appears textured, as if it has grooves or bumps 503 00:31:38.812 --> 00:31:41.272 This is the feature of a Normal Map 504 00:31:42.132 --> 00:31:44.152 With light shining on it, 505 00:31:44.447 --> 00:31:46.807 bright and dark areas are created, 506 00:31:47.572 --> 00:31:52.592 making it look as though the surface is raised and recessed 507 00:31:52.772 --> 00:31:56.531 By inserting the image, the Normal Map can be configured like this, 508 00:31:56.531 --> 00:31:58.052 making the surface appear raised or recessed 509 00:31:58.772 --> 00:32:01.692 If you look at the square box where the Normal Map was inserted, 510 00:32:02.372 --> 00:32:06.312 you’ll see similar boxes for Albedo and Metallic 511 00:32:06.812 --> 00:32:11.551 Just like how you can change the color of Albedo, 512 00:32:11.971 --> 00:32:16.472 you can also use texture maps 513 00:32:17.132 --> 00:32:20.232 to express specific characteristics in these areas 514 00:32:20.812 --> 00:32:21.991 For example, 515 00:32:24.611 --> 00:32:27.532 I downloaded an Albedo map from the internet, 516 00:32:29.092 --> 00:32:31.551 and I’ll drag and drop it 517 00:32:31.931 --> 00:32:35.951 into the Albedo section of the orange material 518 00:32:36.611 --> 00:32:38.291 Currently, it might be a little confusing because of the Normal Map, 519 00:32:38.291 --> 00:32:39.491 so I’ll remove it 520 00:32:39.491 --> 00:32:42.891 Clicking on the Normal Map will remove it 521 00:32:43.171 --> 00:32:45.411 Now, the yellow color is applied to the material 522 00:32:45.411 --> 00:32:48.272 If I reset it to white, 523 00:32:48.692 --> 00:32:50.952 like this, 524 00:32:50.952 --> 00:32:55.598 the applied image color will be displayed clearly like this 525 00:32:56.699 --> 00:33:00.301 In this way, the material properties are not limited 526 00:33:00.301 --> 00:33:02.581 to just colors or sliders 527 00:33:02.581 --> 00:33:08.429 You can also use image maps to define them 528 00:33:08.749 --> 00:33:13.822 Let’s decorate the walls with individual colors 529 00:33:14.023 --> 00:33:17.363 and use images and Normal Maps 530 00:33:17.859 --> 00:33:22.398 for the floor and the outer walls 531 00:33:23.444 --> 00:33:26.423 You can do your project freely as well 532 00:33:26.423 --> 00:33:29.440 So far, we have created 533 00:33:29.441 --> 00:33:34.799 and applied materials to each room, the floor, nd the outer walls of the sides in a simple manner 534 00:33:35.059 --> 00:33:40.499 For now, you’ll notice that the sides appear to stretch outward 535 00:33:40.739 --> 00:33:44.119 As for the wood texture inside, 536 00:33:46.498 --> 00:33:52.639 it seems quite large when you consider someone actually being there, right? 537 00:33:53.072 --> 00:33:55.952 Thus, the pattern needs to be smaller 538 00:33:55.952 --> 00:34:00.910 To adjust such details, a UV map must be created 539 00:34:00.911 --> 00:34:02.378 separately 540 00:34:02.379 --> 00:34:07.318 for each game object and its mesh 541 00:34:08.819 --> 00:34:14.578 This work must be done in Blender, 3D Max, or Maya 542 00:34:14.578 --> 00:34:16.670 because Unity does not support UV mapping within itself 543 00:34:17.035 --> 00:34:19.035 However, there are still things you can adjust within Unity 544 00:34:19.369 --> 00:34:20.929 Go to materials 545 00:34:21.157 --> 00:34:24.157 Let’s use the floor as an example 546 00:34:24.779 --> 00:34:28.839 I’ve created a material named MAT_WOOD 547 00:34:29.065 --> 00:34:32.785 and applied an image to it, 548 00:34:32.786 --> 00:34:34.509 of this wood texture 549 00:34:34.509 --> 00:34:40.659 If you look below, you’ll see options labeled as Tiling and Offset 550 00:34:40.883 --> 00:34:45.323 Currently, the tiling is set to 1 by 1 551 00:34:45.658 --> 00:34:47.920 Let’s increase this to 10 by 10 552 00:34:48.194 --> 00:34:52.974 When adjusted, the image shrinks and becomes densely packed 553 00:34:55.558 --> 00:35:04.778 What this means is that the texture is now divided 554 00:35:05.098 --> 00:35:08.800 and repeated 10 times across the current surface 555 00:35:09.354 --> 00:35:13.934 So, the scale looks more appropriate because the image is packed tightly 556 00:35:14.100 --> 00:35:17.260 However, you’ll notice that the repetition 557 00:35:18.499 --> 00:35:22.899 of the pattern becomes visible 558 00:35:23.058 --> 00:35:26.438 Seeing these repetitive patterns isn’t ideal, right? 559 00:35:27.139 --> 00:35:30.459 Thus, you need to find a balance 560 00:35:30.737 --> 00:35:32.297 by adjusting the size appropriately 561 00:35:32.457 --> 00:35:36.497 while also selecting textures 562 00:35:36.678 --> 00:35:42.555 where repetition isn’t too obvious 563 00:35:43.075 --> 00:35:46.499 The same principle applies to this image as well 564 00:35:46.499 --> 00:35:50.651 For instance, I applied a brick texture to a material called MAT_WALL 565 00:35:50.652 --> 00:35:53.783 We have this brick image here 566 00:35:54.073 --> 00:36:00.553 By increasing the tiling to around 5 for the x-axis, 567 00:36:00.553 --> 00:36:03.257 the bricks appear aligned properly 568 00:36:03.398 --> 00:36:09.757 On the side surfaces, the texture stretches 569 00:36:09.939 --> 00:36:13.059 outward because of the tiling adjustments 570 00:36:13.369 --> 00:36:14.929 But if you check from other angles, 571 00:36:17.939 --> 00:36:22.199 the texture looks compressed on the side 572 00:36:22.316 --> 00:36:27.155 It's the same 5x, but it's more compressed like so 573 00:36:28.098 --> 00:36:31.340 This is why, during level design, 574 00:36:31.576 --> 00:36:35.116 artists employ various techniques 575 00:36:35.116 --> 00:36:38.918 starting with UV mapping and modularization 576 00:36:40.738 --> 00:36:47.358 Such adjustments are tasks for artists, 577 00:36:48.338 --> 00:36:51.959 but we’ve kept it simple for now 578 00:36:51.960 --> 00:36:53.693 Let's finish it here 579 00:36:53.693 --> 00:36:57.473 Lighting Types and Placement 580 00:36:57.473 --> 00:37:00.840 Now that we’ve built the structure and applied materials, 581 00:37:01.358 --> 00:37:04.778 light is needed to make the space visible 582 00:37:05.299 --> 00:37:05.942 Lighting 583 00:37:05.942 --> 00:37:10.394 In Unity, lighting can be added by clicking the plus button 584 00:37:10.394 --> 00:37:13.554 in the hierarchy and selecting Light 585 00:37:13.554 --> 00:37:17.138 You’ll find four types of lighting options there 586 00:37:18.007 --> 00:37:19.987 Let’s review them in order from the top 587 00:37:20.098 --> 00:37:27.318 The Directional Light is already present in the hierarchy by default 588 00:37:28.098 --> 00:37:30.938 If you look at the second item 589 00:37:31.219 --> 00:37:34.259 from the top in the hierarchy, you’ll see Directional Light 590 00:37:34.259 --> 00:37:37.039 This light functions like the sun 591 00:37:37.040 --> 00:37:42.133 If you double-click it and zoom in, 592 00:37:42.133 --> 00:37:50.519 you’ll notice it has a sun-shaped icon 593 00:37:51.019 --> 00:37:54.580 The icon may appear too large, 594 00:37:54.580 --> 00:37:57.319 but you can reduce its size 595 00:37:57.620 --> 00:37:59.820 using the 3D Icons slider 596 00:37:59.978 --> 00:38:02.739 in the top-right corner, just like this 597 00:38:02.739 --> 00:38:04.207 Let's make it smaller 598 00:38:06.938 --> 00:38:11.379 It has a sun-shaped icon, 599 00:38:11.380 --> 00:38:12.959 and the lines 600 00:38:12.960 --> 00:38:16.907 that are extending outward 601 00:38:16.907 --> 00:38:19.200 These lines represent the direction of the light 602 00:38:19.319 --> 00:38:21.359 This light functions like sunlight, 603 00:38:21.582 --> 00:38:26.522 so its location doesn’t matter, like the sun 604 00:38:26.522 --> 00:38:28.219 Whether you’re in Seoul or Busan, 605 00:38:28.484 --> 00:38:31.524 the sun will shine from the east in the morning 606 00:38:32.139 --> 00:38:35.949 and from the west in the afternoon 607 00:38:36.314 --> 00:38:43.073 Similarly, within this space, the Directional Light provides uniform illumination at the same angle, 608 00:38:43.498 --> 00:38:46.219 regardless of its location. 609 00:38:47.102 --> 00:38:51.802 The lines you see here represent the light’s direction 610 00:38:51.978 --> 00:38:54.919 Currently, the light is coming from the top left 611 00:38:54.919 --> 00:38:58.679 and shining diagonally downward, 612 00:38:59.778 --> 00:39:00.959 so the direction is like this, 613 00:39:00.959 --> 00:39:06.199 which is why shadows are being cast in this direction. 614 00:39:06.538 --> 00:39:11.338 The light is being cased from the top left 615 00:39:11.685 --> 00:39:15.344 Thus, with Directional Light, its position doesn’t matter, 616 00:39:15.344 --> 00:39:18.198 but only its rotation does 617 00:39:18.199 --> 00:39:20.179 For example, if we rotate it along the x-axis, 618 00:39:20.218 --> 00:39:25.159 you can see the shadows shifting accordingly 619 00:39:26.019 --> 00:39:27.274 Similarly, rotating it along the z-axis 620 00:39:27.275 --> 00:39:31.815 also alters the light’s direction 621 00:39:34.310 --> 00:39:39.439 If you open the Inspector window for the Directional Light, there’s a section for color 622 00:39:40.419 --> 00:39:43.140 By clicking on this, you can change the light’s color 623 00:39:43.632 --> 00:39:46.872 to red, blue, 624 00:39:47.619 --> 00:39:49.618 or green, for example 625 00:39:49.619 --> 00:39:51.759 Below that is the intensity value, 626 00:39:51.978 --> 00:39:57.119 which represents the strength of the light 627 00:39:57.119 --> 00:40:01.050 When you increase the intensity, a strong green light shines, 628 00:40:01.298 --> 00:40:06.598 and when you lower it slightly, a dim green light is cast 629 00:40:06.739 --> 00:40:08.479 That's the gist of it 630 00:40:09.098 --> 00:40:10.559 Let's go back 631 00:40:10.559 --> 00:40:20.010 Directional Light is a light that evenly illuminates the entire area of the scene 632 00:40:21.030 --> 00:40:26.378 Now, let’s press the plus button and look at the Point Light option in Lights 633 00:40:26.978 --> 00:40:32.238 Since Point Light needs to be checked in a dark area, 634 00:40:32.446 --> 00:40:35.405 and currently there isn’t any darkness in the scene, 635 00:40:35.405 --> 00:40:39.399 we’ll duplicate the ground 636 00:40:40.065 --> 00:40:43.305 to create a ceiling 637 00:40:44.778 --> 00:40:47.020 This way, the Directional Light 638 00:40:47.020 --> 00:40:48.770 won’t penetrate the space 639 00:40:49.100 --> 00:40:51.600 In this state, let’s bring in a Point Light 640 00:40:51.859 --> 00:40:54.559 Press the plus button, go to Lights, and select Point Light 641 00:40:55.695 --> 00:41:00.335 It may appear far away at first, 642 00:41:01.218 --> 00:41:03.699 so let’s bring it closer 643 00:41:04.265 --> 00:41:06.945 Now you can see the area brightening up, 644 00:41:07.339 --> 00:41:10.920 and the icon takes the form of a lightbulb 645 00:41:11.639 --> 00:41:17.058 As its name suggests, Point Light emits light from the center, 646 00:41:17.179 --> 00:41:19.440 radiating outward in all directions 647 00:41:20.212 --> 00:41:24.872 The light weakens as it moves away from the center, 648 00:41:25.019 --> 00:41:27.059 eventually fading out 649 00:41:27.507 --> 00:41:28.947 as to this 650 00:41:30.459 --> 00:41:36.139 The intensity decreases gradually from the center 651 00:41:36.139 --> 00:41:41.358 to the outer wireframe 652 00:41:42.058 --> 00:41:45.039 Strong inside, 653 00:41:45.040 --> 00:41:48.559 and fading out as it reaches the outer wireframe 654 00:41:48.560 --> 00:41:51.191 That's what this lighting does 655 00:41:51.378 --> 00:41:54.738 Unlike Directional Light, 656 00:41:54.739 --> 00:41:56.219 the position of Point Light matters, 657 00:41:56.498 --> 00:41:58.500 as the bulb itself can be moved 658 00:41:58.750 --> 00:42:01.030 However, the angle does not matter 659 00:42:01.314 --> 00:42:03.274 since it radiates in all directions 660 00:42:04.139 --> 00:42:08.830 In the Inspector window, you can adjust the color 661 00:42:08.971 --> 00:42:13.771 to red, green, or other shades, 662 00:42:13.979 --> 00:42:18.879 and control the light’s strength using the intensity slider 663 00:42:19.579 --> 00:42:21.539 An interesting feature here 664 00:42:21.539 --> 00:42:23.979 is the Range option, 665 00:42:24.418 --> 00:42:27.699 which represents the distance from the center 666 00:42:27.700 --> 00:42:30.780 to the edge of the wireframe, 667 00:42:31.219 --> 00:42:34.339 where the light fades 668 00:42:34.826 --> 00:42:38.885 For example, by decreasing the Range, the wireframe boundary shrinks, 669 00:42:39.298 --> 00:42:40.178 like this 670 00:42:43.298 --> 00:42:48.258 So we can adjust the wireframe like this 671 00:42:48.618 --> 00:42:50.540 That's what Range does 672 00:42:51.126 --> 00:42:56.365 So, when the distance from the center 673 00:42:56.699 --> 00:42:58.439 to the wireframe is short, 674 00:42:58.439 --> 00:43:01.519 the light weakens rapidly 675 00:43:03.018 --> 00:43:06.290 If you extend the Range slightly 676 00:43:06.291 --> 00:43:09.127 or increase the Intensity value, 677 00:43:09.342 --> 00:43:14.782 you can adjust the light to illuminate the interior properly 678 00:43:15.699 --> 00:43:21.359 Currently, the Range value is too short to reach the bottom, 679 00:43:21.786 --> 00:43:23.786 making the lower area appear dark 680 00:43:24.019 --> 00:43:28.099 n this case, increasing the Range allows the light, 681 00:43:28.300 --> 00:43:31.220 while slightly lowering the Intensity 682 00:43:31.659 --> 00:43:37.139 ensures a balanced brightness throughout 683 00:43:37.139 --> 00:43:40.280 Next, let’s press the plus button 684 00:43:40.281 --> 00:43:42.641 and take a look at Spot Light 685 00:43:42.701 --> 00:43:44.841 Let's do it here at the back 686 00:43:47.738 --> 00:43:50.999 Plus, Light, Spot Light 687 00:43:52.539 --> 00:43:55.338 Let's bring it in 688 00:43:57.498 --> 00:43:58.799 Now it's inside 689 00:43:59.313 --> 00:44:00.853 I have it right here 690 00:44:01.539 --> 00:44:08.258 Spot Light resembles the stage lighting you often see 691 00:44:08.258 --> 00:44:09.278 at concerts or plays, 692 00:44:09.279 --> 00:44:13.319 commonly referred to as pin lighting 693 00:44:13.319 --> 00:44:15.719 The icon for Spot Light mirrors the design of stage lighting 694 00:44:16.219 --> 00:44:20.079 As you can see, the light originates from the center 695 00:44:20.080 --> 00:44:25.100 and radiates outward in a cone shape 696 00:44:25.560 --> 00:44:30.938 This cone-shaped boundary determines the extent of the light 697 00:44:30.938 --> 00:44:37.578 At the bottom, you can see the light’s coverage area, a circular region illuminated by the light 698 00:44:39.258 --> 00:44:44.258 Spot Light functions by projecting light in a specific direction at a defined angle 699 00:44:44.258 --> 00:44:50.699 Within the Inspector window, you can adjust 700 00:44:50.699 --> 00:44:54.039 the color of the light, 701 00:44:54.040 --> 00:44:55.740 you could go with different colors, 702 00:44:55.979 --> 00:44:58.979 its Intensity here too, 703 00:44:58.979 --> 00:45:01.579 and the Range 704 00:45:01.579 --> 00:45:06.599 The Range value represents the distance 705 00:45:06.600 --> 00:45:08.734 at which the light begins to fade 706 00:45:09.539 --> 00:45:12.459 You can shorten or extend this distance as needed 707 00:45:12.459 --> 00:45:16.639 So, the Range represents the end of the cone 708 00:45:17.139 --> 00:45:20.619 By adjusting the Range, you can control how far the light extends 709 00:45:21.019 --> 00:45:25.459 It's too weak, so we could do this with the intensity 710 00:45:25.459 --> 00:45:29.938 The unique aspect of the Spot Light, compared to other lights, is its Spot Angle 711 00:45:30.178 --> 00:45:33.539 The Spot Angle 712 00:45:33.540 --> 00:45:36.020 determines the cone’s width 713 00:45:36.579 --> 00:45:40.719 increasing the Spot Angle widens the cone, 714 00:45:40.899 --> 00:45:45.038 and decreasing it narrows the cone 715 00:45:45.818 --> 00:45:48.899 This makes it possible to fine-tune how the light spreads 716 00:45:48.899 --> 00:45:53.579 For example, you could do it like this 717 00:45:53.579 --> 00:45:55.198 If you direct it onto a wall 718 00:45:55.694 --> 00:45:57.054 and slightly rotate it, 719 00:45:57.054 --> 00:45:58.674 like this, 720 00:45:59.178 --> 00:46:05.298 you can replicate the kind of pin lighting 721 00:46:05.298 --> 00:46:07.298 seen in museums 722 00:46:07.298 --> 00:46:09.759 or galleries where spotlights highlight specific objects or art 723 00:46:10.899 --> 00:46:16.679 Next, let’s press the plus button again and select Area Light from the Lights menu. 724 00:46:17.139 --> 00:46:21.779 Area Light, as the name suggests, consists 725 00:46:21.779 --> 00:46:24.759 of a panel and a line 726 00:46:25.139 --> 00:46:29.659 Area Light is essentially surface-emitting, 727 00:46:29.659 --> 00:46:37.019 meaning light is emitted from the rectangular surface 728 00:46:37.019 --> 00:46:38.599 in the direction of the line 729 00:46:39.299 --> 00:46:40.299 In this case, the light is directed downward, 730 00:46:40.539 --> 00:46:45.699 so the entire surface emits light evenly downward 731 00:46:45.699 --> 00:46:47.459 This is called an Area Light 732 00:46:47.459 --> 00:46:49.659 Unlike other lights, 733 00:46:49.659 --> 00:46:53.498 which you can see directly shining on objects, 734 00:46:53.498 --> 00:46:58.238 Area Light cannot be previewed in real-time 735 00:46:59.998 --> 00:47:02.099 If you check the Inspector window, 736 00:47:02.099 --> 00:47:07.098 you’ll notice the label Area - Baked Only attached to it 737 00:47:07.498 --> 00:47:09.258 This means 738 00:47:09.738 --> 00:47:11.459 that Area Light 739 00:47:11.460 --> 00:47:16.178 is a type of light that cannot be calculated in real-time 740 00:47:16.178 --> 00:47:19.178 Since calculating these lights in real-time is heavy, 741 00:47:19.178 --> 00:47:23.298 you can’t use many of these lights 742 00:47:23.298 --> 00:47:24.339 Though, lights 743 00:47:24.339 --> 00:47:28.380 play an important role 744 00:47:28.818 --> 00:47:30.698 in creating 745 00:47:31.178 --> 00:47:35.699 or altering the mood of a scene, 746 00:47:36.139 --> 00:47:39.199 so you might want to use many lights 747 00:47:39.659 --> 00:47:42.699 But that will overload the program 748 00:47:42.699 --> 00:47:44.378 To address this limitation, 749 00:47:45.879 --> 00:47:49.659 Unity provides a feature called Light Mapping 750 00:47:50.319 --> 00:47:52.299 As you become more familiar with Unity 751 00:47:52.300 --> 00:47:54.578 and create more projects, 752 00:47:54.839 --> 00:48:00.239 you’ll eventually encounter Light Mapping 753 00:48:00.239 --> 00:48:02.400 Light Mapping is an optimization process 754 00:48:02.401 --> 00:48:05.837 that allows for using numerous lights 755 00:48:05.838 --> 00:48:10.018 and creating richer lighting effects 756 00:48:10.319 --> 00:48:13.320 This process 757 00:48:13.320 --> 00:48:15.079 involves, instead of creating, 758 00:48:15.374 --> 00:48:16.374 baking 759 00:48:16.774 --> 00:48:18.814 Baking the light into the scene 760 00:48:18.814 --> 00:48:21.059 We use bake for this 761 00:48:22.559 --> 00:48:26.079 So, when using Light Mapping, 762 00:48:26.080 --> 00:48:30.119 we use the term baking 763 00:48:31.118 --> 00:48:36.460 Now, for Area Lights, you’ll notice they are labeled as Baked Only 764 00:48:36.461 --> 00:48:42.680 This means that Area Lights are exclusively 765 00:48:42.680 --> 00:48:44.720 for use with Light Mapping 766 00:48:45.675 --> 00:48:48.615 For now, you cannot see the effects of Area Lights in real-time 767 00:48:49.159 --> 00:48:54.839 However, when working on a project and using advanced techniques 768 00:48:55.239 --> 00:48:58.199 like Light Mapping, you will be able to use them 769 00:48:59.438 --> 00:49:03.519 For now, just understand that such a type of light exists 770 00:49:03.519 --> 00:49:07.618 This wraps up the explanation of the lighting options available in Unity 771 00:49:08.038 --> 00:49:10.998 Unity provides a total of four types of lights 772 00:49:10.998 --> 00:49:15.038 Using these lights, let's decorate the living room 773 00:49:15.038 --> 00:49:16.839 Let's remove Area Light 774 00:49:16.839 --> 00:49:22.159 I placed multiple Spot Lights in the living room 775 00:49:22.159 --> 00:49:27.079 I adde Point Lights in the darker areas 776 00:49:32.464 --> 00:49:35.564 to brighten the atmosphere 777 00:49:36.384 --> 00:49:41.024 Additionally, I applied an orange material to the ceiling 778 00:49:41.024 --> 00:49:43.904 to create a sense of unity 779 00:49:43.904 --> 00:49:49.023 While doing this, you may notice flickering in some areas 780 00:49:49.023 --> 00:49:52.704 Sometimes the lights 781 00:49:52.704 --> 00:49:53.964 may turn on and off randomly 782 00:49:53.965 --> 00:49:55.845 as you work on this 783 00:49:56.504 --> 00:49:57.844 This happens 784 00:49:58.206 --> 00:50:00.526 because lights are heavy, 785 00:50:00.526 --> 00:50:02.384 or are resource-intensive to calculate, 786 00:50:02.384 --> 00:50:06.784 and Unity has implemented a limitation 787 00:50:06.784 --> 00:50:09.023 of the number of lights for one object 788 00:50:09.743 --> 00:50:14.004 Unity only allows to a maximum of four 789 00:50:14.984 --> 00:50:18.423 That's its decision 790 00:50:18.423 --> 00:50:20.464 to not compromise the performance 791 00:50:20.464 --> 00:50:24.243 For example, if you check the Point Light ranges on this floor object, 792 00:50:25.103 --> 00:50:30.784 you’ll notice that the ranges overlap, 793 00:50:30.784 --> 00:50:32.304 causing this flickering effect 794 00:50:32.304 --> 00:50:34.704 So, even just looking at this floor object, 795 00:50:34.704 --> 00:50:37.443 you can see that all the Point Lights and Spot Lights, 796 00:50:38.343 --> 00:50:44.303 as well as all the Point Lights here, are affecting it 797 00:50:44.303 --> 00:50:50.224 As a result, when many lights are applied to a single object at the same time, 798 00:50:50.224 --> 00:50:52.504 it exceeds the maximum number of lights allowed 799 00:50:52.504 --> 00:50:55.224 Thus, some lights turn on while others turn off, 800 00:50:55.224 --> 00:50:58.244 and you can see them switching back and forth like this 801 00:50:58.544 --> 00:51:02.663 There are ways to address this, such as increasing the maximum number 802 00:51:02.663 --> 00:51:05.423 of lights in the settings, 803 00:51:05.423 --> 00:51:08.683 but this method can lower performance 804 00:51:08.983 --> 00:51:11.784 Another approach is to reduce the number of lights, 805 00:51:11.784 --> 00:51:17.063 minimizing the number of lights affecting a mesh 806 00:51:17.063 --> 00:51:21.184 and only using lights in the most necessary areas 807 00:51:21.184 --> 00:51:22.563 That's another way 808 00:51:22.563 --> 00:51:24.244 However, with this method, 809 00:51:24.244 --> 00:51:27.304 the desired visual effect may not come out as intended 810 00:51:27.743 --> 00:51:31.464 In such cases, it would be much better 811 00:51:31.464 --> 00:51:36.144 to use the special feature called Light Mapping, which I mentioned briefly earlier 812 00:51:37.264 --> 00:51:38.663 Another way 813 00:51:38.664 --> 00:51:41.244 is to avoid using a single large mesh 814 00:51:41.244 --> 00:51:45.464 and instead reduce the number of lights affecting the mesh 815 00:51:45.464 --> 00:51:50.424 This is why level design is often done using a modular approach 816 00:51:50.424 --> 00:51:53.184 This is an art-related topic, 817 00:51:53.184 --> 00:51:56.224 so I’ll leave it here for this video 818 00:51:56.624 --> 00:51:59.984 Lighting is a very resource-intensive element 819 00:51:59.984 --> 00:52:03.824 and one that requires the most optimization 820 00:52:03.824 --> 00:52:06.424 When designing levels, 821 00:52:06.424 --> 00:52:11.223 you’ll need to carefully plan 822 00:52:11.223 --> 00:52:15.243 to use lights only in essential areas 823 00:52:16.023 --> 00:52:19.143 As you continue to learn more about lighting, 824 00:52:19.143 --> 00:52:21.343 you’ll be able to create richer, 825 00:52:21.743 --> 00:52:27.303 more immersive environments 826 00:52:27.303 --> 00:52:30.544 Let's summarize what we learned today 827 00:52:31.078 --> 00:52:32.898 Creating 3D spaces using 2D floor plans and applying materials 3D spaces were created by converting mm units from 2D floor plans into m units 828 00:52:32.898 --> 00:52:34.039 3D spaces were produced by modifying the scale values of Cube object transforms Material Application Meshes and materials are essential elements 829 00:52:34.039 --> 00:52:36.180 Make a new folder, create Material Asset Drag and drop on an object to apply Images can also define materials 830 00:52:36.180 --> 00:52:37.741 Materials Shader: Formula for rendering surface color Parameters: Values like color, texture, etc 831 00:52:37.741 --> 00:52:39.341 PBR System Simulates realistic light reflection Adjust a single shader for plastic, wood, metal, etc 832 00:52:39.341 --> 00:52:41.142 Parameters: Albedo (base color), Metallic (metal property), Smoothness (roughness) 833 00:52:41.142 --> 00:52:41.983 Light Types Directional Light: Uniform light across the scene, angle-dependent shadows 834 00:52:41.984 --> 00:52:46.124 Point Light: Emits light outward in all directions Spotlight: Focused light for specific areas 835 00:52:46.125 --> 00:52:48.044 Area Light: Surface-emitting light, visible only with light mapping 836 00:52:48.045 --> 00:52:49.445 Lighting Tips Heavy real-time calculations: Unity limits 4 lights per object 837 00:52:49.445 --> 00:52:51.026 Use light mapping or modular design for performance optimization if more lights are needed