Rookie Awards 2024 - Open for Entries!
Magic Spikes (Reworked) - UE4 VFX
Share

Magic Spikes (Reworked) - UE4 VFX

Thomas Hutchinson
by toasttee on 6 Aug 2020

In Janurary I created my first ever realtime effect and submitted it to the Search For A Star competition (VFX category), for the past month I've decided to use my quarantine time to rework my submission to see how much I've improved so far this year.

2 1830 0
Round of applause for our sponsors

Ice Spikes Generation

When generating the spikes, I started with two base meshes and then created the rest of the geometry by making copies and altering them slightly to make them look more unique.

One problem I experienced initially was that although I had made some differentiation through random scaling, my spikes still looked very similar to eachother. To improve this, I eroded the edges of some of the spikes using a combination of VDB and noise which helped to roughen up the sides - leading to a slightly more natural appearance.

Melting Simulation

Possibly the most time consuming part of the project - this required a lot of experimentation until I found a method that worked out.

Originally, my idea was that the spikes would explode into pieces once they ran out of magic, then they'd melt away. However, in practise, I found that the timing didn't work very well and I had to scrap the whole idea - although it was annoying to do, the second method resulted in a much better effect overall.

One major problem with my original effect was that the dissolve I had was a vertical top down dissolve, this was an issue because you could see the insides of the geometry which completely broke the effect and felt very unnatural. As a result, this was a key point that I wanted to focus on improving in the rework. One idea that the judge suggested was that the effect may look better by sinking the ice into the ground and introducing some water FX - this was the method I ended up using for the completed version.

For the particle emitters I decided to seperate each ice spike into its own network, then I used a boolean to isolate the bottom part of each spike. Using this method, I can ensure that the fluid would be emitted from the bottom and the emission would stop once the spike has fully "melted" into the ground as there would be no geometry to emit from.

For the particle simulation, I alternated between POP and Flip fluids. I originally used POP as they're usually better for more art-directable effects. However, a major issue I had with it was that once the fluid would begin the settle - the fluid would drag itself back in like jelly instead of continuing to spead outwards like water. In the end, I decided to go with Flip fluids which ended up giving me a more natural behavior, though I did end up spending more time tweaking the behaviour till I got something nice.

Probably the biggest issue I encountered after creating the particle simulation was dealing with the meshing. This is because my usual method was to just use the default "particle fluid surface" node, combined with an adaptive remesh to flatten it out. However, I kept getting flickering around the edges where the fluid would constantly merge and split apart again - this created a very unnatural effect and was something I had to solve before rendering it out.

To solve this, I ended up switching from "Particle Fluid Surface" to generating a vdb from particles, running it through a vdb smooth to take out the hard edges and converting it back to polygons. However, this didn't completely fix it - so to finish I increased the reseeding value around the edges. These two methods combined reduced the flickering down to a minimum, although a drawback was that I ended up losing some of the detail of the original simulation - but it was fine for my use case so I didn't make any further changes.



Wetmap Flipbook

I had to do a couple of attempts with the wetmap to get it right. My first attempt was with the node network on the left which created a mask though using an attribute transfer node and animating the blend width. However, the problems I had with this method was that the resulting mask inside Unreal Engine didn't look very good and because I didn't have a solver, the position of the liquid wasn't saved every frame. As a result, the mask would disappear if the liquid mesh moved away to a different area.

My second attempt involved using a solver to save the previous positions of the liquid mesh and I animated the distance threshold instead of blend width which produced a much better result.

Frost Flipbook

Similar to the Wetmap, this flipbook was relatively simple to generate. I started by using a boolean on the Ice Spikes so that I only had the bottom part of the geometry to work with (this made it much easier to work with the attribute transfer node).

Initially I didn't have the "Remove Edges" section, however I found that the result was far too sharp within UE4 and didn't create a believable frost appearance. To solve this, I isolated removed every point that wasn't white so I was left with only the frost shape. Then I extruded from the edges and applied a black colour to the points. By transferring the colour from the edges to the main shape, I was able to fade off the edges. Because it was done procedurally, this is applied to every other frame in the flipbook.

UE4 Materials

The frost material was based mainly on the flipbooks I had generated within Houdini with the addition of the scanning animation. This was used to exaggerate the ice spikes as they erupt out of the ground - though it may be hard to notice at first.

One thing that I had to take into account using this method was making sure that the camera position was the same for both of the flipbooks. This way the textures align properly within UE4 and the wetmap can gradually eat away at the frost.

The main part of the spikes shader was based on the paragon breakdown by Jordan Hey on Artstation. However, I added my own texture created within Substance Designer as well as the upwards gradient for the mesh. This was a similar technique used in my "Earth Wall" project - the idea is that it's meant to show that the ice is being powered by magic. As a result, once the magic fades away, the spikes very quickly break down and melts into a puddle.



Comments (0)

This project doesn't have any comments yet.