THRTask283 Materials Glowing and pulsing

7 months ago
5

1. **Material Creation:**

- In the Content Browser, right-click an empty space.
- Select **Material**.
- Name it something descriptive, e.g., "GlowingMaterial".
- Double-click the material to open the Material Editor.

2. **Setting Up the Pulsating Glow:**

- Start by adding a `Time` node to get a continuously changing value.
- To create a pulsating effect, drag out from the `Time` node and add a `Sine` node.
- Add a `Multiply` node after the `Sine` node to control the range of the sine wave (this will allow you to control the intensity of the glow). Connect a `Constant` node to the other input of the `Multiply` node. This `Constant` node will dictate the maximum intensity of the glow. A value of 10, for instance, would be quite bright.

3. **Creating a Mask for the Glow Size:**

- If you want a simple circular glow, use a `RadialGradientExponential` node. This node generates a circular gradient pattern.
- If you want to control the size of the glow, add a `Multiply` node after the `RadialGradientExponential` node. Connect another `Constant` node to this multiply to control the size of the glow. A value of 2 might be a good start.

4. **Combining the Glow and the Mask:**

- Multiply your pulsating glow (from the `Sine` and `Multiply` combination) with your mask (the `RadialGradientExponential` and its size modifier).
- Add another `Multiply` node, connect the first input to the output of the pulsating glow and the second input to the mask.

5. **Applying to Emissive Color:**

- Finally, connect the result of the multiplication to the `Emissive Color` input of the Material Result node.

6. **Save and Apply the Material:**

- Click on the **Save** button in the top left corner of the Material Editor.
- Close the Material Editor.
- Drag and drop the material from the Content Browser onto any mesh in your level/scene.

Now you should have a material that emits a glow of varying sizes. The size and rate of pulsation can be adjusted by tweaking the values of the `Constant` nodes and the multiplication nodes. If you need more specific patterns or controls, the UE5 Material Editor offers a vast array of nodes and combinations to achieve the desired effect.

Of course, if you want your glowing effect to have color, you would multiply the pattern (as we built in the previous steps) by a color value.

Let's add the color to our pulsating glow:

1. **Add a Color:**

- In the Material Editor, drag and drop a `Constant3Vector` node onto the canvas. This node will represent your color.
- Click on the `Constant3Vector` node. In the details panel, you'll see a color box. Click on this to open the color picker. Choose the color you want for your glow.

2. **Multiply the Color with the Glow Pattern:**

- Drag a pin from the output of your glow pattern (the result of the multiplication between the pulsating value and the mask).
- While dragging, release and type "Multiply" to add a `Multiply` node.
- Connect the output of your `Constant3Vector` (your chosen color) to the second input of this new `Multiply` node.

3. **Connect to Emissive Color:**

- Connect the result of this multiplication (which is now your pulsating glow pattern colored by your chosen color) to the `Emissive Color` input of the main Material node.

4. **Save and Apply:**

- Click on the **Save** button in the top left corner of the Material Editor.
- Close the Material Editor.
- Drag and drop the material from the Content Browser onto any mesh in your level/scene.

Now, the glow should not only pulsate and vary in size but should also emit in the color you've chosen.

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Loading comments...