WEBVTT 1 00:00:04.925 --> 00:00:08.925 Realistic Basics Unreal Engine ICVFX Optimization 2 00:00:23.775 --> 00:00:25.525 Hello everyone 3 00:00:25.525 --> 00:00:30.275 I am Dohwan Lee, and I’ll be delivering this Unreal Engine ICVFX lecture 4 00:00:31.125 --> 00:00:34.775 Today, we will discuss how to utilize web control 5 00:00:34.775 --> 00:00:37.625 to optimize the performance of Unreal Engine 6 00:00:37.625 --> 00:00:41.075 and improve workflow efficiency in an ICVFX environment 7 00:00:41.075 --> 00:00:45.625 In the ICVFX environment, simple configuration settings are not enough 8 00:00:45.625 --> 00:00:48.725 It is crucial to control and optimize 9 00:00:48.725 --> 00:00:51.275 various elements in real time 10 00:00:51.275 --> 00:00:56.075 For this, the web control tool can be a very useful asset 11 00:00:56.475 --> 00:01:00.025 In this lecture, I will explain how to set up web control 12 00:01:00.025 --> 00:01:03.475 and use it to optimize real-time lighting 13 00:01:03.475 --> 00:01:07.425 camera settings, and various other engine elements 14 00:01:07.425 --> 00:01:11.425 Optimizing Unreal Engine for ICVFX 15 00:01:12.175 --> 00:01:15.275 When conducting ICVFX 16 00:01:15.275 --> 00:01:18.225 achieving realistic representation of assets on an LED wall 17 00:01:18.225 --> 00:01:21.725 requires high-resolution textures 18 00:01:21.725 --> 00:01:24.825 complex lighting, and fine details 19 00:01:24.825 --> 00:01:28.925 However, these elements impose a heavy burden on real-time operation 20 00:01:28.925 --> 00:01:32.274 often causing performance degradation and lag 21 00:01:32.274 --> 00:01:36.624 Conversely, prioritizing optimization for performance 22 00:01:36.624 --> 00:01:39.324 can lead to compromises in quality 23 00:01:39.324 --> 00:01:42.324 or even sacrificing the quality 24 00:01:42.324 --> 00:01:45.124 If you lower texture resolution or reduce details 25 00:01:45.124 --> 00:01:46.574 during optimization 26 00:01:46.574 --> 00:01:48.424 it can become challenging to fully realize 27 00:01:48.424 --> 00:01:51.874 the intended realism and immersion 28 00:01:51.874 --> 00:01:54.474 To overcome these practical limitations 29 00:01:54.474 --> 00:01:58.424 and balance performance and quality 30 00:01:58.424 --> 00:02:03.724 applying various optimization strategies becomes essential 31 00:02:04.074 --> 00:02:08.024 For this lecture, we will use 32 00:02:08.024 --> 00:02:10.774 what Megascans provides for free 33 00:02:10.774 --> 00:02:13.724 It's the abandoned apartment project 34 00:02:15.274 --> 00:02:16.724 When working on projects 35 00:02:16.724 --> 00:02:20.474 lag is usually caused by an excessive number of objects 36 00:02:20.474 --> 00:02:24.624 within the level, such as numerous meshes 37 00:02:25.324 --> 00:02:29.224 or high polygon counts 38 00:02:30.174 --> 00:02:35.074 including many triangles and polygons 39 00:02:35.074 --> 00:02:36.824 Complex lighting is another thing 40 00:02:36.824 --> 00:02:40.524 Complex lighting with multiple placements 41 00:02:40.524 --> 00:02:43.124 consumes significant resources 42 00:02:43.124 --> 00:02:45.624 To address these issues 43 00:02:45.624 --> 00:02:48.574 we will explore console commands and optimization methods 44 00:02:48.574 --> 00:02:51.074 that can help resolve such challenges 45 00:02:51.624 --> 00:02:55.224 First, let’s discuss profiling 46 00:02:55.224 --> 00:02:59.674 Profiling is an important tool for identifying how resources 47 00:02:59.674 --> 00:03:03.974 like the CPU, GPU, and memory are being utilized 48 00:03:04.274 --> 00:03:07.624 Unreal Engine provides various console commands 49 00:03:07.624 --> 00:03:10.174 such as Stat Unit 50 00:03:10.174 --> 00:03:14.824 which can be used to pinpoint where bottlenecks are occurring 51 00:03:14.824 --> 00:03:17.424 I’ll start by explaining 52 00:03:17.424 --> 00:03:21.874 the most basic commands used in this context 53 00:03:21.874 --> 00:03:24.824 Specifically, I’ll show you how to use Stat Unit 54 00:03:24.824 --> 00:03:28.724 which I mentioned earlier 55 00:03:28.724 --> 00:03:31.174 Since I already have it activated, let me turn it off 56 00:03:32.824 --> 00:03:38.674 Search for Stat Unit in the command line 57 00:03:38.674 --> 00:03:43.824 and you’ll see a display like the one shown here on the right 58 00:03:46.674 --> 00:03:50.324 This option allows you to check the time spent 59 00:03:50.324 --> 00:03:56.174 on the current frame, the time consumed by the game thread 60 00:03:56.174 --> 00:03:58.824 the time taken by the rendering thread 61 00:03:58.824 --> 00:04:04.074 and the time spent on the current frame by the GPU 62 00:04:04.074 --> 00:04:07.024 Let me address each, starting with the first option 63 00:04:07.024 --> 00:04:12.624 The first option lets you view the total time it takes 64 00:04:12.624 --> 00:04:15.074 to generate a single frame in the game 65 00:04:15.074 --> 00:04:17.573 The option below it shows 66 00:04:17.573 --> 00:04:20.873 the time used by the game thread 67 00:04:20.873 --> 00:04:24.173 If this value is similar to the frame time 68 00:04:24.173 --> 00:04:26.723 it means that a bottleneck has occurred 69 00:04:26.723 --> 00:04:30.073 in the rendering thread 70 00:04:30.723 --> 00:04:32.823 The next option displays 71 00:04:32.823 --> 00:04:36.073 the time spent by the rendering thread 72 00:04:36.073 --> 00:04:39.123 If this value is similar to the frame time 73 00:04:39.123 --> 00:04:41.673 the game’s performance bottleneck 74 00:04:41.673 --> 00:04:45.473 is occurring due to the rendering thread 75 00:04:45.473 --> 00:04:49.323 which works inversely to the game thread 76 00:04:50.623 --> 00:04:52.173 The option below that 77 00:04:52.173 --> 00:04:55.023 shows the time consumed by 78 00:04:55.023 --> 00:04:57.623 the rendering hardware interface thread 79 00:04:58.223 --> 00:05:03.473 This is related to systems such as OpenGL 80 00:05:03.473 --> 00:05:07.523 Direct3D 12, or Direct3D 11 81 00:05:07.523 --> 00:05:11.523 and things like those, so I’ll skip this part 82 00:05:12.173 --> 00:05:15.523 The GPU time option 83 00:05:15.523 --> 00:05:18.823 shows the time consumed by the GPU 84 00:05:18.823 --> 00:05:22.423 in rendering the current scene in real time 85 00:05:22.423 --> 00:05:26.023 This is also synchronized with the frame time 86 00:05:26.023 --> 00:05:28.773 so it has a similar duration 87 00:05:30.723 --> 00:05:35.673 The DynRes option below 88 00:05:35.673 --> 00:05:39.273 stands for Dynamic Resolution 89 00:05:39.273 --> 00:05:42.623 It’s a feature that automatically adjusts resolution 90 00:05:42.623 --> 00:05:46.473 in real time within the game to optimize performance 91 00:05:46.473 --> 00:05:51.223 Simply put, when a scene becomes too complex and the GPU slows down 92 00:05:51.223 --> 00:05:55.323 it temporarily reduces resolution to improve performance 93 00:05:55.323 --> 00:05:58.773 This feature is usually disabled 94 00:05:58.773 --> 00:06:02.823 but can be enabled in the project settings 95 00:06:02.823 --> 00:06:07.123 I’ll demonstrate this in the project settings section later 96 00:06:08.723 --> 00:06:11.773 The next option represents 97 00:06:11.773 --> 00:06:16.473 the number of draw calls 98 00:06:16.473 --> 00:06:19.623 A draw call is a type of command where 99 00:06:19.623 --> 00:06:24.873 the CPU tells the GPU to render an object 100 00:06:24.873 --> 00:06:29.323 The number of draw calls is directly related to the number of objects 101 00:06:29.323 --> 00:06:31.423 that the GPU needs to render 102 00:06:31.423 --> 00:06:34.023 There are around 2,500 draw calls here 103 00:06:37.023 --> 00:06:39.823 The last option below that 104 00:06:39.823 --> 00:06:42.223 indicates the number 105 00:06:42.223 --> 00:06:48.823 of triangles in the objects currently visible 106 00:06:48.823 --> 00:06:57.622 In other words, it shows the number of triangles 107 00:06:57.622 --> 00:07:00.722 in the objects being viewed right now 108 00:07:01.872 --> 00:07:05.722 These commands allow you to identify 109 00:07:05.722 --> 00:07:11.522 where performance drops occur and pinpoint areas causing lag 110 00:07:11.522 --> 00:07:16.922 Let me now talk about the Stat command 111 00:07:16.922 --> 00:07:22.072 To remove the current Stat options displayed 112 00:07:22.072 --> 00:07:28.722 simply re-enter the Stat Unit command, which will hide them 113 00:07:28.722 --> 00:07:34.472 Another frequently used command is Stat FPS 114 00:07:34.472 --> 00:07:41.172 which displays the current frame rate, or FPS 115 00:07:41.172 --> 00:07:45.072 Higher FPS values indicate better performance 116 00:07:45.072 --> 00:07:48.072 This command is useful for quickly 117 00:07:48.072 --> 00:07:51.322 assessing overall performance 118 00:07:51.322 --> 00:07:55.072 but lacks detailed information 119 00:07:57.872 --> 00:08:10.522 Let me remove it, and next is Stat UnitGraph 120 00:08:12.372 --> 00:08:16.922 This option visualizes Stat Unit metrics 121 00:08:16.922 --> 00:08:20.772 so frame, game, draw, and GPU time 122 00:08:20.772 --> 00:08:25.522 So this option visualizes them in a graph 123 00:08:25.522 --> 00:08:29.922 This enables users to see real-time fluctuations 124 00:08:29.922 --> 00:08:31.372 and determine 125 00:08:31.372 --> 00:08:35.372 bottlenecks in system performance 126 00:08:35.372 --> 00:08:37.322 As you can see 127 00:08:37.322 --> 00:08:39.772 it is changing real-time 128 00:08:39.772 --> 00:08:42.422 The color to the right changes too 129 00:08:42.422 --> 00:08:45.572 which is reflected in the final result 130 00:08:45.572 --> 00:08:52.022 To remove this, do the same 131 00:09:00.022 --> 00:09:08.272 The next option is Stat Game 132 00:09:08.272 --> 00:09:12.072 Stat Game focuses on time allocation 133 00:09:12.072 --> 00:09:15.572 within the game thread 134 00:09:15.572 --> 00:09:20.172 analyzing components like AI, physics calculations 135 00:09:20.172 --> 00:09:23.922 and blueprint execution 136 00:09:23.922 --> 00:09:26.222 to identify potential optimization areas 137 00:09:27.122 --> 00:09:30.022 Since we didn't do much 138 00:09:30.022 --> 00:09:32.522 as in making any blueprint logic 139 00:09:32.522 --> 00:09:36.722 it is not responding too much Let's turn it off again 140 00:09:39.372 --> 00:09:46.321 Stat Slow highlights tasks 141 00:09:46.321 --> 00:09:50.271 causing performance delays 142 00:09:50.271 --> 00:09:54.971 identifying time-consuming or repetitive processes 143 00:09:54.971 --> 00:09:57.971 This is useful for troubleshooting specific problem areas 144 00:09:57.971 --> 00:10:01.421 Literally, it checks 145 00:10:01.421 --> 00:10:06.021 for the parts that are particularly slow 146 00:10:08.321 --> 00:10:20.821 Next is Stat SceneRendering 147 00:10:20.821 --> 00:10:25.671 It provides detailed insights into the rendering process 148 00:10:25.671 --> 00:10:30.121 including draw call counts, shadow computations 149 00:10:30.121 --> 00:10:32.121 and lighting details 150 00:10:32.121 --> 00:10:35.021 It helps pinpoint 151 00:10:35.021 --> 00:10:39.371 performance bottlenecks during rendering stages 152 00:10:40.271 --> 00:10:43.771 As I showed you before 153 00:10:43.771 --> 00:10:45.721 Multiple commands 154 00:10:45.721 --> 00:10:47.421 can be activated simultaneously 155 00:10:47.421 --> 00:10:58.321 such as Stat Unit, Stat SceneRendering, and Stat Slow 156 00:10:58.321 --> 00:11:01.171 All these can be activated like so 157 00:11:01.171 --> 00:11:05.321 Stat GAME, just like this 158 00:11:05.321 --> 00:11:09.921 To disable all active at once, use Stat None 159 00:11:09.921 --> 00:11:14.721 which is a convenient way to clear all overlays 160 00:11:16.871 --> 00:11:21.571 Let's now move on to optimization view modes 161 00:11:21.571 --> 00:11:23.921 Unreal Engine provides various view modes 162 00:11:23.921 --> 00:11:26.321 designed for optimization 163 00:11:26.321 --> 00:11:28.471 To access these view modes 164 00:11:28.471 --> 00:11:31.271 click on this section 165 00:11:31.271 --> 00:11:35.821 and navigate to Optimization Viewmodes 166 00:11:35.821 --> 00:11:39.171 Let's start with the first option 167 00:11:39.171 --> 00:11:42.471 As you see, there is red, white 168 00:11:42.471 --> 00:11:46.021 green, orange, and many more 169 00:11:46.821 --> 00:11:49.271 We see some overlaps here 170 00:11:49.271 --> 00:11:54.171 This view mode visualizes 171 00:11:54.171 --> 00:11:57.421 the complexity of the lights in a scene 172 00:11:57.421 --> 00:12:00.721 It uses colors to indicate 173 00:12:00.721 --> 00:12:03.321 how much performance cost 174 00:12:03.321 --> 00:12:06.021 each light incurs 175 00:12:07.021 --> 00:12:12.671 Colors closer to the left 176 00:12:12.671 --> 00:12:14.771 represent lighter costs 177 00:12:14.771 --> 00:12:19.271 while colors like yellow and red on the right 178 00:12:19.271 --> 00:12:24.121 indicate higher performance demands 179 00:12:24.121 --> 00:12:28.870 Areas with overlapping lights 180 00:12:28.870 --> 00:12:32.420 often appear as red, purple, or white 181 00:12:32.420 --> 00:12:36.970 signaling areas requiring optimization 182 00:12:38.170 --> 00:12:40.720 Let's move on 183 00:12:40.720 --> 00:12:43.220 The next mode is Lightmap Density 184 00:12:44.520 --> 00:12:49.470 which visualizes the density of lightmaps 185 00:12:49.470 --> 00:12:52.520 It's a visualization, or a view mode 186 00:12:52.520 --> 00:12:57.120 with colors like green, red, and purple 187 00:12:57.120 --> 00:12:59.070 There are many colors 188 00:13:00.370 --> 00:13:04.670 It helps easily identify areas 189 00:13:04.670 --> 00:13:08.070 where the density is too high or too low 190 00:13:08.070 --> 00:13:11.670 allowing for adjustments to achieve an optimal balance 191 00:13:11.670 --> 00:13:16.120 between lighting quality and performance 192 00:13:18.120 --> 00:13:25.370 Now we can check for the lightmaps density 193 00:13:27.320 --> 00:13:31.670 Now it's Stationary Light Overlap 194 00:13:31.670 --> 00:13:37.670 You can't really see, but it is 195 00:13:37.670 --> 00:13:43.420 what visualizes overlapping zones of stationary lights 196 00:13:43.420 --> 00:13:48.220 These lights provide fixed illumination 197 00:13:48.220 --> 00:13:52.620 but when multiple stationary lights overlap in the same area 198 00:13:52.620 --> 00:13:55.520 it can significantly increase performance costs 199 00:13:56.670 --> 00:14:00.470 Let's move on to the option below that 200 00:14:00.470 --> 00:14:03.420 Shader Complexity 201 00:14:05.420 --> 00:14:11.270 It visualizes the complexity of shaders calculated by the GPU 202 00:14:11.270 --> 00:14:17.070 It shows how computationally intensive each pixel is 203 00:14:17.070 --> 00:14:20.570 Particles are red in this case 204 00:14:21.120 --> 00:14:25.070 with simpler shaders displayed in green 205 00:14:25.070 --> 00:14:29.170 and more complex shifting to red or white 206 00:14:29.170 --> 00:14:32.020 Areas with red or white shaders 207 00:14:32.020 --> 00:14:35.020 are highly complex 208 00:14:35.020 --> 00:14:41.570 and should be optimized to prevent lag 209 00:14:44.570 --> 00:14:50.520 Particles are another common source of such issues 210 00:14:50.520 --> 00:14:54.020 The cracked window line and areas on the floor 211 00:14:54.020 --> 00:14:56.470 are actually replaced with textures 212 00:14:56.470 --> 00:15:00.570 making them less complex, maintaining this quality 213 00:15:02.370 --> 00:15:07.320 Let's move on to the next option 214 00:15:07.320 --> 00:15:13.020 This mode visualizes both shader complexity 215 00:15:13.020 --> 00:15:15.819 and quad overdraw simultaneously 216 00:15:15.819 --> 00:15:21.219 combining information on shader complexity 217 00:15:21.219 --> 00:15:25.469 and pixel-based quad overdraw, allowing users 218 00:15:25.469 --> 00:15:29.669 to identify areas with high rendering inefficiencies 219 00:15:29.669 --> 00:15:32.969 Regions with complex shaders or high overdraw levels 220 00:15:32.969 --> 00:15:36.869 require optimization to improve performance 221 00:15:36.869 --> 00:15:40.319 Let's move on to Quad Overdraw mode 222 00:15:43.519 --> 00:15:45.969 This view mode 223 00:15:45.969 --> 00:15:49.969 highlights areas where overdraw occurs 224 00:15:49.969 --> 00:15:54.569 Overdraw happens when the same pixel is rendered multiple times 225 00:15:54.569 --> 00:15:58.369 which can lead to significant performance drops 226 00:15:59.419 --> 00:16:03.119 This mode helps visualize such areas 227 00:16:03.119 --> 00:16:06.719 enabling developers to minimize unnecessary rendering 228 00:16:06.719 --> 00:16:10.819 Techniques like instancing or mesh merging 229 00:16:10.819 --> 00:16:13.369 can reduce overdraw 230 00:16:13.369 --> 00:16:15.369 making it an effective optimization strategy 231 00:16:17.419 --> 00:16:21.869 By using these view modes, developers can 232 00:16:21.869 --> 00:16:25.869 visually identify and address performance bottlenecks 233 00:16:25.869 --> 00:16:27.569 and lag-inducing areas 234 00:16:27.569 --> 00:16:33.569 Coupled with Stat commands 235 00:16:33.569 --> 00:16:38.169 it becomes easier to pinpoint where optimization efforts should focus 236 00:16:38.769 --> 00:16:43.669 We talked about identifying performance bottlenecks 237 00:16:43.669 --> 00:16:46.419 and lag-inducing areas 238 00:16:46.419 --> 00:16:49.019 using various methods 239 00:16:49.019 --> 00:16:54.519 Now, let’s discuss optimization methods 240 00:16:54.519 --> 00:16:59.019 The first method is using LOD 241 00:16:59.019 --> 00:17:04.469 which is a short form of Level of Detail 242 00:17:04.469 --> 00:17:07.969 LOD adjusts the level of detail in scenes 243 00:17:07.969 --> 00:17:10.069 or individual meshes 244 00:17:10.069 --> 00:17:12.369 based on distance or significance 245 00:17:12.369 --> 00:17:15.769 By reducing detail for distant objects 246 00:17:15.769 --> 00:17:17.869 for example 247 00:17:17.869 --> 00:17:24.119 from LOD0 at close range to LOD4 at a distance 248 00:17:24.119 --> 00:17:27.569 developers can lower GPU and memory usage 249 00:17:28.169 --> 00:17:32.669 As seen in the example, there are five LOD levels 250 00:17:32.669 --> 00:17:35.319 from LOD0 to LOD4 251 00:17:35.319 --> 00:17:39.669 They progressively decrease triangle counts 252 00:17:39.669 --> 00:17:41.669 simplifying objects 253 00:17:41.669 --> 00:17:44.469 For example, here at object 254 00:17:44.469 --> 00:17:48.619 LOD0 contains 16,128 faces 255 00:17:48.619 --> 00:17:53.069 but by the time you get to LOD4 it only has 48 256 00:17:54.369 --> 00:17:59.319 Using LODs allows for high detail at close range, like LOD0 257 00:17:59.319 --> 00:18:01.818 and lower detail when farther away, such as LOD4 258 00:18:01.818 --> 00:18:04.268 At intermediate distances, LOD2 259 00:18:04.268 --> 00:18:07.318 or LOD3 may be used at a distance 260 00:18:07.318 --> 00:18:10.618 reducing unnecessary resource usage 261 00:18:10.618 --> 00:18:12.868 and improving performance 262 00:18:12.868 --> 00:18:18.968 Below are the same LOD0, LOD1, and LOD2 263 00:18:22.318 --> 00:18:27.718 As shown in the image, LOD0 through LOD4 are configured 264 00:18:27.718 --> 00:18:30.918 with high-resolution LOD0 applied for close-up views 265 00:18:30.918 --> 00:18:34.875 and simpler LOD4 for distant views 266 00:18:35.768 --> 00:18:44.518 To create LODs, tools like Maya, Blender, or 3D Max 267 00:18:44.518 --> 00:18:47.218 are used to design LOD groups 268 00:18:47.218 --> 00:18:49.968 containing meshes for LOD0, LOD1 269 00:18:49.968 --> 00:18:53.268 LOD2 Mesh, LOD3 Mesh, LOD4 Mesh, and so on 270 00:18:53.268 --> 00:18:56.668 These in an LOD group 271 00:18:56.668 --> 00:18:59.018 are exported as FBX files 272 00:18:59.018 --> 00:19:02.668 at Unreal Engine, when importing the FBX file 273 00:19:02.668 --> 00:19:07.968 we have the Import Mesh LODs option 274 00:19:07.968 --> 00:19:11.218 Once this option is ticked 275 00:19:11.218 --> 00:19:19.068 this can automatically 276 00:19:19.068 --> 00:19:21.218 load these LODs 277 00:19:21.218 --> 00:19:24.168 This process optimizes performance 278 00:19:24.168 --> 00:19:26.818 while retaining the necessary level of detail 279 00:19:29.118 --> 00:19:34.468 Another optimization method is reducing polygon counts 280 00:19:34.468 --> 00:19:39.318 Unnecessary polygons on each mesh are eliminated to ensure efficient rendering 281 00:19:39.318 --> 00:19:41.568 Simplifying high-polygon models 282 00:19:41.568 --> 00:19:43.918 helps balance 283 00:19:43.918 --> 00:19:46.368 rendering efficiency and visual quality 284 00:19:46.368 --> 00:19:48.868 This optimization method 285 00:19:48.868 --> 00:19:52.918 unnecessary faces, edges 286 00:19:52.918 --> 00:19:56.768 or elements in the modeling 287 00:19:56.768 --> 00:20:01.118 The next step is removing unnecessary objects 288 00:20:02.068 --> 00:20:04.518 In Unreal Engine 289 00:20:04.518 --> 00:20:07.418 objects or unused elements in areas 290 00:20:07.418 --> 00:20:10.418 not visible to the player can 291 00:20:10.418 --> 00:20:12.518 be removed from the scene 292 00:20:12.518 --> 00:20:15.168 to reduce rendering overhead 293 00:20:15.168 --> 00:20:19.868 For example, in scenes for ICVFX and camera-based rendering 294 00:20:19.868 --> 00:20:24.918 eliminating unused lighting or meshes 295 00:20:24.918 --> 00:20:29.068 and such can significantly 296 00:20:29.068 --> 00:20:34.168 reduce performance drops and lag 297 00:20:35.518 --> 00:20:39.968 Let's go to Stat Unit 298 00:20:40.818 --> 00:20:42.268 See the option Draws? 299 00:20:42.268 --> 00:20:46.767 We are looking at 3,000 triangles now 300 00:20:48.917 --> 00:20:51.667 An additional approach is merging objects 301 00:20:51.667 --> 00:20:54.617 It is all separate as of now 302 00:20:55.367 --> 00:20:59.517 Merging smaller meshes into a single mesh reduces draw calls 303 00:20:59.517 --> 00:21:02.367 and improves performance 304 00:21:02.367 --> 00:21:06.567 For instance, multiple individual meshes 305 00:21:06.567 --> 00:21:08.567 can be combined 306 00:21:08.567 --> 00:21:12.017 to lower draw call counts 307 00:21:12.017 --> 00:21:13.767 simplifying the rendering process 308 00:21:14.567 --> 00:21:17.817 Let's move on to the next method 309 00:21:17.817 --> 00:21:23.617 It's a sub-level, which I will create now 310 00:21:23.617 --> 00:21:29.267 Make a folder named sub_level in the content section 311 00:21:29.817 --> 00:21:34.367 Create a level under this folder 312 00:21:34.367 --> 00:21:40.317 then make a lighting level and save it 313 00:21:40.317 --> 00:21:42.217 Once you place the lighting into this level 314 00:21:42.217 --> 00:21:44.817 turning it on or off will not make any noticeable changes yet 315 00:21:44.817 --> 00:21:48.067 because nothing exists in the level at this point 316 00:21:48.067 --> 00:21:51.067 First, go back to the persistent level 317 00:21:53.267 --> 00:21:56.117 and search for lighting 318 00:21:56.117 --> 00:22:03.017 Turning the five lights will show you this 319 00:22:04.567 --> 00:22:06.267 Let's try this here 320 00:22:07.517 --> 00:22:11.217 Currently, the lightmap is baked, so the lighting appears this way 321 00:22:14.017 --> 00:22:16.867 We will place these lights into this level 322 00:22:16.867 --> 00:22:19.217 To do this 323 00:22:19.217 --> 00:22:21.517 select the lights 324 00:22:21.517 --> 00:22:26.217 then right-click on the lighting level’s sub-level 325 00:22:26.217 --> 00:22:32.367 and select Move Selected Actors to Level 326 00:22:34.217 --> 00:22:38.517 The lighting objects belong to the lighting level 327 00:22:38.517 --> 00:22:40.667 If you turn off the lighting level 328 00:22:40.667 --> 00:22:43.517 you can adjust it like so 329 00:22:43.517 --> 00:22:48.367 Use sub-levels to separate lighting into distinct levels 330 00:22:48.367 --> 00:22:53.367 When creating levels, you can divide the space 331 00:22:57.567 --> 00:23:04.617 into different zones, like here and there 332 00:23:04.617 --> 00:23:08.067 assigning them to sub-levels 333 00:23:10.817 --> 00:23:14.467 Moving on, let me explain another method 334 00:23:17.567 --> 00:23:26.567 First, if you open up the Static Mesh settings 335 00:23:26.567 --> 00:23:30.817 you’ll see an option related to the LOD group 336 00:23:35.166 --> 00:23:37.866 Below that, there’s an LOD group setting 337 00:23:37.866 --> 00:23:42.266 which automatically applies the appropriate LOD settings 338 00:23:42.266 --> 00:23:46.116 calculated by Unreal Engine 339 00:23:46.116 --> 00:23:48.916 when a mesh belongs 340 00:23:48.916 --> 00:23:51.116 to a specific group 341 00:23:51.116 --> 00:23:55.266 This feature simplifies optimization 342 00:23:55.266 --> 00:23:58.816 by aligning LOD settings with object size 343 00:23:58.816 --> 00:24:01.816 and characteristics predefined by Unreal 344 00:24:01.816 --> 00:24:03.666 eliminating the need for manual LOD setup 345 00:24:03.666 --> 00:24:07.916 For example, when using Foliage 346 00:24:07.916 --> 00:24:09.666 selecting the Foliage option 347 00:24:09.666 --> 00:24:13.416 will automatically calculate suitable LOD values for it 348 00:24:14.516 --> 00:24:16.216 While this grouping 349 00:24:16.216 --> 00:24:18.016 helps organize and optimize 350 00:24:18.016 --> 00:24:22.016 there may still be unnecessary lag in some cases 351 00:24:22.016 --> 00:24:26.566 requiring manual LOD adjustments 352 00:24:28.516 --> 00:24:31.966 To manually adjust LOD 353 00:24:31.966 --> 00:24:35.116 toggle the options above 354 00:24:35.116 --> 00:24:38.066 where you’ll find settings 355 00:24:38.066 --> 00:24:45.316 to modify the Percent Triangles value 356 00:24:45.316 --> 00:24:49.516 to determine things like what percentage of triangles to use 357 00:24:49.516 --> 00:24:54.966 This allows you to optimize by reducing 358 00:24:54.966 --> 00:24:58.766 polygon counts in LOD1 or LOD2 appropriately 359 00:24:58.766 --> 00:25:02.516 For instance, if the current setting is at 100% 360 00:25:02.516 --> 00:25:07.216 As you see, it is 100% 361 00:25:07.216 --> 00:25:11.666 You can adjust it to 50% 362 00:25:11.666 --> 00:25:16.366 After making changes, be sure to click Apply Changes 363 00:25:16.366 --> 00:25:21.216 This means that the triangle count is 364 00:25:21.216 --> 00:25:23.775 effectively reduced to 50%, as displayed 365 00:25:24.916 --> 00:25:28.866 Another optimization method involves using Nanite 366 00:25:28.866 --> 00:25:32.816 Nanite is a technology developed by Unreal Engine 367 00:25:32.816 --> 00:25:36.316 to efficiently process detailed models 368 00:25:36.316 --> 00:25:38.616 It handles only perceptible details 369 00:25:38.616 --> 00:25:40.866 which optimizes its performance 370 00:25:40.866 --> 00:25:46.066 Conventional LOD settings required distance-specific configurations 371 00:25:46.066 --> 00:25:50.316 But Nanite automates this process 372 00:25:50.316 --> 00:25:52.966 eliminating the need for prior LOD adjustments 373 00:25:52.966 --> 00:25:54.866 It automatically converts distant objects 374 00:25:54.866 --> 00:25:59.166 into low-poly models to reduce rendering load 375 00:25:59.166 --> 00:26:03.016 while close objects are rendered with high-poly meshes 376 00:26:03.016 --> 00:26:06.216 for detailed expression as well as optimization and precision 377 00:26:06.216 --> 00:26:10.016 There are two ways to enable Nanite 378 00:26:10.016 --> 00:26:13.766 You can either right-click on the asset in the content browser 379 00:26:13.766 --> 00:26:17.166 and select Enable Nanite 380 00:26:17.166 --> 00:26:20.515 or double-click to enter detail mode 381 00:26:20.515 --> 00:26:23.665 and locate the Nanite settings in the details panel 382 00:26:23.665 --> 00:26:27.165 Tick the Enable Nanite Support box 383 00:26:27.165 --> 00:26:31.015 and click Apply Changes 384 00:26:31.015 --> 00:26:34.415 to switch the mesh to Nanite and make use of this feature 385 00:26:34.415 --> 00:26:38.565 To view Nanite settings 386 00:26:38.565 --> 00:26:41.465 click the Lit button, and under the Nanite section 387 00:26:41.465 --> 00:26:44.315 select Triangles here 388 00:26:44.315 --> 00:26:48.765 to see the meshes configured with Nanite 389 00:26:48.765 --> 00:26:51.415 This is what we see now 390 00:26:51.415 --> 00:26:55.215 The triangle count decreases as you move further away 391 00:26:55.215 --> 00:26:59.165 reducing the GPU’s computational load 392 00:27:03.315 --> 00:27:05.265 This time, we will discuss 393 00:27:05.265 --> 00:27:08.815 polygon optimization using texture maps 394 00:27:08.815 --> 00:27:13.915 First, let’s talk about optimizing polygons using a normal map 395 00:27:13.915 --> 00:27:16.265 If you look at the image above 396 00:27:16.265 --> 00:27:19.565 you will see spheres with varying polygon counts 397 00:27:19.565 --> 00:27:23.565 To express high-resolution details, the polygon count increases 398 00:27:23.565 --> 00:27:26.665 which can add performance stress 399 00:27:26.665 --> 00:27:30.815 The lower image demonstrates the principle of mesh normal 400 00:27:30.815 --> 00:27:32.565 These normals can be baked 401 00:27:32.565 --> 00:27:35.265 to record the direction of each face’s normal 402 00:27:35.265 --> 00:27:38.665 allowing low-poly models 403 00:27:38.665 --> 00:27:41.415 to also appear detailed 404 00:27:41.415 --> 00:27:46.665 model with fewer polygons can look like a high-resolution mesh 405 00:27:46.665 --> 00:27:49.165 with a more three-dimensional appearance 406 00:27:53.115 --> 00:27:55.265 Looking at the left image 407 00:27:55.265 --> 00:27:58.615 you’ll see a model with relatively fewer faces 408 00:27:58.615 --> 00:28:02.515 where the normal vectors extend from the center of each face 409 00:28:02.515 --> 00:28:06.115 Conversely, in the right image 410 00:28:06.115 --> 00:28:07.665 more faces have been added 411 00:28:07.665 --> 00:28:11.615 resulting in a more detailed representation of the normals 412 00:28:11.615 --> 00:28:13.615 While increasing the number of faces 413 00:28:13.615 --> 00:28:17.015 provides finer details, it can also increase 414 00:28:17.015 --> 00:28:20.715 the polygon count, causing performance strain 415 00:28:21.165 --> 00:28:22.615 To address this 416 00:28:22.615 --> 00:28:26.415 normal maps are effective for detailed representation 417 00:28:26.415 --> 00:28:29.615 without adding extra polygons 418 00:28:29.615 --> 00:28:32.915 By storing normal information in a texture, you can add 419 00:28:32.915 --> 00:28:37.715 details to low-poly models without increasing the number of faces 420 00:28:37.715 --> 00:28:39.165 For instance 421 00:28:39.165 --> 00:28:43.915 if you compare two spheres, both with 288 polygons 422 00:28:43.915 --> 00:28:48.365 the left sphere is a low-poly model with visible individual faces 423 00:28:48.365 --> 00:28:50.265 while the right one uses a normal map 424 00:28:50.265 --> 00:28:53.865 to give the illusion of a high-resolution model 425 00:28:53.865 --> 00:28:57.715 Although the right sphere has a low polygon count 426 00:28:57.715 --> 00:28:58.865 the normal map 427 00:28:58.865 --> 00:29:02.915 creates a high-poly-like appearance 428 00:29:02.915 --> 00:29:05.164 To understand this further 429 00:29:05.164 --> 00:29:07.464 the diagram illustrates 430 00:29:07.464 --> 00:29:11.514 a low-poly model with simple normals at the top 431 00:29:11.514 --> 00:29:14.164 lacking details 432 00:29:14.164 --> 00:29:18.114 And a high-poly model with more complexity 433 00:29:18.114 --> 00:29:22.114 has more defined curves in the middle 434 00:29:22.114 --> 00:29:24.014 In the baking process 435 00:29:24.014 --> 00:29:28.564 the detailed normal information from the high-poly model 436 00:29:28.564 --> 00:29:32.664 is applied to the low-poly model 437 00:29:32.664 --> 00:29:38.014 making it look as detailed as a high-poly mesh 438 00:29:38.014 --> 00:29:42.014 Applying normal maps to low-poly models 439 00:29:42.014 --> 00:29:44.264 enables you to create 440 00:29:44.264 --> 00:29:48.764 detailed meshes without adding extra faces 441 00:29:53.664 --> 00:29:57.214 When baking a high-poly mesh 442 00:29:57.214 --> 00:30:01.164 applying its normal to a lower-poly model 443 00:30:01.164 --> 00:30:06.064 can result in visually similar details 444 00:30:08.364 --> 00:30:11.764 Next, let’s discuss the next optimization method 445 00:30:11.764 --> 00:30:13.514 which involves mask maps 446 00:30:14.614 --> 00:30:17.214 The left image shows 447 00:30:17.214 --> 00:30:21.714 a fence-like mesh 448 00:30:21.714 --> 00:30:23.764 that is also transparent 449 00:30:23.764 --> 00:30:29.114 Modeling such a structure individually 450 00:30:29.114 --> 00:30:33.714 would increase polygon count and require significant time 451 00:30:33.714 --> 00:30:36.214 Representing the mesh entirely through polygons 452 00:30:36.214 --> 00:30:38.814 involves complex modeling 453 00:30:38.814 --> 00:30:42.214 which could severely impact performance 454 00:30:42.214 --> 00:30:45.114 However, as shown in the right image 455 00:30:45.114 --> 00:30:48.314 Unreal Engine’s material editor allows you to use a mask map 456 00:30:48.314 --> 00:30:53.564 to display only the fence parts while making other areas transparent 457 00:30:53.564 --> 00:30:57.014 This technique avoids additional polygons 458 00:30:57.014 --> 00:31:00.964 while realistically representing empty spaces in the fence 459 00:31:00.964 --> 00:31:02.814 Using mask maps 460 00:31:02.814 --> 00:31:05.314 can significantly save work time 461 00:31:05.314 --> 00:31:09.314 and reduce polygon count for optimization 462 00:31:12.264 --> 00:31:18.314 Mask maps are also frequently used 463 00:31:19.364 --> 00:31:22.764 for visual elements, especially 464 00:31:22.764 --> 00:31:24.764 like torn fabric or leaves 465 00:31:24.764 --> 00:31:29.564 Modeling individual leaves as meshes 466 00:31:29.564 --> 00:31:32.114 would require many faces 467 00:31:32.114 --> 00:31:34.664 to capture the necessary details 468 00:31:34.664 --> 00:31:39.864 And we will need a lot of leaves for the project 469 00:31:39.864 --> 00:31:42.164 So using mask maps 470 00:31:42.164 --> 00:31:44.264 becomes crucial for optimization 471 00:31:47.064 --> 00:31:51.963 Next, we will cover material optimization 472 00:31:51.963 --> 00:31:56.013 By reducing unnecessary textures and lowering texture resolution 473 00:31:56.013 --> 00:31:59.263 you can minimize memory usage 474 00:31:59.263 --> 00:32:01.613 Removing unused materials 475 00:32:01.613 --> 00:32:03.813 also improves performance 476 00:32:03.813 --> 00:32:08.063 as material complexity has a significant impact 477 00:32:08.063 --> 00:32:09.813 on GPU load 478 00:32:12.113 --> 00:32:14.613 For example, the mesh in the image 479 00:32:14.613 --> 00:32:17.513 has seven material slots 480 00:32:17.513 --> 00:32:21.013 for wood, concrete, paper, and more 481 00:32:21.013 --> 00:32:24.763 Each slot can hold a different material 482 00:32:24.763 --> 00:32:26.213 but having many slots 483 00:32:26.213 --> 00:32:29.713 means multiple draw calls for each material 484 00:32:29.713 --> 00:32:34.363 If a single mesh has seven material slots 485 00:32:34.363 --> 00:32:38.413 it generates a big number of seven draw calls 486 00:32:38.413 --> 00:32:40.963 The number of slots affect 487 00:32:40.963 --> 00:32:44.713 the draw calls, which can strain the performance 488 00:32:44.713 --> 00:32:48.913 Reducing the number of slots can optimize the performance 489 00:32:50.663 --> 00:32:54.163 The next method is using material instances 490 00:32:55.663 --> 00:32:57.213 Based on a master material 491 00:32:57.213 --> 00:33:01.113 we created two instances here 492 00:33:01.113 --> 00:33:03.263 With these instances 493 00:33:03.263 --> 00:33:05.863 you can apply different colors or textures 494 00:33:05.863 --> 00:33:09.013 while sharing the same base material 495 00:33:09.013 --> 00:33:12.213 For example, the two leaves in the image 496 00:33:12.213 --> 00:33:15.063 both use the same master material 497 00:33:15.063 --> 00:33:17.763 but are displayed in different colors 498 00:33:17.763 --> 00:33:20.763 This is also an optimization approach 499 00:33:20.763 --> 00:33:25.413 Generating multiple instances from a single master material 500 00:33:25.413 --> 00:33:27.513 reduces memory usage draw calls 501 00:33:27.513 --> 00:33:31.713 compared to using separate materials for each variation 502 00:33:36.563 --> 00:33:39.063 The next optimization method 503 00:33:39.063 --> 00:33:42.163 involves decals 504 00:33:42.163 --> 00:33:45.763 Decals allow you to add graphics or textures 505 00:33:45.763 --> 00:33:48.963 to specific parts of a scene without 506 00:33:48.963 --> 00:33:52.813 directly modifying the mesh or applying additional texture 507 00:33:52.813 --> 00:33:56.863 For instance, you see a manhole detail on the floor 508 00:33:56.863 --> 00:33:59.563 If this detail were modeled as a separate mesh 509 00:33:59.563 --> 00:34:01.563 and assigned textures 510 00:34:01.563 --> 00:34:03.613 it would increase memory usage and draw calls 511 00:34:03.613 --> 00:34:06.113 adding a significant performance burden 512 00:34:06.113 --> 00:34:08.263 However, with decals 513 00:34:08.263 --> 00:34:11.113 you can apply graphics only where needed 514 00:34:11.113 --> 00:34:13.963 avoiding extra meshes or textures 515 00:34:13.963 --> 00:34:16.313 and enhancing performance 516 00:34:16.313 --> 00:34:18.913 Decals are especially useful 517 00:34:18.913 --> 00:34:20.813 for efficiently adding details 518 00:34:20.813 --> 00:34:24.013 while maintaining optimization 519 00:34:24.013 --> 00:34:28.513 It's especially great in complex scenes 520 00:34:30.513 --> 00:34:32.813 Now let’s discuss 521 00:34:32.813 --> 00:34:36.962 level streaming optimization using sub-levels 522 00:34:36.962 --> 00:34:43.462 as explained earlier, sub-levels can be used to optimize lighting 523 00:34:44.312 --> 00:34:47.262 but here we’ll elaborate further 524 00:34:47.262 --> 00:34:50.962 By utilizing sub-level streaming 525 00:34:50.962 --> 00:34:55.462 you can load and unload only the necessary levels for environment creation 526 00:34:55.462 --> 00:34:57.812 This reduces memory usage and loading times 527 00:34:57.812 --> 00:34:59.812 while improving performance 528 00:34:59.812 --> 00:35:02.812 For example, when working on a scene 529 00:35:02.812 --> 00:35:06.762 we won't be working on the grass here 530 00:35:06.762 --> 00:35:08.712 we'll work on these big ones 531 00:35:08.712 --> 00:35:12.662 But for small props like grass 532 00:35:12.662 --> 00:35:14.962 they may consume significant resources 533 00:35:14.962 --> 00:35:17.262 And for this, I separated 534 00:35:17.262 --> 00:35:19.462 this leaf 535 00:35:19.462 --> 00:35:23.962 Toggle its visibility, and it is removed 536 00:35:23.962 --> 00:35:27.912 You can achieve higher frame rates 537 00:35:27.912 --> 00:35:29.762 and fewer draw calls with this 538 00:35:29.762 --> 00:35:35.912 Similarly, lighting can also be turned off using the Unlit mode 539 00:35:38.212 --> 00:35:43.562 When you're working in large-scale scenes 540 00:35:43.562 --> 00:35:46.862 it is common to divide sections into sub-levels 541 00:35:46.862 --> 00:35:52.662 such as lighting, foliage, and mesh 542 00:35:52.662 --> 00:35:56.262 to manage resources effectively 543 00:35:58.112 --> 00:36:02.662 Let's move on to shader optimization 544 00:36:02.662 --> 00:36:05.862 Let's go to our master material 545 00:36:07.062 --> 00:36:10.462 Complex shaders consume a lot of GPU resources 546 00:36:10.462 --> 00:36:12.262 so they need optimization 547 00:36:12.262 --> 00:36:15.412 by simplifying intricate calculations 548 00:36:15.412 --> 00:36:18.562 or removing unnecessary operations 549 00:36:18.562 --> 00:36:21.125 Using the view mode 550 00:36:22.962 --> 00:36:26.512 the Shader Complexity view mode 551 00:36:26.512 --> 00:36:31.062 you can visualize the complexity of shaders 552 00:36:31.062 --> 00:36:34.212 to identify and streamline problematic areas 553 00:36:34.212 --> 00:36:36.412 Here at material 554 00:36:37.312 --> 00:36:40.262 it looks pretty clean now 555 00:36:41.612 --> 00:36:47.562 But it could look much more complex, like this 556 00:36:47.562 --> 00:36:51.512 Unnecessary mathematical calculations 557 00:36:51.512 --> 00:36:55.662 or logical complexity 558 00:36:55.662 --> 00:36:58.712 can be simplified for shader optimization 559 00:37:01.412 --> 00:37:05.362 Let’s now discuss code optimization 560 00:37:05.362 --> 00:37:08.362 Although this is not a central focus 561 00:37:08.362 --> 00:37:10.762 and may be challenging 562 00:37:10.762 --> 00:37:15.862 code optimization is essential for reducing CPU resource usage 563 00:37:15.862 --> 00:37:19.612 It is important to remove unnecessary function calls 564 00:37:19.612 --> 00:37:21.662 Let me show you 565 00:37:23.111 --> 00:37:25.311 In Blueprints 566 00:37:29.511 --> 00:37:32.361 we could create a function like 567 00:37:32.361 --> 00:37:36.961 Get All Actors of Class, which can retrieve 568 00:37:37.811 --> 00:37:42.761 all Static Mesh Actors 569 00:37:43.511 --> 00:37:46.561 Retrieve all Static Mesh in the scene 570 00:37:46.561 --> 00:37:48.811 and subsequent actions can be added 571 00:37:48.811 --> 00:37:53.761 We should remove unnecessary function calls 572 00:37:53.761 --> 00:37:57.911 and improve inefficient loop structures 573 00:37:57.911 --> 00:38:03.111 For example, this loop 574 00:38:03.111 --> 00:38:06.161 Get All Actors Of Class 575 00:38:06.161 --> 00:38:08.361 So retrieving all Static Mesh Actor 576 00:38:08.361 --> 00:38:10.211 will end up with so many actors 577 00:38:12.061 --> 00:38:17.411 This will read all that Static Mesh in that array 578 00:38:17.411 --> 00:38:20.761 One loop, one process, one loop, two processes 579 00:38:20.761 --> 00:38:23.611 That's a loop 580 00:38:23.611 --> 00:38:27.211 And this structure could be improved 581 00:38:27.211 --> 00:38:30.061 Profiling can help identify bottlenecks 582 00:38:30.061 --> 00:38:34.111 when using Blueprint scripts 583 00:38:35.411 --> 00:38:39.461 Another area to optimize is the tick graph in event graphs 584 00:38:39.461 --> 00:38:41.311 Tick graphs 585 00:38:41.311 --> 00:38:45.311 respond on every frame 586 00:38:47.561 --> 00:38:50.711 and it's better to minimize the use of tick events 587 00:38:50.711 --> 00:38:55.211 and activate them only when needed 588 00:38:57.511 --> 00:39:01.411 Next, let’s move on to project settings 589 00:39:01.411 --> 00:39:06.561 Go to project settings through Settings 590 00:39:07.561 --> 00:39:10.261 Here at project settings 591 00:39:10.261 --> 00:39:15.211 we will configure a fixed frame rate 592 00:39:15.211 --> 00:39:16.611 Why do we need this? 593 00:39:16.611 --> 00:39:19.961 It configures a fixed frame rate 594 00:39:19.961 --> 00:39:22.911 for projects involving ICVFX 595 00:39:22.911 --> 00:39:25.711 So I recommend using Frame Rate 596 00:39:25.711 --> 00:39:28.111 So let's say Frame Rate 597 00:39:28.961 --> 00:39:32.761 We can adjust the animation 598 00:39:32.761 --> 00:39:36.111 time code, and more here 599 00:39:36.111 --> 00:39:38.711 This can sync to 600 00:39:38.711 --> 00:39:40.861 the external time codes 601 00:39:41.711 --> 00:39:45.011 The second setting is Motion Blur Disable 602 00:39:45.011 --> 00:39:49.061 In an ICVFX environment, it is critical for the real camera 603 00:39:49.061 --> 00:39:51.511 and virtual background to synchronize perfectly 604 00:39:51.511 --> 00:39:55.261 When Motion Blur is enabled, rapid camera movements 605 00:39:55.261 --> 00:39:57.811 can cause the blur applied to the virtual background 606 00:39:57.811 --> 00:40:00.461 to mismatch with the actual camera 607 00:40:00.461 --> 00:40:03.361 creating a visually awkward effect 608 00:40:03.361 --> 00:40:05.411 To prevent this discrepancy 609 00:40:05.411 --> 00:40:09.361 disabling Motion Blur in the project settings 610 00:40:09.361 --> 00:40:11.660 ensures that the virtual background and live-action scenes 611 00:40:11.660 --> 00:40:14.810 are represented more naturally and consistently 612 00:40:14.810 --> 00:40:21.310 To disable it, search for Motion Blur in the settings 613 00:40:21.310 --> 00:40:26.210 and untick the box 614 00:40:26.210 --> 00:40:31.560 The next setting is Auto Exposure Disable 615 00:40:33.110 --> 00:40:35.460 Auto Exposure refers to automatic exposure adjustments 616 00:40:35.460 --> 00:40:37.660 and it is crucial 617 00:40:37.660 --> 00:40:40.810 to disable this for ICVFX work 618 00:40:40.810 --> 00:40:42.910 When Auto Exposure is enabled 619 00:40:42.910 --> 00:40:45.860 the brightness of the virtual background displayed on the LED wall 620 00:40:45.860 --> 00:40:49.110 can fluctuate with camera movements 621 00:40:49.110 --> 00:40:52.360 This discrepancy between the brightness of real lighting 622 00:40:52.360 --> 00:40:56.660 and the virtual background disrupts 623 00:40:56.660 --> 00:40:59.610 the visual consistency of the scene 624 00:40:59.610 --> 00:41:02.310 So untick the box 625 00:41:02.960 --> 00:41:06.360 The next adjustment concerns Auto Save 626 00:41:06.360 --> 00:41:08.960 Auto Save is located not in the project settings 627 00:41:09.410 --> 00:41:17.860 but in Editor Preferences, so search for Auto Save 628 00:41:17.860 --> 00:41:20.060 We untick this because 629 00:41:21.060 --> 00:41:25.760 ICVFX work requires real-time synchronization 630 00:41:25.760 --> 00:41:30.210 It involves multiple systems such as camera data 631 00:41:30.210 --> 00:41:32.810 and lighting data transmitted over a network 632 00:41:32.810 --> 00:41:36.760 This real-time synchronization 633 00:41:36.760 --> 00:41:38.610 requires stability 634 00:41:38.610 --> 00:41:42.810 Enabling Auto Save during a shoot 635 00:41:42.810 --> 00:41:46.210 can disrupt multi-user connections 636 00:41:46.210 --> 00:41:49.110 live links, or other real-time data connection 637 00:41:49.110 --> 00:41:52.710 This can lead to interruptions 638 00:41:52.710 --> 00:41:55.560 or errors in real-time workflows 639 00:41:55.560 --> 00:41:58.260 To maintain stability, it is best to 640 00:41:58.260 --> 00:42:00.660 disable Auto Save 641 00:42:00.660 --> 00:42:04.560 We work with ICVFX 642 00:42:04.560 --> 00:42:07.610 with Auto Save option unticked 643 00:42:10.360 --> 00:42:14.360 Unreal Engine Settings to Keep in Mind for ICVFX 644 00:42:15.460 --> 00:42:20.060 When working in ICVFX, care must also be taken 645 00:42:20.760 --> 00:42:25.460 While shooting live, you should not alter critical settings 646 00:42:25.460 --> 00:42:29.460 in project configuration or display settings 647 00:42:29.460 --> 00:42:34.510 This impact the quality of the virtual background displayed on the LED wall 648 00:42:34.510 --> 00:42:38.260 or result in frame drops and system instability 649 00:42:38.260 --> 00:42:41.760 It is crucial to avoid modifying significant project settings 650 00:42:41.760 --> 00:42:44.010 during a shoot to prevent such issues 651 00:42:44.010 --> 00:42:47.760 The next point is maintaining accurate camera settings 652 00:42:47.760 --> 00:42:50.410 The virtual camera in Unreal 653 00:42:50.410 --> 00:42:54.260 with the real-world physical camera 654 00:42:54.260 --> 00:42:59.860 in terms of Field Of View, lens settings, film back, and focus settings 655 00:43:00.609 --> 00:43:02.759 If these settings do not match 656 00:43:02.759 --> 00:43:06.809 the virtual background might appear distorted 657 00:43:06.809 --> 00:43:10.859 To ensure smooth alignment between camera movements and the virtual background 658 00:43:10.859 --> 00:43:15.409 these settings must be reviewed and confirmed before filming 659 00:43:16.059 --> 00:43:20.359 Lastly, regarding multi-user session precautions 660 00:43:20.359 --> 00:43:23.059 there is a multi-user browser 661 00:43:23.059 --> 00:43:28.609 When utilizing ICVFX, the main computer running Unreal 662 00:43:28.609 --> 00:43:33.259 and the LED computer displaying the output 663 00:43:33.259 --> 00:43:35.209 both join the multi-user session 664 00:43:36.859 --> 00:43:40.059 This ensures that movements of the camera or objects 665 00:43:40.059 --> 00:43:43.109 are reflected on the LED wall simultaneously 666 00:43:43.109 --> 00:43:45.359 or in a multi-user session 667 00:43:45.359 --> 00:43:48.259 However, during a multi-user session 668 00:43:48.259 --> 00:43:52.809 if one user updates or changes their work in real time 669 00:43:52.809 --> 00:43:56.009 other users connected to the session 670 00:43:56.009 --> 00:43:58.109 might experience disconnections 671 00:43:58.109 --> 00:44:02.309 When transferring a large amount of data or making significant changes 672 00:44:02.309 --> 00:44:05.109 they can experience disconnection 673 00:44:05.109 --> 00:44:08.009 due to network delays or buffering issues 674 00:44:08.009 --> 00:44:11.009 For minor adjustments, it’s fine to proceed 675 00:44:11.009 --> 00:44:15.459 but for substantial changes 676 00:44:15.459 --> 00:44:18.559 it’s best to avoid doing so 677 00:44:19.559 --> 00:44:23.559 The Web Control feature in ICVFX 678 00:44:24.409 --> 00:44:27.209 We've covered optimization methods 679 00:44:27.209 --> 00:44:30.559 and things to look out for 680 00:44:30.559 --> 00:44:33.359 while working on your ICVFX work 681 00:44:33.359 --> 00:44:38.209 Let me give you some tips about Web Control 682 00:44:38.209 --> 00:44:40.909 The purpose of Web Control 683 00:44:40.909 --> 00:44:44.209 is to allow users to remotely manage and monitor 684 00:44:44.209 --> 00:44:48.509 various elements of their Unreal Engine project in real time 685 00:44:48.509 --> 00:44:52.959 This tool is especially critical for implementing 686 00:44:52.959 --> 00:44:54.859 in-camera visual effects 687 00:44:54.859 --> 00:44:57.059 enabling adjustments to lighting 688 00:44:57.059 --> 00:44:59.959 camera settings 689 00:44:59.959 --> 00:45:01.959 and sequence management 690 00:45:01.959 --> 00:45:04.609 while efficiently managing 691 00:45:04.609 --> 00:45:07.859 multiple virtual production elements 692 00:45:07.859 --> 00:45:11.559 Users can test desired scenes in real time 693 00:45:11.559 --> 00:45:15.359 and apply immediate feedback in live environments 694 00:45:15.359 --> 00:45:22.109 To set up Web Control, search for Web in the plugins menu 695 00:45:22.109 --> 00:45:27.209 and activate Remote Control Web Interface and Remote Control API 696 00:45:27.209 --> 00:45:31.809 After enabling these features, restart the program 697 00:45:32.759 --> 00:45:37.809 Turn off the control and then back on 698 00:45:39.109 --> 00:45:48.959 the activation status can be confirmed in the output log 699 00:45:53.108 --> 00:45:56.508 where the Remote Control Web Interface should appear 700 00:45:58.558 --> 00:46:02.008 Next, in the project settings 701 00:46:08.158 --> 00:46:14.258 search for Remote Control to adjust settings 702 00:46:14.258 --> 00:46:17.608 such as the port number that 703 00:46:17.608 --> 00:46:20.258 Remote Control Web Interface uses 704 00:46:20.658 --> 00:46:24.108 This can prevent network conflicts 705 00:46:24.108 --> 00:46:27.758 or tailor configurations for specific environments 706 00:46:29.158 --> 00:46:31.658 I will keep it as it is now 707 00:46:31.658 --> 00:46:34.758 Now, at Content 708 00:46:34.758 --> 00:46:37.458 we will create Remote Control Preset 709 00:46:37.458 --> 00:46:39.008 by right-clicking 710 00:46:39.008 --> 00:46:41.858 and selecting it under the Remote Control category 711 00:46:41.858 --> 00:46:44.808 Click Remote Control Preset here 712 00:46:44.808 --> 00:46:46.908 Leave the name 713 00:46:48.108 --> 00:46:51.558 Now we have a preset, which we will save 714 00:46:52.858 --> 00:46:57.858 Now we can control it with an Internet browser 715 00:46:57.858 --> 00:47:01.258 We're only doing the local testing 716 00:47:01.258 --> 00:47:03.458 so let's proceed 717 00:47:04.658 --> 00:47:10.058 The local address is 127.0.0.1 and the port number 30000 718 00:47:10.058 --> 00:47:14.858 This will give us this page 719 00:47:16.608 --> 00:47:20.458 Click on CONTROL and this button to find the design 720 00:47:20.458 --> 00:47:24.208 You can switch mode for 721 00:47:24.208 --> 00:47:27.058 real-time adjustments for the project 722 00:47:27.408 --> 00:47:29.858 First, we need to add a variable 723 00:47:31.658 --> 00:47:35.108 For this demonstration 724 00:47:38.408 --> 00:47:44.858 I’ll use Directional Light’s color 725 00:47:44.858 --> 00:47:48.458 and implement a feature to adjust its color 726 00:47:52.558 --> 00:47:55.808 after opening the preset, you’ll see icons like these 727 00:47:55.808 --> 00:48:00.058 indicating that they will be added to the web control 728 00:48:00.058 --> 00:48:03.458 When you click this button, it will be included 729 00:48:03.458 --> 00:48:07.208 Add Color as the ID 730 00:48:08.608 --> 00:48:10.358 and when you return to the web interface 731 00:48:10.358 --> 00:48:12.308 you will see that Light Color 732 00:48:14.008 --> 00:48:20.758 From here, select the color in the design section 733 00:48:20.758 --> 00:48:26.358 choose Build Your Own UI, and drag it over 734 00:48:26.358 --> 00:48:29.757 You’ll see that the UI is now implemented 735 00:48:29.757 --> 00:48:33.557 To confirm it’s working 736 00:48:36.707 --> 00:48:38.207 I’ll minimize the window 737 00:48:40.407 --> 00:48:46.307 Now, if you change the color 738 00:48:46.307 --> 00:48:49.407 you can see it updating in real time 739 00:48:52.307 --> 00:48:56.507 The color is changing in real time 740 00:48:58.307 --> 00:49:04.257 This way, you can input and adjust the desired parameter values 741 00:49:04.257 --> 00:49:10.057 observing and using the changes in real-time 742 00:49:10.707 --> 00:49:13.207 So far, we’ve gone over 743 00:49:13.207 --> 00:49:16.807 how to set up the Unreal Engine environment for ICVFX 744 00:49:17.857 --> 00:49:19.557 As I mentioned earlier 745 00:49:19.557 --> 00:49:22.607 during practical work, the program tends to get heavier 746 00:49:22.607 --> 00:49:27.357 resulting in longer processing times 747 00:49:27.957 --> 00:49:32.207 Therefore, always keep optimization in mind when setting up the environment 748 00:49:32.207 --> 00:49:36.607 This can significantly reduce work time 749 00:49:37.057 --> 00:49:41.607 We’ll wrap up this session by summarizing what we’ve learned 750 00:49:41.607 --> 00:49:43.007 Thank you 751 00:49:43.357 --> 00:49:44.057 Unreal Engine Optimization for ICVFX 752 00:49:44.057 --> 00:49:44.757 Stat Unit Elements Frame: Total time taken to generate a single frame in the game 753 00:49:44.757 --> 00:49:45.457 Game: Time spent on the game thread Draw: Time spent on the rendering thread 754 00:49:45.457 --> 00:49:46.207 RHIT: Time spent on the rendering hardware interface thread 755 00:49:46.207 --> 00:49:46.907 GPU: Time spent on real-time scene rendering using the GPU 756 00:49:46.907 --> 00:49:47.607 DynRes (Dynamic Resolution): Automatically adjusts resolution in real-time to optimize performance 757 00:49:47.607 --> 00:49:48.357 Draws: Number of draw calls Primes: Current number of triangles on objects 758 00:49:48.357 --> 00:49:49.207 Stat Commands Stat FPS: Displays current frame rate (FPS) 759 00:49:49.207 --> 00:49:50.007 Stat UnitGraph: Visualizes the values of each Stat Unit item as a graph 760 00:49:50.007 --> 00:49:50.857 Stat GAME: Shows time details for various tasks on the game thread 761 00:49:50.857 --> 00:49:51.707 Stat Slow: Identifies tasks causing performance degradation 762 00:49:51.707 --> 00:49:52.507 Stat SceneRendering: Provides detailed information about scene rendering 763 00:49:52.507 --> 00:49:53.307 Stat None: Disables all currently active Stat commands 764 00:49:53.307 --> 00:49:54.007 Optimization View Modes Light Complexity: Visualizes light complexity in the scene 765 00:49:54.007 --> 00:49:54.707 Lightmap Density: Visualizes the density used in lightmaps 766 00:49:54.707 --> 00:49:55.407 Stationary Light Overlap: Visualizes areas where stationary lights overlap 767 00:49:55.407 --> 00:49:56.157 Shader Complexity: Visualizes the complexity of calculations 768 00:49:56.157 --> 00:49:56.857 performed by the shader for each pixel 769 00:49:56.857 --> 00:49:57.557 Shader Complexity & Quads: Visualizes both shader complexity and quad overdraw simultaneously 770 00:49:57.557 --> 00:49:58.307 Quad Overdraw: Visualizes areas with overdraw 771 00:49:58.307 --> 00:49:59.307 Various Optimization Methods 772 00:49:59.307 --> 00:50:00.307 LOD Optimization Nanite Optimization 773 00:50:00.307 --> 00:50:01.307 Polygon Optimization Using Texture Maps Material Optimization 774 00:50:01.307 --> 00:50:02.307 Level Streaming Optimization Shader Optimization 775 00:50:02.307 --> 00:50:03.257 Code Optimization Project Settings 776 00:50:03.257 --> 00:50:04.857 Precautions for Unreal Engine Settings for ICVFX 777 00:50:04.857 --> 00:50:06.557 Precautions During ICVFX Work Avoid changing project settings during real-time rendering 778 00:50:06.557 --> 00:50:08.207 Refrain from making large changes in multi-user sessions 779 00:50:08.207 --> 00:50:09.457 Web Control Functionality in ICVFX 780 00:50:09.457 --> 00:50:10.707 Web Control Allows users to remotely control various elements of the project 781 00:50:10.707 --> 00:50:11.957 and monitor in real-time 782 00:50:11.957 --> 00:50:13.207 Enables real-time scene testing and immediate feedback in live environments