David Gao talked about the structure and setup of his fantastic Fire Lightning Spell Effect created in Unreal Engine.
In case you missed it
You might find these articles interesting
Introduction
Hello, 80 Level! My name is David Gao, and I am a VFX artist from San Francisco, California. I got my undergraduate degree in Design Media Arts at UCLA, and a certificate in FX from Lost Boys School of VFX. Currently, I am working in Montreal at Moment Factory as an FX Artist, using Houdini and UE as my main tools.
Experimenting with FX in Unreal
I have mostly used Houdini for most of my career and personal work for the past 2 years. Though I have dabbled in UE and Unity in the past, I was first formally introduced to game engines while working on a real-time destruction scene while working at Moment Factory. I utilized Niagara to create secondary effects such as smoke and dust particles from breaking points using the Houdini-Niagara plugin. Since then, I have delved much deeper into Niagara and it has now become one of my main tools. Niagara is growing and changing so rapidly, which makes it both an exciting and intimidating tool to learn. I love the interactivity and instant feedback and I found that it makes creating VFX much more playful and experimental. Though I am fairly new at creating FX in Unreal, I found that so many aspects transfer over from creating FX for linear media, and I hope to share some useful tips and tricks in this breakdown!
Fire Lightning Spell: Setting Up the Effect
To set up an effect, my process is usually divided into three parts:
- Divide the effect into components and decide which is the best way to create them (with Houdini, Niagara, Photoshop or After Effects, etc.)
- Create the components and compile them in UE
- Add interactivity and customizability using user parameters and blueprints
Lightning
The components of the lightning effect are:
- Lightning
- Burst of smoke on impact
- Burst of embers on impact
- Glowing hit mark on impact
- Debris on impact
To create the base lightning effect, I first followed CGHOW’s tutorial on the “beam emitter”. Some things I added to enhance this effect from the tutorial are adding variation to the beam width and color variation along the length of the beam.
After creating this emitter, I set up a vector user parameter “beam end” that would be the end of the beam, and also the origin of the sparks, smoke, and debris. The next three components are all created from the template omnidirectional emitters. The sparks are a simple burst of GPU particles that use the default sprite material. The smoke used here is just a 4x4 sprite sheet of a smoke simulation. One useful tip I have is that you can add a dynamic material parameter with the particle life and pipe this into a noise in the material that is added to the UV’s. This way, we have a smoke sprite that is warping as it ages, faking the look of an animated smoke sprite.
The debris is using a mesh renderer with a rock mesh that is rotating in random directions. To rotate a mesh in the “particle update”, you will need to use the “update mesh orientation” module. I added a collider module to the debris so that it hits the ground.
I added a float user parameter named “delay” and piped this into the delay of each emitter so that they are all in sync. Since the behavior of lightning is so quick, and the impact is instantaneous, they could all be the same. User parameters are variables that you create under the “system settings”. The default values are also set in the system settings. These values can also now be modified on every instance of the system you place in the scene.
Flamethrower
The components of the stylized flamethrower effect are:
- Flames
- Flame spiral
- Heat distortion
The flames were created with sprites that have a material opacity masked with a tiling noise. Using dynamic material parameters, I plugged particle life into a panning node in the opacity mask of the material, giving it the motion of flames. I also scaled the color of the particle by the particle life, making it turn from pink to orange. The spiral geometry was created in Houdini and is just a sweep on a spline. In Niagara, I used a mesh renderer to spawn this spiral and rotated/scaled it by its life. The heat distortion material is taken from the Content Examples (search heat distortion material) and applied to a sprite emitter. I added a light renderer to this emitter so the ground would be lit up as a flame would. Lastly, I added additional simple particle sprites to add some detail to the flamethrower.
Shield
I broke the energy shield down into these components:
- Shield energy
- Particles flying off the shield
- Floating crystals
The shield energy component is created by a mesh renderer spawning semi-circle geometry. In the material of the shield, I panned a tiling noise texture. I created four variations of this emitter, each one having a different color, intensity, speed of texture panning, etc. One of them was more ambient, and others were more aggressive and a higher speed panning texture. The particles flying off the shield give the appearance that the shield is being attacked and broken up by the fire/lightning spell. I used GPU particles spawning on a sphere location with “hemisphere” checked so that it matches the shield itself. Lastly, I wanted to add little glowing crystals that rise up from the ground, dematerialize, and fly towards the caster, as if they were healing or charging him. To do this, I used a mesh and light renderer on the crystal particle, so it would light up the ground as it emerges. I also added a location event module to this, so that I could spawn additional sprite particles from their location. These sprite particles have an attractor module that draws them to the caster.
Lightning Storm Effect
My fire/lightning attack was actually created from this lightning storm effect. It is essentially the same lightning emitter, with random values being added to the end location of the beam in the level blueprint. The hitmark tool is a fairly simple one that includes some rigid body destruction and a basic TOPs wedging system. For those who are new to Houdini, TOPs are Houdini’s way of creating a list of tasks to be executed in specific orders. It truly shines in creating assets for games, whether we need to generate a thousand variations of geometry, or creating mosaics of sprites for
For this hit-mark setup, we need to:
- Pre-shatter a cube
- Simulate an impact on the cube
- Render one frame from the top view
- Repeat this process 9 times and composite the result in a 3x3 grid
With a very simple wedge setup in TOPs, I am able to execute all of this in the correct order without having to start each task manually.
Polishing the Final Look
To finalize the look, I simply added a post-process volume with some bloom and lens flare. These effects will really help the emissive elements look a lot richer. I added a couple of ancient column assets from Megascans to just help the composition and give some context to the scene. I also chose a slightly reflective ground surface so it would highlight the emissive elements better.
Resources and Advice for Learning
For resources, I highly recommend CGHOW’s channel on youtube and the official Niagara videos on the UE channel. SideFX also has amazing content on their channel pertaining to Houdini and UE interaction.
I recommend trying to utilize dynamic material parameters as much as possible, rather than setting parameters in the material so you don’t have to always re-compile the material. It will also be helpful to use user parameters in your variables within your emitter to keep everything in sync and be able to modify them on the editor. You can also add additional variation and customizability by modifying the user parameters in the level blueprint.
Coming from a Houdini VFX background, I originally thought that I would need to make many compromises in terms of fidelity and quality in FX. While in many cases this is true, there are so many tricks you can do to make things look just as good as rendered FX. While we can’t create a complex pyro effect with multiple explosions, we can make something quite similar with just a single sprite sheet of an explosion by giving them variations in size, speed, rotation, etc. It doesn’t even need to be an animated sprite. If it was just a still of a pyro volume, we can distort the texture in the material with a noise driven by particle life. Often when I try to create an effect in Niagara, I fall for the trap of trying to make it as I would in Houdini, trying to go for the most expensive way to get the highest quality output. But instead, try to discover an unconventional cheaper method. Is there a way this look can be “faked” for a lower cost result? For example, fluid water simulations are known as some of the most expensive simulations in VFX. If I’m trying to recreate a huge wave splash, instead of actually simulating this wave for hours in some flip simulation, I would think to myself, what does a wave look like? A sheet of water, or a plane with a noise. And with just that, we can do so many things: pan the noise, distort it, erode it, etc.
Lastly, don’t be afraid to ask for advice and feedback from the community. Share your work, take words of advice from those people who are genuinely interested in giving it. Thanks for reading!
Links
David Gao, VFX Artist
Interview conducted by Arti Sergeev
Keep reading
Read our previous interviews with David