Rookie Awards 2024 - Open for Entries!
Alive liquid in UE 5
Share

Alive liquid in UE 5

Mattia Ceron
by Emkei on 23 Apr 2024

I've created a liquid that is displacing along a static mesh Unreal Engine using Houdini and VAT technic.

0 30 0
Round of applause for our sponsors

To create this effect, I mainly used Houdini 20 and then implemented it in Unreal Engine 5.3.

The effect consists of a liquid moving over the surface of a rock, I decided to reproduce a petroleum-like liquid, as when thinking of a liquid that moves with a life of its own, "Ferngully" came to mind, an animated film from the 90s where the antagonist was petroleum.

I must have connected it immediately because the movements themselves are a mixture of viscosity that allows the mass to advance by pulling forward.

Initially, I worked on a first version of the simulation where the liquid behaved in this way.

However, despite its promise, considering the available time and the difficulties in optimizing such a setup for real-time, I preferred to approach the simulation by simulating an attractive orbit, a small and simplified version of how the moon and the movement of the earth move the seas. Therefore, I set up collision geometry with an attraction at the center and two other cores rotating around the small "planet", one more external (the moon) with attraction force and another internal to the "planet" with a bit of repulsive force to facilitate the movement of the liquid.

With this version, I have the freedom to play with these forces to model the movements of the liquid as if it had a life of its own.

For the implementation in Unreal, I used the SideFX Labs pipeline for the Vertex Animation technique, resulting in a Niagara System. 

I decided to use a simulation on a 120-frame loop while maintaining 24 fps to have a mesh that is detailed but not too heavy.

The Niagara System in question has two emitters, one for the VAT simulation and another for the "planet" rock.

Outside the system, I applied parameters that can control the animation time, animation speed, and the global scale of the effect.

Within the VAT materials, parameters can be found to have complete control over the final shader, the same applies to the rock although it is limited to a tint parameter and the channel for the Wetmap. 

Within the material function for VAT, I modified the playback option, so in addition to the standard controls (autoplay & display frame), there is now a switch so that the animation can be controlled directly within the Niagara System via a Dynamic Parameter.

In the official guide for the VAT technique, two adjustments are mentioned for motion blur and normal map, but I didn't have much time to investigate, as it doesn't seem to work perfectly in every liquid simulation, as the topology usually changes in each frame.

I think this effect is quite versatile, and VAT is a good technique for simulations optimized for real-time.

In fact, despite not using a significant polygon reduction and despite the total number of frames in the level, the performance is good.

Regarding the production times, without considering simulation and cache times, I dedicated 10% to searching for references and planning the effect, 50% was spent setting up Houdini, including testing, wetmap setup, and composing the necessary textures. The remaining 40% of the time was used to implement the effect in Unreal Engine, debug various issues of the VAT technique, create materials, and the Niagara system.


Comments (0)

This project doesn't have any comments yet.