WEBVTT 1 00:00:04.280 --> 00:00:08.893 Realistic Commons Explosion Effects 2 00:00:08.893 --> 00:00:11.646 GCC Academy 3 00:00:23.571 --> 00:00:25.959 Hello, this is Park Hyun-sang 4 00:00:25.959 --> 00:00:28.760 In this lecture, we will cover Unreal effects 5 00:00:28.760 --> 00:00:31.719 using the Niagara system 6 00:00:31.719 --> 00:00:34.369 By utilizing various Niagara modules 7 00:00:34.369 --> 00:00:37.000 and connections with other assets, 8 00:00:37.000 --> 00:00:39.599 we will create dynamic effects 9 00:00:39.599 --> 00:00:43.320 that differ from the more static nature of shaders 10 00:00:43.320 --> 00:00:45.470 Using features such as Niagara’s burst 11 00:00:45.470 --> 00:00:48.759 and the shader’s world offset, 12 00:00:48.759 --> 00:00:51.160 we will work on creating an explosion effect 13 00:00:51.160 --> 00:00:55.279 We will specifically use what’s called mesh particles 14 00:00:55.279 --> 00:00:58.360 Instead of relying on sprite images, 15 00:00:58.360 --> 00:01:01.560 we will use meshes like spheres 16 00:01:01.560 --> 00:01:06.239 and cubes as particle elements 17 00:01:06.239 --> 00:01:09.239 The explosion effect leverages instantaneous force 18 00:01:09.239 --> 00:01:13.639 to leave a strong impression 19 00:01:13.639 --> 00:01:16.589 From the fireworks we commonly see in daily life 20 00:01:16.589 --> 00:01:19.519 to more complex explosions, 21 00:01:19.519 --> 00:01:21.469 we will explore various Niagara modules 22 00:01:21.469 --> 00:01:24.113 that allow us to achieve these effects 23 00:01:24.562 --> 00:01:28.222 Setting the Explosion Radius and Crafting the Explosion Effect 24 00:01:29.367 --> 00:01:32.917 We will start from preparing the assets needed 25 00:01:32.917 --> 00:01:35.879 for creating explosion effects 26 00:01:35.879 --> 00:01:40.800 To begin, I created a folder named ExplosionFX 27 00:01:40.800 --> 00:01:43.440 Now create a new Niagara system 28 00:01:43.440 --> 00:01:46.279 For the base template, 29 00:01:46.279 --> 00:01:49.559 we use SingleLoopingParticle 30 00:01:49.559 --> 00:01:52.609 That as the base template, 31 00:01:52.609 --> 00:01:55.519 click the Create button 32 00:01:55.519 --> 00:02:00.669 We name the asset FX_Explosion 33 00:02:00.669 --> 00:02:03.120 for simplicity 34 00:02:03.120 --> 00:02:07.680 After that, we double-click to open the Niagara window, 35 00:02:07.680 --> 00:02:10.039 where we see a preview 36 00:02:10.039 --> 00:02:16.160 of a small sphere within a circular boundary 37 00:02:16.160 --> 00:02:19.919 Here's the outline of the explosion effect 38 00:02:19.919 --> 00:02:24.039 This circular boundary represents the overall range of the explosion 39 00:02:24.039 --> 00:02:27.989 and will be animated to expand over time, 40 00:02:27.989 --> 00:02:31.600 so it's a sphere 41 00:02:31.600 --> 00:02:34.880 One thing to note is, 42 00:02:34.880 --> 00:02:38.160 by default, particles use a sprite setup 43 00:02:38.160 --> 00:02:40.860 It's a flat rectangular mesh 44 00:02:40.860 --> 00:02:43.279 that always faces the camera 45 00:02:43.279 --> 00:02:46.839 That's the basic setup 46 00:02:46.839 --> 00:02:50.679 However, for our explosion effect, 47 00:02:50.679 --> 00:02:53.399 instead of a rectangular sprite, 48 00:02:53.399 --> 00:02:56.559 we need a spherical mesh 49 00:02:56.559 --> 00:02:59.209 So we need a 3D mesh 50 00:02:59.209 --> 00:03:02.320 with an actual volume 51 00:03:02.320 --> 00:03:06.039 To achieve this, over here, 52 00:03:06.039 --> 00:03:10.800 go to the Renderer section and add, not Sprite, 53 00:03:10.800 --> 00:03:13.800 but a Mesh Renderer 54 00:03:13.800 --> 00:03:16.000 while disabling the default Sprite Renderer 55 00:03:16.000 --> 00:03:19.199 Initially, this action removes the sphere preview 56 00:03:19.199 --> 00:03:23.149 In the Meshes section of the Mesh Renderer, 57 00:03:23.149 --> 00:03:26.399 the default gizmo appears as a small arrow shape 58 00:03:26.399 --> 00:03:29.210 So in viewport, 59 00:03:29.210 --> 00:03:33.039 you'll see a little gizmo like so 60 00:03:33.039 --> 00:03:37.320 Searching for sphere 61 00:03:37.320 --> 00:03:40.420 allows us to select 62 00:03:40.420 --> 00:03:43.880 the basic Static Mesh Sphere 63 00:03:43.880 --> 00:03:46.360 Of all spheres, 64 00:03:46.360 --> 00:03:50.710 under the Sky category we have Static 65 00:03:50.710 --> 00:03:52.880 Add that 66 00:03:52.880 --> 00:03:54.830 Now, 67 00:03:54.830 --> 00:03:57.399 when working with static mesh assets, 68 00:03:57.399 --> 00:04:02.360 double click to check for certain conditions to be met 69 00:04:02.360 --> 00:04:07.360 For instance, check that the UV mapping is properly unwrapped 70 00:04:07.360 --> 00:04:10.860 and that the pivot point is centered 71 00:04:10.860 --> 00:04:12.199 In this case, don't use this 72 00:04:12.199 --> 00:04:15.800 To confirm the pivot’s position, 73 00:04:15.800 --> 00:04:18.880 In the viewport, 74 00:04:18.880 --> 00:04:22.000 you can press the F key to move it around 75 00:04:22.000 --> 00:04:26.720 It shows that the grid aligns with the sphere’s center 76 00:04:26.720 --> 00:04:32.279 This confirms that the pivot is correctly placed at the sphere’s center 77 00:04:32.279 --> 00:04:33.729 Therefore, When choosing 78 00:04:33.729 --> 00:04:36.959 a sphere mesh like this, 79 00:04:36.959 --> 00:04:39.509 ensure it meets the following conditions 80 00:04:39.509 --> 00:04:42.239 he grid should align perfectly with the center of the sphere 81 00:04:42.239 --> 00:04:45.600 even when viewed from the side 82 00:04:45.600 --> 00:04:50.000 And the UV mapping should be fully unwrapped, 83 00:04:50.000 --> 00:04:52.949 showing a seamless checker pattern 84 00:04:52.949 --> 00:04:56.200 This is the sphere we want 85 00:04:56.200 --> 00:05:00.160 Currently, in the Initialize Particle section, 86 00:05:00.160 --> 00:05:03.660 the default settings show Sprite Mode as Uniform, 87 00:05:03.660 --> 00:05:07.720 while the Mesh Attribute remains unset, 88 00:05:07.720 --> 00:05:10.359 which is why nothing is visible 89 00:05:10.359 --> 00:05:13.309 Since the Sprite Renderer is not being used, 90 00:05:13.309 --> 00:05:15.359 reset it 91 00:05:15.359 --> 00:05:20.000 and change the Mesh Scale Mode to Uniform 92 00:05:20.000 --> 00:05:25.799 Additionally, reset the Lifetime setting, changing it 93 00:05:25.799 --> 00:05:30.160 from CurrentLoopDuration to a fixed value of 1 94 00:05:30.160 --> 00:05:32.839 After recompiling, 95 00:05:32.839 --> 00:05:37.440 the sphere will become visible like so 96 00:05:37.440 --> 00:05:42.160 In the Emitter settings under the State section, set Life Cycle Mode to Self 97 00:05:42.160 --> 00:05:44.519 This is because we’re creating a one-time explosion effect, 98 00:05:44.519 --> 00:05:48.079 not something continuous like fire or smoke 99 00:05:48.079 --> 00:05:52.640 Set it to Self and then Once 100 00:05:52.640 --> 00:05:56.799 with a default runtime of one second, 101 00:05:56.799 --> 00:05:59.440 that effect only plays for a brief moment 102 00:05:59.440 --> 00:06:04.600 To make the sphere expand, 103 00:06:04.600 --> 00:06:11.359 go to Particle Update and search for Scale Mesh Size 104 00:06:11.359 --> 00:06:13.880 There's our Scale Mesh Size 105 00:06:13.880 --> 00:06:16.959 Connect this to the system, 106 00:06:16.959 --> 00:06:20.279 and examine the Scale Factor setting 107 00:06:20.279 --> 00:06:24.040 This allows transformations such 108 00:06:24.040 --> 00:06:28.359 as elongating the sphere 109 00:06:28.359 --> 00:06:32.920 along the X or Y axis 110 00:06:32.920 --> 00:06:38.200 To make the sphere grow dynamically over time, 111 00:06:38.200 --> 00:06:41.880 use Vector From Curve 112 00:06:41.880 --> 00:06:44.839 Since it’s an explosion, 113 00:06:44.839 --> 00:06:46.519 it should start small and grow rapidly 114 00:06:46.519 --> 00:06:49.720 Reverse the graph’s shape 115 00:06:49.720 --> 00:06:54.040 so that the scale starts at 1 when the lifetime is 0 116 00:06:54.040 --> 00:06:58.399 and reaches 0 at 100 lifetime 117 00:06:58.399 --> 00:07:03.000 Note that as this is a Vector3 parameter, 118 00:07:03.000 --> 00:07:05.959 templates might not apply correctly in certain cases 119 00:07:05.959 --> 00:07:07.799 When this happens, you can drag 120 00:07:07.799 --> 00:07:12.600 to select all of X, Y, and Z, and set them to 0 at the start 121 00:07:12.600 --> 00:07:16.559 At the endpoint, when it reaches 100%, 122 00:07:16.559 --> 00:07:20.299 set the Scale to 1 123 00:07:20.299 --> 00:07:22.320 After that, playing it back 124 00:07:22.320 --> 00:07:25.480 will show the size changing like this 125 00:07:25.480 --> 00:07:29.279 At this point, individual preferences among creators may come into play 126 00:07:29.279 --> 00:07:33.920 For instance, some might set it explicitly to grow 8 times 127 00:07:33.920 --> 00:07:36.079 or 10 times, 128 00:07:36.079 --> 00:07:39.640 something like this 129 00:07:39.640 --> 00:07:42.590 Others might configure the Curve itself to operate 130 00:07:42.590 --> 00:07:44.440 within a value range of 0 and 1 131 00:07:44.440 --> 00:07:46.559 Then, by using the Scale Curve value, 132 00:07:46.559 --> 00:07:49.720 you can specify how much you want it to grow 133 00:07:49.720 --> 00:07:52.119 For example, inputting a value 134 00:07:52.119 --> 00:07:54.399 for 10 times growth 135 00:07:54.399 --> 00:07:58.880 Alternatively, instead of using a Vector, 136 00:07:58.880 --> 00:08:01.239 you can opt for Vector from Plot 137 00:08:01.239 --> 00:08:05.160 to ensure that X, Y, and Z 138 00:08:05.160 --> 00:08:10.040 all have consistent values 139 00:08:10.040 --> 00:08:12.070 This allows you to exclude values as needed 140 00:08:12.070 --> 00:08:16.720 You can choose one of two methods 141 00:08:16.720 --> 00:08:19.480 Either exclude everything directly through the graph 142 00:08:19.480 --> 00:08:22.920 or leave the graph in a range of 0 to 1 143 00:08:22.920 --> 00:08:25.880 and use the Scale Curve value 144 00:08:25.880 --> 00:08:29.519 to designate maximum values 145 00:08:29.519 --> 00:08:32.239 for the Curve 146 00:08:32.239 --> 00:08:35.479 Once you’ve set the size this way, 147 00:08:35.479 --> 00:08:36.919 save it here 148 00:08:36.919 --> 00:08:39.359 and place it in the world 149 00:08:39.359 --> 00:08:43.679 Currently, I’ve configured it to grow 10 times, 150 00:08:43.679 --> 00:08:48.440 so if you look at the size of the sphere connected 151 00:08:48.440 --> 00:08:50.760 to the Mesh Renderer, 152 00:08:50.760 --> 00:08:53.710 you’ll see the Approx Size is 100×100×100, 153 00:08:53.710 --> 00:08:54.960 set to 100 unit 154 00:08:54.960 --> 00:08:57.679 A 1-meter sphere growing 10 times 155 00:08:57.679 --> 00:09:00.559 becomes 10 meters in size 156 00:09:00.559 --> 00:09:04.719 I’ll place this in the world now 157 00:09:04.719 --> 00:09:07.679 Unlike in the preview, 158 00:09:07.679 --> 00:09:09.960 the expanding shape appears much cleaner 159 00:09:09.960 --> 00:09:11.960 Resetting again 160 00:09:11.960 --> 00:09:14.599 shows how the sphere rapidly grows 161 00:09:14.599 --> 00:09:17.880 with a smooth expansion effect 162 00:09:17.880 --> 00:09:20.760 The growth speed of the Scale Mesh 163 00:09:20.760 --> 00:09:23.880 can be adjusted using the curve here, 164 00:09:23.880 --> 00:09:27.840 which can be set to Auto for smooth transitions 165 00:09:27.840 --> 00:09:30.840 By manipulating the curve, 166 00:09:30.840 --> 00:09:35.359 you can also adjust the speed variations over time 167 00:09:35.359 --> 00:09:39.599 After saving, I’ll test it again in the world 168 00:09:39.599 --> 00:09:41.799 Resetting it 169 00:09:41.799 --> 00:09:44.000 shows the sphere initially growing quickly 170 00:09:44.000 --> 00:09:48.799 and then slowing down, as currently configured 171 00:09:48.799 --> 00:09:51.200 This simulates an explosion 172 00:09:51.200 --> 00:09:54.280 with a clearly defined blast radius 173 00:09:54.280 --> 00:09:59.559 Next, we need to apply a material to represent the explosion 174 00:09:59.559 --> 00:10:02.520 I’ll create a material 175 00:10:02.520 --> 00:10:07.919 named M_ExplosionFX 176 00:10:07.919 --> 00:10:11.640 and open the editor to adjust its settings 177 00:10:11.640 --> 00:10:14.799 For the explosion to fade gradually, 178 00:10:14.799 --> 00:10:16.599 I’ll simulate the diminishing effect 179 00:10:16.599 --> 00:10:20.520 like a real explosion 180 00:10:20.520 --> 00:10:23.840 So set it to Translucent 181 00:10:23.840 --> 00:10:26.880 Since explosions emit light, 182 00:10:26.880 --> 00:10:29.980 I’ll leave the material in an Unlit state 183 00:10:29.980 --> 00:10:35.159 To create a fiery effect, 184 00:10:35.159 --> 00:10:37.640 I'll add a shading effect 185 00:10:37.640 --> 00:10:41.159 I’ll use a VectorParameter 186 00:10:41.159 --> 00:10:45.840 and name it FireColor 187 00:10:45.840 --> 00:10:48.159 The default values for this parameter 188 00:10:48.159 --> 00:10:52.840 will be set as Red 8, Green 1, and Blue 0.2 189 00:10:52.840 --> 00:10:56.200 Connecting this to the Emissive Color 190 00:10:56.200 --> 00:10:59.960 gives a preview that appears yellow, 191 00:10:59.960 --> 00:11:01.840 but in reality, 192 00:11:01.840 --> 00:11:05.080 it will have an orange hue 193 00:11:05.080 --> 00:11:08.960 For the flame effect, we need two components, 194 00:11:08.960 --> 00:11:12.559 a bright red burning section and a dark, charcoal-like ash section 195 00:11:12.559 --> 00:11:15.359 For the ash-like portion, 196 00:11:15.359 --> 00:11:19.400 as there’s no need to define a specific color, 197 00:11:19.400 --> 00:11:22.320 we’ll use a Constant3Vector 198 00:11:22.320 --> 00:11:25.260 and set it to black 199 00:11:25.260 --> 00:11:28.799 hese two elements will be blended 200 00:11:28.799 --> 00:11:32.880 using the Linear Interpolate or Lerp function 201 00:11:32.880 --> 00:11:37.799 Instead of manually inputting 202 00:11:37.799 --> 00:11:40.280 a fixed value or a node, 203 00:11:40.280 --> 00:11:42.119 you can add 0 204 00:11:42.119 --> 00:11:45.119 It's the same thing, but this is to demonstrate 205 00:11:45.119 --> 00:11:48.520 how the colors blend dynamically 206 00:11:48.520 --> 00:11:50.320 So for that purpose, 207 00:11:50.320 --> 00:11:54.640 I will use the nodes for this 208 00:11:54.640 --> 00:11:58.239 The current setup connects the colors directly to the Emissive output 209 00:11:58.239 --> 00:12:03.599 When the Alpha value is 0, the FireColor is displayed 210 00:12:03.599 --> 00:12:07.719 When the Alpha value is 1, the black color is shown 211 00:12:07.719 --> 00:12:10.280 That's the setup for now 212 00:12:10.280 --> 00:12:11.919 Let's leave it be 213 00:12:11.919 --> 00:12:17.159 To blend these values dynamically depending on the viewing angle, 214 00:12:17.159 --> 00:12:19.000 we need the basic node 215 00:12:19.000 --> 00:12:21.760 called a Fresnel node 216 00:12:21.760 --> 00:12:24.960 Let's connect it to Lerp 217 00:12:24.960 --> 00:12:28.000 Connecting the Fresnel node to the Lerp’s Alpha input 218 00:12:28.000 --> 00:12:31.080 creates a lighting effect 219 00:12:31.080 --> 00:12:33.479 Comparing this setup to one 220 00:12:33.479 --> 00:12:35.400 where only FireColor is connected 221 00:12:35.400 --> 00:12:37.159 reveals a noticeable difference 222 00:12:37.159 --> 00:12:41.520 Without Fresnel, the sphere’s edges 223 00:12:41.520 --> 00:12:45.479 display a single color, while with Fresnel, 224 00:12:45.479 --> 00:12:48.440 for which we used Lerp, 225 00:12:48.440 --> 00:12:50.590 a gradient effect 226 00:12:50.590 --> 00:12:53.400 appears along the edges, as you can see here 227 00:12:53.400 --> 00:12:56.450 Next, I’ll enhance the appearance 228 00:12:56.450 --> 00:12:59.559 by incorporating a noise texture 229 00:12:59.559 --> 00:13:03.760 Let's bring in a Noise texture 230 00:13:03.760 --> 00:13:07.080 Using a Texture Sample node, 231 00:13:07.080 --> 00:13:10.840 search for Noise under Texture 232 00:13:10.840 --> 00:13:13.520 and select Perlin_Noise 233 00:13:13.520 --> 00:13:18.359 to connect to the ExponentIn input 234 00:13:18.359 --> 00:13:22.239 This creates an effect resembling sunspots, 235 00:13:22.239 --> 00:13:25.460 with areas appearing 236 00:13:25.460 --> 00:13:28.840 partially black and partially bright 237 00:13:28.840 --> 00:13:31.840 Rotating the sphere reveals 238 00:13:31.840 --> 00:13:36.080 that the central region remains bright 239 00:13:36.080 --> 00:13:38.799 The center of the sphere is brighter 240 00:13:38.799 --> 00:13:40.960 regardless of viewing angle, 241 00:13:40.960 --> 00:13:45.299 as you can see here 242 00:13:45.299 --> 00:13:49.840 while the edges maintain a reddish hue 243 00:13:49.840 --> 00:13:53.320 By applying a Multiply node 244 00:13:53.320 --> 00:13:56.719 to the noise values, I can adjust the intensity 245 00:13:56.719 --> 00:13:59.669 For example, setting the multiplier to 3 246 00:13:59.669 --> 00:14:02.479 in this ExponentIn, 247 00:14:02.479 --> 00:14:06.200 it reduces the black regions, 248 00:14:06.200 --> 00:14:08.600 while a value of 0.5 249 00:14:08.600 --> 00:14:11.479 which is half of what it was before 250 00:14:11.479 --> 00:14:14.179 results in 251 00:14:14.179 --> 00:14:16.080 a more pronounced black 252 00:14:16.080 --> 00:14:19.479 The lower the number, the more black it is 253 00:14:19.479 --> 00:14:21.829 The bigger it is, 254 00:14:21.829 --> 00:14:24.280 the more visible the FireColor gets 255 00:14:24.280 --> 00:14:27.280 I will make this a parameter later on 256 00:14:27.280 --> 00:14:31.179 This alone 257 00:14:31.179 --> 00:14:34.479 will make everything look very static 258 00:14:34.479 --> 00:14:39.119 So let's use a Panner node to animate the UV coordinates 259 00:14:39.119 --> 00:14:42.000 and connect to the UVs of Texture Sample 260 00:14:42.000 --> 00:14:44.840 Here it is 261 00:14:44.840 --> 00:14:46.940 Here, the Speed values 262 00:14:46.940 --> 00:14:48.159 are all set to 0 263 00:14:48.159 --> 00:14:52.919 Setting it to 1 264 00:14:52.919 --> 00:14:57.605 results in a swirling, fiery effect 265 00:14:57.605 --> 00:14:59.655 It's spinning right now, 266 00:14:59.655 --> 00:15:02.071 as you can see here 267 00:15:02.071 --> 00:15:05.221 Adjusting the Speed parameter 268 00:15:05.221 --> 00:15:09.321 lets you create the sensation 269 00:15:09.321 --> 00:15:11.700 of flames dancing over the sphere 270 00:15:11.700 --> 00:15:16.450 Finally, I’ll modify the sphere’s surface 271 00:15:16.450 --> 00:15:20.181 to make it appear uneven, 272 00:15:20.181 --> 00:15:22.520 as if it’s distorted by heat 273 00:15:22.520 --> 00:15:25.820 Same thing here, 274 00:15:25.820 --> 00:15:27.720 a Texture Sample node is used 275 00:15:27.720 --> 00:15:30.089 to bring in a normal map 276 00:15:30.089 --> 00:15:34.989 From the StarterContent-Textures, 277 00:15:34.989 --> 00:15:37.720 select the Detail_Rocky normal map 278 00:15:37.720 --> 00:15:41.560 This normal map has a convex shape 279 00:15:41.560 --> 00:15:45.720 Connect it to Texture Sample 280 00:15:45.720 --> 00:15:51.959 Now, we'll onnect it to the World Position Offset 281 00:15:51.959 --> 00:15:55.639 Initially, these changes 282 00:15:55.639 --> 00:15:58.920 aren’t too noticeable, 283 00:15:58.920 --> 00:16:03.639 so let's add a Multiply node to amplify the effect 284 00:16:03.639 --> 00:16:06.560 By setting the value to 10, 285 00:16:06.560 --> 00:16:09.860 it exaggerates the unevenness, 286 00:16:09.860 --> 00:16:11.720 making the surface look bumpy and dynamic 287 00:16:11.720 --> 00:16:16.599 Next, I link the Noise texture’s Panner node 288 00:16:16.599 --> 00:16:20.840 to the UV input of the normal map 289 00:16:20.840 --> 00:16:23.040 At first, 290 00:16:23.040 --> 00:16:26.085 the movement speed is too high with 1, 291 00:16:26.085 --> 00:16:29.639 so let's lower it to 0.1 to create smoother motion 292 00:16:29.639 --> 00:16:32.340 It results in a shimmering, 293 00:16:32.340 --> 00:16:36.160 heat-distorted effect 294 00:16:36.160 --> 00:16:38.959 The World Position Offset allows us 295 00:16:38.959 --> 00:16:42.480 to work on the 3D surface of the sphere, 296 00:16:42.480 --> 00:16:45.320 by literally offsetting it 297 00:16:45.320 --> 00:16:48.800 We move the surface using the normal map, 298 00:16:48.800 --> 00:16:55.140 which represents a texture with a unit length of 1, 299 00:16:55.140 --> 00:16:57.879 or 1cm 300 00:16:57.879 --> 00:17:02.599 ince a 1-unit change 301 00:17:02.599 --> 00:17:06.249 on a 1m sphere 302 00:17:06.249 --> 00:17:08.480 isn’t very noticeable, 303 00:17:08.480 --> 00:17:13.760 let's use the Multiply node to scale the offset 304 00:17:13.760 --> 00:17:16.720 to 5 units or 10 units 305 00:17:16.720 --> 00:17:18.879 A bigger scale 306 00:17:18.879 --> 00:17:22.519 seems to demonstrate this texture better 307 00:17:22.519 --> 00:17:24.869 For now, I will go 308 00:17:24.869 --> 00:17:28.440 with 5 units like so 309 00:17:28.440 --> 00:17:31.958 Then, let's adjust the Fresnel node 310 00:17:31.958 --> 00:17:33.959 Add a Multiply node to control the Fresnel strength 311 00:17:33.959 --> 00:17:37.760 When I set it to 0.5, 312 00:17:37.760 --> 00:17:40.360 the red regions representing FireColor 313 00:17:40.360 --> 00:17:41.759 become more prominent 314 00:17:41.759 --> 00:17:44.399 On the other hand, increasing the value to 2 315 00:17:44.399 --> 00:17:46.149 expands this area, 316 00:17:46.149 --> 00:17:49.479 ore the black area here 317 00:17:49.479 --> 00:17:51.479 The Fresnel node lets me calculate the light’s behavior 318 00:17:51.479 --> 00:17:54.880 Areas directly facing the camera receive a value of 0, 319 00:17:54.880 --> 00:17:59.559 while edges perpendicular to the camera, 320 00:17:59.559 --> 00:18:02.759 so it's 0 here, but the perpendicular part 321 00:18:02.759 --> 00:18:05.399 receives a value of 1 322 00:18:05.399 --> 00:18:09.440 By multiplying these values, 323 00:18:09.440 --> 00:18:13.720 this emphasizes the edge effect, 324 00:18:13.720 --> 00:18:18.199 increasing the black area on the sphere 325 00:18:18.199 --> 00:18:22.440 At this stage, I’ll classify the various numerical values 326 00:18:22.440 --> 00:18:25.320 we’ve discussed into parameters 327 00:18:25.320 --> 00:18:28.070 Instead of controlling them 328 00:18:28.070 --> 00:18:30.479 through a Material Instance, 329 00:18:30.479 --> 00:18:33.559 I’ll set them up to be controlled directly within the Niagara system 330 00:18:33.559 --> 00:18:36.399 First, create a Dynamic Parameter 331 00:18:36.399 --> 00:18:40.279 and connect each parameter step by step 332 00:18:40.279 --> 00:18:43.839 The first parameter will be called FresnelPower, 333 00:18:43.839 --> 00:18:47.839 and I’ll set its default value to 1.2 334 00:18:47.839 --> 00:18:51.520 ’ll connect this to the node where Fresnel is multiplied, 335 00:18:51.520 --> 00:18:57.240 allowing us to control the extent of the blackened areas 336 00:18:57.240 --> 00:19:03.320 Next, I’ll create the second parameter, named WorldOffsetVal, 337 00:19:03.320 --> 00:19:05.670 and connect it to the World Offset node 338 00:19:05.670 --> 00:19:08.919 right away, like so 339 00:19:08.919 --> 00:19:12.440 Let’s set its default value to 5, 340 00:19:12.440 --> 00:19:15.160 so the surface takes on a bumpy appearance 341 00:19:15.160 --> 00:19:18.960 For the third parameter, I’ll name it Noise 342 00:19:18.960 --> 00:19:21.060 and connect it between the Fresnel 343 00:19:21.060 --> 00:19:23.279 and Noise Texture nodes at the Multiply point 344 00:19:23.279 --> 00:19:25.759 Let's connect it there 345 00:19:25.759 --> 00:19:27.959 If I set the Noise value 346 00:19:27.959 --> 00:19:31.559 to 0.1, the noise will become more pronounced 347 00:19:31.559 --> 00:19:33.809 Setting it to 1 348 00:19:33.809 --> 00:19:39.240 will narrow the black areas 349 00:19:39.240 --> 00:19:42.340 This parameter overlaps slightly 350 00:19:42.340 --> 00:19:45.119 with FresnelPower, 351 00:19:45.119 --> 00:19:48.769 but is specifically for adjusting noise intensity 352 00:19:48.769 --> 00:19:52.359 That's why it differs from the Fresnel value 353 00:19:52.359 --> 00:19:54.709 Therefore, it will adapt dynamically 354 00:19:54.709 --> 00:19:57.760 as the noise texture changes, 355 00:19:57.760 --> 00:19:59.634 which will provide constant values 356 00:19:59.634 --> 00:20:02.484 by being connected to Noise 357 00:20:02.484 --> 00:20:05.434 Finally, let’s add a fourth parameter 358 00:20:05.434 --> 00:20:09.180 Name it Speed, 359 00:20:09.180 --> 00:20:13.780 with a default value of 1 360 00:20:13.780 --> 00:20:18.340 If I lower it to 0.5, the movement will slow down, 361 00:20:18.340 --> 00:20:21.490 and if I increase it to 2, it will speed up noticeably 362 00:20:21.490 --> 00:20:23.590 But this cause pixelation 363 00:20:23.590 --> 00:20:26.190 So I recommend keeping it 364 00:20:26.190 --> 00:20:31.571 around 0.1 or 0.5 for better visuals 365 00:20:31.571 --> 00:20:33.221 Let's Apply 366 00:20:33.221 --> 00:20:36.821 To set this up, under the Explosion settings, 367 00:20:36.821 --> 00:20:41.806 enable the Material Override in the Mesh Renderer 368 00:20:41.806 --> 00:20:45.560 Click the plus button to add and link the material 369 00:20:45.560 --> 00:20:48.610 And here, select what we just created, 370 00:20:48.610 --> 00:20:52.460 M_ExplosionFX, 371 00:20:52.460 --> 00:20:55.439 using the arrow connection 372 00:20:55.439 --> 00:20:59.689 Next, I’ll go to the Particle Update section 373 00:20:59.689 --> 00:21:06.260 and create a Dynamic Material Parameter 374 00:21:06.260 --> 00:21:08.960 With this, I can control the parameters dynamically 375 00:21:08.960 --> 00:21:11.210 Initially, the light will appear fully visible, 376 00:21:11.210 --> 00:21:13.760 and as time progresses, the FresnelPower 377 00:21:13.760 --> 00:21:15.940 will intensify to about 1.2 378 00:21:15.940 --> 00:21:18.390 Since there is no Noise value, 379 00:21:18.390 --> 00:21:20.419 I’ll also set the Noise parameter to 1 380 00:21:20.419 --> 00:21:23.419 and the WorldOffset to 5cm 381 00:21:23.419 --> 00:21:25.207 Now, there is no animation, 382 00:21:25.207 --> 00:21:27.007 since the Speed is currently 0 383 00:21:27.007 --> 00:21:30.698 Set the Speed to 0.5 for the rotation 384 00:21:30.698 --> 00:21:33.998 If I increase the WorldOffset to 10, 385 00:21:33.998 --> 00:21:37.120 the animation becomes even more pronounced 386 00:21:37.120 --> 00:21:39.370 After saving the setup, I’ll test it in the world 387 00:21:39.370 --> 00:21:42.570 by placing the Niagara system and pressing the reset button 388 00:21:42.570 --> 00:21:44.720 This will confirm that everything works 389 00:21:44.720 --> 00:21:47.319 as we intended 390 00:21:47.319 --> 00:21:50.739 Returning to the Explosion Material, 391 00:21:50.739 --> 00:21:53.389 I notice the color value 392 00:21:53.389 --> 00:21:55.439 that we parameterized 393 00:21:55.439 --> 00:21:57.989 doesn’t necessarily need to be a parameter 394 00:21:57.989 --> 00:22:00.980 Instead, you can use the Particle Color node 395 00:22:00.980 --> 00:22:04.900 to directly modify it within the particle system 396 00:22:04.900 --> 00:22:08.550 I can connect its Alpha channel 397 00:22:08.550 --> 00:22:11.450 to Opacity or mix it 398 00:22:11.450 --> 00:22:14.171 with other various effects 399 00:22:14.171 --> 00:22:17.220 that we’ve previously created 400 00:22:17.220 --> 00:22:20.039 To demonstrate this, I’ll use an Add node 401 00:22:20.039 --> 00:22:22.939 to combine the results of the Fresnel and Dynamic Parameter 402 00:22:22.939 --> 00:22:24.989 Their multiplied values, 403 00:22:24.989 --> 00:22:28.160 for which we'll use this Add 404 00:22:28.160 --> 00:22:31.960 Now, connect this result to the Opacity 405 00:22:31.960 --> 00:22:35.160 At this point, the material might appear gray in the preview 406 00:22:35.160 --> 00:22:37.240 I’ll apply the changes 407 00:22:37.240 --> 00:22:39.639 and switch back to the Niagara interface 408 00:22:39.639 --> 00:22:42.739 In the Particle Update section, click on the plus 409 00:22:42.739 --> 00:22:46.781 to add a new module, Scale Color 410 00:22:46.781 --> 00:22:49.131 I’ll set the Scale RGB values 411 00:22:49.131 --> 00:22:51.981 to match the parameters we defined earlier 412 00:22:51.981 --> 00:22:54.031 8, 1, 0.2, 413 00:22:54.031 --> 00:22:58.699 or Red 8, Green 1, Blue 0.2 are the values 414 00:22:58.699 --> 00:23:01.999 Let’s talk about how we can adjust 415 00:23:01.999 --> 00:23:04.580 the alpha value here 416 00:23:04.580 --> 00:23:08.330 Right now, everything looks fine, 417 00:23:08.330 --> 00:23:13.889 But as the alpha value drops closer to zero and eventually goes below zero, 418 00:23:13.889 --> 00:23:16.500 you’ll start seeing a hole-like effect 419 00:23:16.500 --> 00:23:20.860 And if it continues to decrease all the way 420 00:23:20.860 --> 00:23:23.560 to -1, 421 00:23:23.560 --> 00:23:26.919 the object almost completely disappears 422 00:23:26.919 --> 00:23:29.800 This is why we need to ensure 423 00:23:29.800 --> 00:23:32.950 a controlled transition to make 424 00:23:32.950 --> 00:23:35.160 the fade-out appear smooth and natural 425 00:23:35.160 --> 00:23:38.560 To do this, I’ll use the Float From Curve node 426 00:23:38.560 --> 00:23:41.119 to control how the alpha value changes over time 427 00:23:41.119 --> 00:23:43.919 First, make the value of Scale Alpha 428 00:23:43.919 --> 00:23:47.179 using Float From Curve 429 00:23:47.179 --> 00:23:48.979 I’ll start by setting the initial value at 1 430 00:23:48.979 --> 00:23:52.300 Then, I’ll set the 100% point on the horizontal axis 431 00:23:52.300 --> 00:23:55.779 to around -2 432 00:23:55.779 --> 00:23:59.940 By doing this, we can achieve a fade-out effect 433 00:23:59.940 --> 00:24:02.340 If you find that the fade-out is too soft, 434 00:24:02.340 --> 00:24:03.899 or this may not be what you wanted, 435 00:24:03.899 --> 00:24:08.100 instead of leaving the material as Translucent, we can switch it to Masked 436 00:24:08.100 --> 00:24:12.450 Once we do that, we’ll link the alpha value to the Opacity Mask 437 00:24:12.450 --> 00:24:14.279 Let’s apply this and take a look 438 00:24:14.279 --> 00:24:17.529 Now, the fade-out happens with a rougher texture, 439 00:24:17.529 --> 00:24:20.679 which you can clearly see here 440 00:24:20.679 --> 00:24:24.179 When you preview this effect in the Niagara editor, 441 00:24:24.179 --> 00:24:26.359 you might notice some flickering as it fades out 442 00:24:26.359 --> 00:24:29.519 But when we place it in the actual world and reset it, 443 00:24:29.519 --> 00:24:32.819 the fade-out will appear much more stable, 444 00:24:32.819 --> 00:24:35.439 without any flickering that we saw 445 00:24:35.439 --> 00:24:39.899 Currently, the material is set to render only the front-facing surface of the sphere 446 00:24:39.899 --> 00:24:41.399 It means, as it fades, 447 00:24:41.399 --> 00:24:43.749 you’re only seeing this front part, 448 00:24:43.749 --> 00:24:44.899 this part of the sphere 449 00:24:44.899 --> 00:24:48.420 This front part of the sphere facing the camera 450 00:24:48.420 --> 00:24:52.779 So the back side touching the ground would not be visible 451 00:24:52.779 --> 00:24:55.179 To create a more volumetric appearance, 452 00:24:55.179 --> 00:24:59.019 even for the parts of the sphere you wouldn’t normally see, 453 00:24:59.019 --> 00:25:01.990 we’ll enable the Two-Sided option in the material settings 454 00:25:01.990 --> 00:25:06.159 When enabling Two-Sided, if you’re using Translucent, 455 00:25:06.159 --> 00:25:09.059 it might not calculate the depth 456 00:25:09.059 --> 00:25:11.739 of overlapping surfaces correctly 457 00:25:11.739 --> 00:25:13.589 Instead, it’s better to use Masked 458 00:25:13.589 --> 00:25:16.659 to ensure the full shape of the sphere is rendered properly 459 00:25:16.659 --> 00:25:19.209 Don't forget to enable the Two-Sided option too 460 00:25:19.209 --> 00:25:21.192 Let's reset it to see 461 00:25:21.192 --> 00:25:23.340 Let's look at it from here too 462 00:25:23.340 --> 00:25:27.140 Even here, the back side is also disappearing 463 00:25:27.140 --> 00:25:28.242 That's the effect we just added 464 00:25:28.594 --> 00:25:32.405 Smoke and Spark Effects 465 00:25:32.739 --> 00:25:37.700 Let’s continue by enhancing the explosion effect 466 00:25:37.700 --> 00:25:40.750 First, I’ll copy the SingleLoopingParticle 467 00:25:40.750 --> 00:25:45.260 by using Ctrl+C and Ctrl+V 468 00:25:45.260 --> 00:25:47.859 I’ll rename the original one 469 00:25:47.859 --> 00:25:51.419 to MeshExplosion to keep things organized 470 00:25:51.419 --> 00:25:55.020 and rename the copied particle of SingleLoopingParticle 471 00:25:55.020 --> 00:25:59.059 to FireSmoke 472 00:25:59.059 --> 00:26:00.959 For this new particle, I’ll disable the Mesh Renderer 473 00:26:00.959 --> 00:26:03.460 and instead enable the Sprite Renderer 474 00:26:03.460 --> 00:26:05.110 The original Sprite Renderer 475 00:26:05.110 --> 00:26:08.179 Same with Initialize Particle 476 00:26:08.179 --> 00:26:09.879 Since the Mesh Renderer is no longer in use, 477 00:26:09.879 --> 00:26:13.733 I’ll also reset the Scale Mode in the Initialize Particle settings 478 00:26:13.733 --> 00:26:19.179 to Unset and change the Sprite Attribute 479 00:26:19.179 --> 00:26:24.380 Now, since explosions naturally generate smoke, 480 00:26:24.380 --> 00:26:27.020 let’s create a smoke effect that spreads outwards 481 00:26:27.020 --> 00:26:32.580 To do this, I’ll start by setting up some basic movement for the Sprite Renderer 482 00:26:32.580 --> 00:26:36.299 Let’s temporarily disable the MeshExplosion so we can focus on the smoke 483 00:26:36.299 --> 00:26:40.900 Picture a large explosion 484 00:26:40.900 --> 00:26:43.750 As it expands, 485 00:26:43.750 --> 00:26:46.539 smoke trails spread out from the center 486 00:26:46.539 --> 00:26:50.266 We want to replicate this behavior 487 00:26:50.266 --> 00:26:54.460 by making the smoke particles extend outward as the sphere grows 488 00:26:54.460 --> 00:26:57.580 For this, we need a spawned area 489 00:26:57.580 --> 00:26:59.280 In the Particle Spawn section, 490 00:26:59.280 --> 00:27:03.380 add a Shape Location module 491 00:27:03.380 --> 00:27:07.739 Then, I’ll add an Add Velocity module 492 00:27:07.739 --> 00:27:10.979 to give the particles some movement 493 00:27:10.979 --> 00:27:13.579 You’ll notice that the particles 494 00:27:13.579 --> 00:27:17.260 now appear in random positions 495 00:27:17.260 --> 00:27:19.099 Since this is a sphere, 496 00:27:19.099 --> 00:27:22.099 the particles are forming 497 00:27:22.099 --> 00:27:26.219 within a spherical range randomly, 498 00:27:26.219 --> 00:27:30.900 moving upwards like so 499 00:27:30.900 --> 00:27:33.900 We'll modify the shape of the spawning area 500 00:27:33.900 --> 00:27:37.500 Set the Shape Location to Torus 501 00:27:37.500 --> 00:27:41.260 and increase the Radius to 200 502 00:27:41.260 --> 00:27:45.179 For the velocity, I’ll change it from Linear 503 00:27:45.179 --> 00:27:50.020 to From Point and set the value to 160 504 00:27:50.020 --> 00:27:55.260 This transforms the spawning area to torus, 505 00:27:55.260 --> 00:27:58.539 or a 3D donut-like shape 506 00:27:58.539 --> 00:28:03.739 So in this donut-like shape, the particles will now 507 00:28:03.739 --> 00:28:07.900 spawn randomly within this toroidal volume 508 00:28:07.900 --> 00:28:11.099 I’ll increase the number of particles bursting 509 00:28:11.099 --> 00:28:14.020 to around 50 510 00:28:14.020 --> 00:28:18.940 You’ll see the particles spread outwards like this 511 00:28:18.940 --> 00:28:21.619 The Torus shape we set earlier 512 00:28:21.619 --> 00:28:24.539 is essentially an invisible donut-shaped spawning area 513 00:28:24.539 --> 00:28:25.900 And here, 514 00:28:25.900 --> 00:28:29.619 the Add Velocity module set to From Point 515 00:28:29.619 --> 00:28:33.780 ensures that the particles spread outward 516 00:28:33.780 --> 00:28:35.179 That's what it means 517 00:28:35.179 --> 00:28:37.460 So all these particles 518 00:28:37.460 --> 00:28:39.739 will be radiating away 519 00:28:39.739 --> 00:28:42.260 from the origin point like this 520 00:28:42.260 --> 00:28:45.140 That's the setup we have for now 521 00:28:45.140 --> 00:28:47.820 Next, let’s combine this with the Explosion emitter 522 00:28:47.820 --> 00:28:50.900 Currently, the particle velocity is too low, 523 00:28:50.900 --> 00:28:54.739 causing the smoke particles to get overshadowed by the explosion sphere 524 00:28:54.739 --> 00:28:58.739 To fix this, I’ll increase the velocity to 300 or 400, 525 00:28:58.739 --> 00:29:00.619 adjusting it as necessary 526 00:29:00.619 --> 00:29:03.979 by switching between different camera views 527 00:29:03.979 --> 00:29:06.700 or testing it in the world 528 00:29:06.700 --> 00:29:09.219 Try it yourselves to see 529 00:29:09.219 --> 00:29:13.739 if the speed is appropriate as we designed 530 00:29:13.739 --> 00:29:15.859 If the particle count feels insufficient, 531 00:29:15.859 --> 00:29:19.900 you can boost it to 150 or more, 532 00:29:19.900 --> 00:29:21.900 making the smoke more prominent 533 00:29:21.900 --> 00:29:24.299 If you need more speed, 534 00:29:24.299 --> 00:29:26.619 you can add a number you like, 535 00:29:26.619 --> 00:29:29.219 for example, 600 536 00:29:29.219 --> 00:29:32.419 However, there’s a limitation in the current setup 537 00:29:32.419 --> 00:29:35.539 So when the particle 538 00:29:35.539 --> 00:29:38.380 enlarges from this explosion point, 539 00:29:38.380 --> 00:29:40.419 as it expands, 540 00:29:40.419 --> 00:29:44.059 it transfers the flame 541 00:29:44.059 --> 00:29:45.940 to the ground 542 00:29:45.940 --> 00:29:48.099 That's how the smoke is engendered 543 00:29:48.099 --> 00:29:53.059 The smoke at FireSmoke 544 00:29:53.059 --> 00:29:56.140 originates a bit further away, 545 00:29:56.140 --> 00:29:59.859 from the Torus shape, or the donut shape 546 00:30:00.000 --> 00:30:03.160 creating a continuous stream 547 00:30:03.160 --> 00:30:07.000 that spreads outward in a single burst, 548 00:30:07.000 --> 00:30:12.120 instead of little steps in between 549 00:30:12.120 --> 00:30:13.920 It's not like smoke now 550 00:30:13.920 --> 00:30:16.120 We could change the texture later 551 00:30:16.120 --> 00:30:19.559 This setup lacks the gradual, scattered feel 552 00:30:19.559 --> 00:30:22.480 of actual smoke rising from different points 553 00:30:22.480 --> 00:30:26.240 To address this, 554 00:30:26.240 --> 00:30:30.760 duplicate the FireSmoke emitter using Ctrl+C and Ctrl+V, 555 00:30:30.760 --> 00:30:36.040 resulting in FireSmoke and FireSmoke001 556 00:30:36.040 --> 00:30:39.080 Using the concept of sub-emitters, 557 00:30:39.080 --> 00:30:42.757 I’ll set up the system so that smoke appears 558 00:30:42.757 --> 00:30:45.160 at specific points 559 00:30:45.160 --> 00:30:47.959 As it enlarges, 560 00:30:47.959 --> 00:30:53.480 it can appear where the fire interacts with the ground or other surfaces 561 00:30:53.480 --> 00:30:56.520 Here’s how it will work 562 00:30:56.520 --> 00:31:01.919 As the fire spreads outward, 563 00:31:01.919 --> 00:31:06.120 it will trigger smoke at intervals 564 00:31:06.120 --> 00:31:09.239 as it passes a certain point 565 00:31:09.239 --> 00:31:11.519 At the first interaction point, smoke will rise 566 00:31:11.519 --> 00:31:13.559 Then at the second point, another burst of smoke 567 00:31:13.559 --> 00:31:14.959 Now at the third, so on 568 00:31:14.959 --> 00:31:17.680 Now, let’s enhance the fire effect 569 00:31:17.680 --> 00:31:22.040 by introducing smoke that dynamically spawns as the fire spreads 570 00:31:22.040 --> 00:31:27.879 To achieve this, we’ll use sub-emitters, 571 00:31:27.879 --> 00:31:31.279 also known as sub-particles, 572 00:31:31.279 --> 00:31:34.800 which rely on the data from the main particles 573 00:31:34.800 --> 00:31:38.680 to generate secondary particles 574 00:31:38.680 --> 00:31:42.320 This allows us to control how the secondary particles are created 575 00:31:42.320 --> 00:31:45.559 First, I’ll activate Requires Persistent IDs 576 00:31:45.559 --> 00:31:49.199 in the Emitter Properties for the FireSmoke emitter 577 00:31:49.199 --> 00:31:51.959 It says Requires Persistent ID 578 00:31:51.959 --> 00:31:54.360 We need to enable this 579 00:31:54.360 --> 00:31:56.560 This means 580 00:31:56.560 --> 00:31:59.160 that I'm using the information in FireSmoke 581 00:31:59.160 --> 00:32:01.559 to create sub-particles, 582 00:32:01.559 --> 00:32:04.599 for which this needs to be registered 583 00:32:04.599 --> 00:32:08.919 Next, to the Particle Update section of FireSmoke, 584 00:32:08.919 --> 00:32:12.160 We have three events 585 00:32:12.160 --> 00:32:16.320 Since we want our particle to burst every time the location shifts, 586 00:32:16.320 --> 00:32:21.000 I’ll add a Generate Location Event module 587 00:32:21.000 --> 00:32:24.160 Now, for the sub-particles, 588 00:32:24.160 --> 00:32:26.800 Click on the plus button on stage, 589 00:32:26.800 --> 00:32:29.150 and create a new one 590 00:32:29.150 --> 00:32:30.800 called Event Handler 591 00:32:30.800 --> 00:32:32.880 Specifically, in the Event Handler Properties, 592 00:32:32.880 --> 00:32:37.520 start by setting the Source 593 00:32:37.520 --> 00:32:40.600 on which information is being retrieved 594 00:32:40.600 --> 00:32:43.360 since we have added the ID, 595 00:32:43.360 --> 00:32:47.559 we can search for Location Event in FireSmoke right away 596 00:32:47.559 --> 00:32:51.559 I’ll use the Location Event 597 00:32:51.559 --> 00:32:54.039 from the FireSmoke emitter 598 00:32:54.039 --> 00:32:57.880 By linking the Location Event to the secondary emitter, 599 00:32:57.880 --> 00:33:02.279 I’ll ensure that the sub-particles are spawned based on the events generated by the original particles 600 00:33:02.279 --> 00:33:06.639 For instance, spawn one particle at each event 601 00:33:06.639 --> 00:33:09.440 or ten particles 602 00:33:09.440 --> 00:33:12.279 Those are the decisions we can make now 603 00:33:12.279 --> 00:33:14.312 From the top view, you’ll notice 604 00:33:14.312 --> 00:33:17.360 a significantly larger number of particles being generated 605 00:33:17.360 --> 00:33:20.360 To make this happen, 606 00:33:20.360 --> 00:33:24.520 I’ll use the Receive Location Event 607 00:33:24.520 --> 00:33:28.399 By going to the Event Handler and clicking the + button, 608 00:33:28.399 --> 00:33:30.360 I’ll add the Receive module, 609 00:33:30.360 --> 00:33:35.119 which will allow me to capture and use the events 610 00:33:35.119 --> 00:33:38.160 triggered by the Location Event 611 00:33:38.160 --> 00:33:39.679 Let's see it in the world 612 00:33:39.679 --> 00:33:42.229 After resetting it, 613 00:33:42.229 --> 00:33:44.999 let's move a little further away 614 00:33:44.999 --> 00:33:47.600 This is how it looks like 615 00:33:47.600 --> 00:33:50.000 At this point, you can customize 616 00:33:50.000 --> 00:33:53.080 how the particles spread and 617 00:33:53.080 --> 00:33:55.119 at what speed they expand outward 618 00:33:55.119 --> 00:33:57.399 The Velocity settings apply here as well 619 00:33:57.399 --> 00:33:59.639 When I say 620 00:33:59.639 --> 00:34:01.800 existing Velocity, 621 00:34:01.800 --> 00:34:03.199 I’m referring to the Velocity of FireSmoke, 622 00:34:03.199 --> 00:34:06.899 I’ll decide whether to inherit and propagate 623 00:34:06.899 --> 00:34:11.212 FireSmoke’s Velocity values 624 00:34:11.212 --> 00:34:14.199 or customize them 625 00:34:14.199 --> 00:34:16.279 In this case, since I’m creating 626 00:34:16.279 --> 00:34:18.959 smoke rather than flames, 627 00:34:18.959 --> 00:34:20.880 I’ll apply a smoke image 628 00:34:20.880 --> 00:34:25.119 to the Sprite Renderer in Material 629 00:34:25.119 --> 00:34:28.600 There are two kinds of Smoke here 630 00:34:28.600 --> 00:34:33.040 Let’s assign the Smoke_SubUV option 631 00:34:33.040 --> 00:34:35.239 Click on it 632 00:34:35.239 --> 00:34:36.440 The colors may look off, 633 00:34:36.440 --> 00:34:39.640 but I’ll fix that later using the Scale Color module 634 00:34:39.640 --> 00:34:42.640 The Smoke_SubUV material, 635 00:34:42.640 --> 00:34:44.760 double click on the material 636 00:34:44.760 --> 00:34:47.880 It is essentially a sequence texture for smoke effects, 637 00:34:47.880 --> 00:34:51.040 containing 64 images 638 00:34:51.040 --> 00:34:54.679 arranged in an 8x8 grid 639 00:34:54.679 --> 00:34:57.160 That's in the smoke effect 640 00:34:57.160 --> 00:35:00.600 It's also called 641 00:35:00.600 --> 00:35:02.100 the sequence texture for the smoke effect 642 00:35:02.100 --> 00:35:05.948 To utilize this sequence properly, go to the Sprite Renderer 643 00:35:05.948 --> 00:35:09.640 I'm working on FireSmoke001 644 00:35:09.640 --> 00:35:12.519 For the SubUV Animation, 645 00:35:12.519 --> 00:35:14.880 I’ll specify the total number of images in the texture grid 646 00:35:14.880 --> 00:35:19.480 First, in the Sprite Renderer under SubUV, 647 00:35:19.480 --> 00:35:22.720 let's input 8 and 8 648 00:35:22.720 --> 00:35:25.040 Now at Update, 649 00:35:25.040 --> 00:35:27.760 to animate these images, 650 00:35:27.760 --> 00:35:31.440 up until the 64th image, 651 00:35:31.440 --> 00:35:35.239 I’ll add the Sub UV Animation module 652 00:35:35.239 --> 00:35:37.480 In the Setup section, 653 00:35:37.480 --> 00:35:42.000 I’ll link this module to 654 00:35:42.000 --> 00:35:44.959 the corresponding Sprite Renderer 655 00:35:44.959 --> 00:35:49.200 Here, let's bring it up a little 656 00:35:49.200 --> 00:35:52.880 Now, I’ll adjust the color and alpha values for Sub UV Animation 657 00:35:52.880 --> 00:35:56.839 Now, let's check with the Scale RGB disabled 658 00:35:56.839 --> 00:35:59.720 So originally, it should be white 659 00:35:59.720 --> 00:36:02.040 But we added red 660 00:36:02.040 --> 00:36:04.600 And we also had a problem 661 00:36:04.600 --> 00:36:06.920 where the alpha value went to -1, 662 00:36:06.920 --> 00:36:08.480 or even -2 663 00:36:08.480 --> 00:36:11.000 So let's keep that 0 664 00:36:11.000 --> 00:36:13.480 Let's change the color values 665 00:36:13.480 --> 00:36:16.920 I’ll start by adjusting the Scale RGB 666 00:36:16.920 --> 00:36:20.160 First, I’ll locate the X, Y, Z values, or Red, Green, Blue 667 00:36:20.160 --> 00:36:21.959 Click the dropdown arrow 668 00:36:21.959 --> 00:36:25.079 and switch it to Vector From Curve 669 00:36:25.079 --> 00:36:27.040 Just to make it easier, 670 00:36:27.040 --> 00:36:31.440 I’ll input 8, 1, 0.2 for 671 00:36:31.440 --> 00:36:33.920 the respective Red, Green, and Blue channels 672 00:36:33.920 --> 00:36:36.959 Next, in the graph editor, 673 00:36:36.959 --> 00:36:41.799 when the state reaches 100%, I’ll adjust the red channel to -1, 674 00:36:41.799 --> 00:36:46.720 so it darkens gradually over time 675 00:36:46.720 --> 00:36:48.920 You can see how the previously vibrant red 676 00:36:48.920 --> 00:36:51.200 transitions into a darker shade 677 00:36:51.200 --> 00:36:52.760 For the alpha channel, 678 00:36:52.760 --> 00:36:55.359 I’ll let it fade naturally 679 00:36:55.359 --> 00:36:58.200 Currently, the particles are too small, 680 00:36:58.200 --> 00:37:01.559 and the smoke effect isn’t very noticeable 681 00:37:01.559 --> 00:37:10.119 To fix this, I’ll add the Scale Sprite Size module under the Update section 682 00:37:10.119 --> 00:37:13.019 I’ll ensure the minimum size remains above 0, 683 00:37:13.019 --> 00:37:16.160 around 0.3 684 00:37:16.160 --> 00:37:19.559 Let's set the Uniform Curve Scale to 10 times 685 00:37:19.559 --> 00:37:20.959 Like this 686 00:37:20.959 --> 00:37:25.399 Currently, we’re emitting an enormous number of particles 687 00:37:25.399 --> 00:37:28.519 If we check the actual number being emitted, 688 00:37:28.519 --> 00:37:31.419 it reaches up to approximately 689 00:37:31.419 --> 00:37:33.399 40,000 particles at its peak 690 00:37:33.399 --> 00:37:35.799 If you want to control this number, 691 00:37:35.799 --> 00:37:37.959 you can turn off the Spawn Burst for now 692 00:37:37.959 --> 00:37:39.679 When I disable it, this happens 693 00:37:39.679 --> 00:37:43.559 n the Event Handler, you can also limit the spawn amount 694 00:37:43.559 --> 00:37:48.059 For instance, you could set it to allow only 100 particles 695 00:37:48.059 --> 00:37:52.160 at maximum per frame, as you decide 696 00:37:52.160 --> 00:37:55.359 For the Spawn Number, setting it to 1 is perfectly fine as well 697 00:37:55.359 --> 00:37:56.399 Let's use 1 698 00:37:56.399 --> 00:38:01.559 Now, when we combine this with the Explosion 699 00:38:01.559 --> 00:38:03.119 and view it in the world, 700 00:38:03.119 --> 00:38:07.679 Press reset, and you’ll see the particles spreading out like this 701 00:38:07.679 --> 00:38:10.229 Let’s compare it to 702 00:38:10.229 --> 00:38:12.880 the previous FireSmoke effect 703 00:38:12.880 --> 00:38:16.320 You’ll notice that in the original FireSmoke, 704 00:38:16.320 --> 00:38:19.970 the small, fine particles scatter subtly, 705 00:38:19.970 --> 00:38:21.720 almost like sparks flying out 706 00:38:21.720 --> 00:38:26.359 When using sub-emitters, the smoke’s range and speed become noticeably different 707 00:38:26.359 --> 00:38:29.909 However, since the sub-emitter inherits 708 00:38:29.909 --> 00:38:31.839 the existing velocity, 709 00:38:31.839 --> 00:38:35.280 you’ll need to reduce the speed slightly compared to before 710 00:38:35.280 --> 00:38:38.359 Setting it to around 200 will make it easier 711 00:38:38.359 --> 00:38:41.960 to match the timing relatively well 712 00:38:41.960 --> 00:38:46.159 For FireSmoke001, let’s reduce the Lifetime 713 00:38:46.159 --> 00:38:50.679 under Initialize Particle to about 0.5 714 00:38:50.679 --> 00:38:53.440 This way, the effect bursts out naturally, 715 00:38:53.440 --> 00:38:57.359 and the smoke spreads smoothly 716 00:38:57.359 --> 00:38:59.159 If you feel that 717 00:38:59.159 --> 00:39:01.859 the Velocity causes the particles to crawl across the ground, 718 00:39:01.859 --> 00:39:03.960 which you may not like, 719 00:39:03.960 --> 00:39:06.400 you can switch the Velocity Mode to In Cone 720 00:39:06.400 --> 00:39:10.359 Later, when you check it in the world, 721 00:39:10.359 --> 00:39:14.119 you’ll notice how the particle effects spread across the ground 722 00:39:14.119 --> 00:39:16.869 Switching it to In Cone 723 00:39:16.869 --> 00:39:19.080 allows you to adjust the values 724 00:39:19.080 --> 00:39:22.359 You can do this, for instance 725 00:39:22.359 --> 00:39:26.039 The Axis of the In Cone is currently set to the X-axis with a value of 1, 726 00:39:26.039 --> 00:39:29.760 but if we change this to the Z-axis with a value of 1, the particles will spread upwards 727 00:39:29.760 --> 00:39:32.559 I’ve exaggerated the values here 728 00:39:32.559 --> 00:39:35.280 to make the difference more visible, 729 00:39:35.280 --> 00:39:37.559 but there’s no need to set it as high as 1800 730 00:39:37.559 --> 00:39:40.959 You can reduce it to a lower value 731 00:39:40.959 --> 00:39:43.840 so that the particles move more subtly 732 00:39:43.840 --> 00:39:47.679 This way, the smoke can naturally ascend 733 00:39:47.679 --> 00:39:50.840 by slightly adjusting the speed values 734 00:39:50.840 --> 00:39:53.119 The same applies to the angle and similar settings 735 00:39:53.119 --> 00:39:57.679 You can adjust everything so that the particles spread naturally from a specific explosion range 736 00:39:57.679 --> 00:40:02.200 Next, looking at the color transitions of the flames, 737 00:40:02.200 --> 00:40:04.400 you’ll see that over time, 738 00:40:04.400 --> 00:40:07.640 the red color transitions to black 739 00:40:07.640 --> 00:40:11.960 tarting as red, the color shifts 740 00:40:11.960 --> 00:40:14.919 to black as it moves outward 741 00:40:14.919 --> 00:40:17.719 This transition happens progressively 742 00:40:17.719 --> 00:40:22.379 This helps alleviate the monotony of the effect, 743 00:40:22.379 --> 00:40:25.479 and you can achieve this using sub-emitters 744 00:40:25.479 --> 00:40:30.239 Utilizing sub-emitters like this is an excellent way 745 00:40:30.239 --> 00:40:34.679 to make your particle effects feel richer 746 00:40:34.679 --> 00:40:37.159 Now, for the FireSmoke, 747 00:40:37.159 --> 00:40:41.479 there’s no real need to show those round, red particles 748 00:40:41.479 --> 00:40:44.579 In the Scale Color settings, I’ll reset the Alpha value 749 00:40:44.579 --> 00:40:46.679 Instead of using a curve for the Alpha, 750 00:40:46.679 --> 00:40:49.960 I’ll reset it and set the Scale Alpha 751 00:40:49.960 --> 00:40:51.560 So it's not Float From Curve 752 00:40:51.560 --> 00:40:55.280 Even with 0 for Scale Alpha, 753 00:40:55.280 --> 00:40:59.359 the sub-emitter, like FireSmoke001, 754 00:40:59.359 --> 00:41:01.520 will remain unaffected 755 00:41:01.520 --> 00:41:03.080 The FireSmoke becomes invisible 756 00:41:03.080 --> 00:41:05.559 and gradually sends signals as it moves along 757 00:41:05.559 --> 00:41:09.479 In response to these signals, 758 00:41:09.479 --> 00:41:12.279 FireSmoke001, 759 00:41:12.279 --> 00:41:14.719 which operates as a sub-emitter, 760 00:41:14.719 --> 00:41:18.159 activates and continuously disperses smoke 761 00:41:18.159 --> 00:41:22.315 Even now, the number of particles being emitted is relatively high, 762 00:41:22.335 --> 00:41:25.479 with around 1,500 particles being generated 763 00:41:25.479 --> 00:41:30.080 When creating particles, it can be challenging 764 00:41:30.080 --> 00:41:33.599 to synchronize the timing of the sphere’s expansion, 765 00:41:33.599 --> 00:41:36.400 the particles’ disappearance, and the timing of particle generation 766 00:41:36.400 --> 00:41:39.520 However, by using the Event function, 767 00:41:39.520 --> 00:41:42.119 you can align these elements with more precision 768 00:41:42.119 --> 00:41:45.640 If you feel the frequency of the events is too high, 769 00:41:45.640 --> 00:41:49.840 you can reduce the event trigger cycle to about 15 770 00:41:49.840 --> 00:41:54.359 Or even 1, and see what happens 771 00:41:54.359 --> 00:41:55.479 This is an unnatural sequence 772 00:41:55.479 --> 00:41:58.520 I'm just demonstrating for the purpose of it 773 00:41:58.520 --> 00:42:04.479 So I will set this to 20 774 00:42:04.479 --> 00:42:06.960 So see, dun, dun, dun, like that 775 00:42:06.960 --> 00:42:11.520 That feels like it’s burning the edges while progressing 776 00:42:11.520 --> 00:42:14.039 That's what I made right there 777 00:42:14.039 --> 00:42:16.489 Additionally, 778 00:42:16.489 --> 00:42:18.880 if you’d like to try another effect, 779 00:42:18.880 --> 00:42:21.039 you can right-click and select Add Emitter, 780 00:42:21.039 --> 00:42:25.689 then choose the Omnidirectional Burst template 781 00:42:25.689 --> 00:42:28.200 Let's add this emitter here 782 00:42:28.200 --> 00:42:31.200 When isolating it with the right-click, 783 00:42:31.200 --> 00:42:34.239 you’ll see it creates an explosion effect, like a sudden burst 784 00:42:34.239 --> 00:42:36.039 For this, I’ll set the Velocity value 785 00:42:36.039 --> 00:42:39.919 to a higher range, such as 600–1,200, 786 00:42:39.919 --> 00:42:42.000 so the particles spread farther 787 00:42:42.000 --> 00:42:45.559 We’ll adjust this further when combining it with the actual emitter later 788 00:42:45.559 --> 00:42:48.659 For the Origin Offset, 789 00:42:48.659 --> 00:42:52.440 I’ll leave the default setting of 0 for the Omnidirectional Burst, 790 00:42:52.440 --> 00:42:53.960 without shifting it negatively or downwards 791 00:42:53.960 --> 00:42:57.280 There's no need to make it a minus value 792 00:42:57.280 --> 00:42:59.039 Next, for the Scale Color value, 793 00:42:59.039 --> 00:43:05.400 I’ll set the Scale RGB to 8, 1, 0.2, 794 00:43:05.400 --> 00:43:09.520 creating the appearance of small sparks scattering outwards 795 00:43:09.520 --> 00:43:12.488 Now, let’s add a Collision feature 796 00:43:12.488 --> 00:43:13.941 to this here 797 00:43:13.941 --> 00:43:14.860 Collision 798 00:43:14.860 --> 00:43:17.159 With this feature, 799 00:43:17.159 --> 00:43:20.080 some of the particles, though not all, 800 00:43:20.080 --> 00:43:24.119 will gain collision properties 801 00:43:24.119 --> 00:43:26.599 Resetting this and testing it in the world, 802 00:43:26.599 --> 00:43:29.960 you can see particles bouncing off the ground upon impact, 803 00:43:29.960 --> 00:43:34.400 adding a touch of realism 804 00:43:34.400 --> 00:43:37.393 After testing the isolated mode, 805 00:43:37.393 --> 00:43:40.200 I’ll uncheck the isolated setting 806 00:43:40.200 --> 00:43:42.200 It seems the Velocity needs to be increased 807 00:43:42.200 --> 00:43:46.280 to around 1,200–1,600 808 00:43:46.280 --> 00:43:47.840 Resetting and triggering the effect again, 809 00:43:47.840 --> 00:43:51.280 you’ll see a large explosion effect 810 00:43:51.280 --> 00:43:53.200 accompanied by massive flames, 811 00:43:53.200 --> 00:43:56.960 sparks, smoke, and so on 812 00:43:56.960 --> 00:44:00.119 That's how I made the effect 813 00:44:00.119 --> 00:44:02.840 You can fine-tune settings like Lifetime 814 00:44:02.840 --> 00:44:05.280 and others to achieve 815 00:44:05.280 --> 00:44:08.520 a smoother and more natural result 816 00:44:08.520 --> 00:44:12.679 In this session, make sure to remember 817 00:44:12.679 --> 00:44:14.387 the concept of sub-emitters 818 00:44:17.159 --> 00:44:20.520 In today’s session of the explosion event, 819 00:44:20.520 --> 00:44:25.359 we explored various methods to control speed 820 00:44:25.359 --> 00:44:28.479 We also used shader movements 821 00:44:28.479 --> 00:44:32.119 to control the motion of meshes 822 00:44:32.119 --> 00:44:37.200 By utilizing mesh particles, we created effects like shockwaves and smoke, 823 00:44:37.200 --> 00:44:41.159 visualizing concepts that are typically difficult 824 00:44:41.159 --> 00:44:45.760 to perceive as having volume 825 00:44:45.760 --> 00:44:48.510 Let’s wrap up by summarizing 826 00:44:48.510 --> 00:44:50.200 what we’ve learned in this session 827 00:44:50.200 --> 00:44:51.035 Thank you 828 00:44:52.067 --> 00:44:52.867 Explosion Radius and Explosion Effects Create a Niagara asset using the SingleLoopingParticle template and deactivate the SpriteRenderer 829 00:44:52.867 --> 00:44:53.717 Add MeshRenderer: Change the StaticMesh Index [0] to Sphere Emitter State 830 00:44:53.717 --> 00:44:54.517 Life Cycle Mode: Self, Loop Behavior: Once, Loop Duration Mode: Fixed, Loop Duration: 1.0 831 00:44:54.517 --> 00:44:55.217 Initialize Particle LSprite Size Mode : Unset, Lifetime : Reset (1.0), Mesh Scale Mode : Uniform, 1.0 832 00:44:55.217 --> 00:44:56.117 Scale Mesh Size Add to Particle update에, Scale Factor : Vector From Curve 833 00:44:56.117 --> 00:44:56.998 Vector Curve (x : 0, y : 0), (x : 1, y : 1) Scale Curve : Vector from Float, Value 10 834 00:44:56.998 --> 00:44:57.748 Create M_ExplosionFX Blend Mode: Translucent, Shading Model: Unlit Create Lerp, Lerp A: 835 00:44:57.748 --> 00:44:58.489 VectorParameter (FireColor, 8, 1, 0.2), Lerp B: Constant3Vector (0, 0, 0), Lerp Alpha: Fresnel, 836 00:44:58.489 --> 00:44:59.220 Lerp Output: Emissive Texture Sample: T_Perlin_Noise_M Create Panner: Speed X: 1, Y: 1 / Texture Sample 837 00:44:59.220 --> 00:44:59.871 Connect to Node UV Create Multiply, A: Texture Sample, B: 1, Connect result to Fresnel: ExponentIn에 Multiply Texture Sample: 838 00:44:59.871 --> 00:45:00.563 T_Detail_Rocky_N Connect Panner to Texture Sample Node UV Create Multiply, A: Texture Sample, B: 10, Output: 839 00:45:00.563 --> 00:45:01.083 World Position Offset Create Multiply, A: Fresnel, B: 2, Output: Lerp Alpha 840 00:45:01.083 --> 00:45:01.667 Create Dynamic Parameter: R(FresnelPower, 1.2), G(WorldOffsetVal, 5), B(Noise, 2), A(Speed, 0.5) 841 00:45:01.667 --> 00:45:02.417 Integrate Niagara: Activate Enable Material Override in MeshRenderer 842 00:45:02.417 --> 00:45:03.117 Add Override Materials: Set Index [0] to M_ExplosionFX 843 00:45:03.117 --> 00:45:03.867 Dynamic Material Parameter Module 844 00:45:03.867 --> 00:45:04.593 R(FresnelPower, 1.2), G(WorldOffsetVal, 10), B(Noise, 2), A(Speed, 0.5) 845 00:45:04.593 --> 00:45:05.443 Particle Color Integration Blend Mode: Masked Connect Particle Color Node to Lerp A 846 00:45:05.443 --> 00:45:06.143 Lerp A: Add result of Fresnel and Multiply Connect to Opacity Mask Scale Color Module:R: 8, G: 1, B: 0.2 847 00:45:06.143 --> 00:45:06.887 Scale Alpha: Float from Curve (0 : 1, 1 : -2) 848 00:45:06.887 --> 00:45:07.687 Creating Smoke and Spark Effects FireSmoke Duplicate SingleLoopingParticle and rename it FireSmoke 849 00:45:07.687 --> 00:45:08.587 Spawn Burst: 50, Sprite Size Mode: Uniform/10, Mesh Attributes: Unset 850 00:45:08.587 --> 00:45:09.437 Add ShapeLocation Module Shape Primitive: Torus, Large Radius: 200, Handle Radius: 25 851 00:45:09.437 --> 00:45:10.237 Add Velocity Velocity Mode: From Point, Velocity Speed: 600 852 00:45:10.237 --> 00:45:11.087 Emitter Properties: Activate Requires Persistent ID 853 00:45:11.087 --> 00:45:11.976 Add Generate Location Event 854 00:45:11.976 --> 00:45:12.476 Add Sub FireSmoke by duplicating FireSmoke Add Event Handler to the Stage Deactivate Spawn Burst 855 00:45:12.476 --> 00:45:12.976 Event Handler Properties의 Spawn Number: 10 Add Receive Location Event 856 00:45:12.976 --> 00:45:13.476 SpriteRenderer Material: M_Smoke_subUV, SubUV: (8, 8) Add Sub UV Animation 857 00:45:13.476 --> 00:45:13.976 Add SpriteRenderer 858 00:45:13.976 --> 00:45:14.476 ScaleColor's Scale RGB: (0 : 1) / (1 : -1), Scale Curve: (8, 1, 0.2), Scale Alpha: (0 : 1) / (1 : 0) 859 00:45:14.476 --> 00:45:14.976 Scale Sprite Size Mode: Uniform, Uniform Curve Sprite Scale: (0 : 0.3) / (1 : 1), 860 00:45:14.976 --> 00:45:15.476 Uniform Curve Scale: 10 Spark (OmnidirectionBurst) 861 00:45:15.476 --> 00:45:15.976 Velocity Speed of Add Velocity: Min 1200 / Max 1600, Origin Offset: (0, 0, 0) 862 00:45:15.976 --> 00:45:16.866 Add Collision Module