Gasoline

Thor.eli.02@gmail.com

Gasoline Pouring System

This project recreates a gasoline pouring mechanic inspired by Grand Theft Auto V, where the player can pour fuel onto the ground and ignite it to create spreading fire.

The goal of this system was to simulate the full interaction pipeline in real time, including:

  • Dynamic fuel pouring
  • Surface accumulation of gasoline
  • Fluid splash effects
  • Fire propagation across spilled fuel

The system was built inside Unreal Engine 5 using Niagara, Blueprint scripting, and simulation generated in Houdini.

Gasoline Material


The gasoline surface material was designed to simulate the appearance of fuel spreading across a surface.

To achieve this effect, several techniques were used:

Fresnel and Depth Fade
These nodes control the opacity of the gasoline. The liquid appears thinner and more transparent at the edges while becoming darker and more opaque where the fuel gathers.

Panning Normal Map
A panning normal map adds movement to the surface, giving the impression that the gasoline is slowly flowing or shifting across.


Particals


The flowing gasoline stream is created using a Niagara particle systemin Unreal Engine 5.

Instead of using sprite particles, this system uses a ribbon renderer, which connects emitted particles together to form a continuous strip.

The emission rate of the particles is controlled dynamically in Blueprint. By adjusting how many particles are spawned, the system can simulate different pouring intensities depending on the container’s movement.

Particle system overview

Splash Effect


Initially, I attempted to create the splash effect entirely with Niagara mesh particles using erosion-based shaders. However, the result felt visually weak and lacked the fluid motion I was aiming for.

Instead, I simulated the splash behavior in Houdiniand exported the result as a Vertex Animation Texture (VAT).

Inside Unreal Engine 5, this texture drives the deformation of a mesh to recreate the simulated fluid motion in real time.

Using VAT allowed me to maintain the complexity of the simulation while keeping the runtime performance efficient.

Houdinin Simulation

Vat Texture

Dynamic Pour


The pouring behavior is controlled through Blueprint scripting.

To determine how much gasoline should be emitted, the system calculates the tilt of the container using its up vector and a dot product.

This value is then remapped into an emission intensity value that controls how much gasoline is poured.

The resulting value is sent to the Niagara system as a user parameter, which dynamically adjusts:

  • particle emission rate
  • ribbon length
  • overall flow intensity

This makes the pouring system responsive to the player’s movement.

Gasoline Decales


When gasoline hits the ground, it creates decal instances representing the spilled fuel.

Each decal includes a collision trigger that can activate a fire particle effect.

When a decal is ignited:

  1. It spawns a fire particle system.
  2. It checks for nearby gasoline decals that have not yet been activated.
  3. Any neighboring decals are triggered sequentially.

This creates a chain reaction effect, where the fire spreads naturally across the spilled gasoline.


If I Had More Time


If I were to expand this system further, I would replace the decal-based gasoline accumulation with a render target solution.

Instead of spawning multiple decals, gasoline would be written to a render texture that tracks where fuel has accumulated.

The material would then read this texture to dynamically update the gasoline surface, allowing the liquid to gradually expand and spread as more fuel is poured.

This approach would likely improve performance while allowing for more continuous and organic fuel buildup.

Email usCall now