In this section, you will learn how to make a firework material with an emissive effect. The special material makes the sprites appear like tiny lights.
Once the material is ready, you’ll create the emitter that houses all the modules that make up the firework.
Create the Firework Material
To create this effect, you must first create a custom material to base your fireworks from.
Find a flashlight beam image where the beam is focused in a circle. Save this as a .jpg file and import it into UEFN.
Example of a flashlight beam.
Now you’re ready to create the material.
Create a folder in the Content Browser called Materials, then double-click the folder to open it.
Right-click inside the Content Browser and select Material from the dropdown menu.
Name the material Firework.
Double-click the material thumbnail to open the Material Editor.
Right-click inside the Material Editor and search for the following nodes:
Texture Sample node
Particle Color node
2 X Multiply node
Select the Texture Sample node and add the flashlight material to Texture in the Details panel.
Drag off the RGB output pin on the Texture Sample node and plug into the B input on the first Multiply node.
Drag off the RGBA output pin on the Texture Sample node and plug into the B input on the second Multiply node.
Drag off the RGB output pin on the Particle Color node and plug into the A input on the first Multiply node.
Drag off the RGBA output pin on the Particle Color node and plug into the A input on the second Multiply node.
Select the Main Material Node in the Details panel and change the Blend Mode setting to Additive, then set Shading Model to Unlit.
Drag off the first Multiply node and plug into the Emissive Color input on the Main Material Node.
Drag off the second multiply node and plug into the Opacity input in the Main Material Node.
Click Apply > Save to save the material.
Build the Effect
Create your own emitter modules for all parts of the firework: the head, the trail, and the explosion. You’ll start by creating the Niagara system, then add additional emitters in the System Editor to create the full effect.
Create a folder in the Content Browser called Fireworks.
Double-click the Fireworks folder, then right-click in the Content Browser of the Fireworks folder and select Niagara System from the dropdown menu.
Select New system from selected emitter(s) then Next. The emitter template dropdown menu opens.
Select Empty from the menu. then click Plus, then Finish.
Rename the asset to Fireworks.
Double-click the effect thumbnail. The System Editor opens containing the Empty emitter template.
Click image to enlarge.
Right-click the empty emitter, then select Rename from the dropdown menu. Rename the empty emitter Head. This will help you to distinguish the different parts of the firework.
Now you’re ready to add modules to the first emitter to create the head of the firework.