top of page

ROACHES VFX

ROLE

VFX Artist

DESCRIPTION

A Cockroach behaver system that is reactive to torch light and the approaching character. This was designed for use in a horror game.

YEAR

2024

GENRE

Creepy / Horror

PLATFORM

Unreal Engine 5

VFX BREAKDOWN

ROACH PLAYER AVOIDANCE

When the player approaches the bugs, they flee away. This is to simulate the behaviour of the Cockroach. They avoid the player, but don't flee too fast, moving at a relative pace.

ROACH LIGHT AVOIDANCE

The torch light also causes the Cockroaches to flee from the area, this represents the natural reaction to sudden light. Roaches tend to avoid bright light, preferring to stay in darker areas.

PARTICLE DRIVEN LEG ANIMATION

When the Cockroach moves the legs begin to move, and the legs stop when it stops moving. It is rather basic, but is perfect for the low light environment that these bugs were made for.

SHADERS, PARTICLES & CODE

ROACH LEG MATERIAL

To give the illusion of walking I gave the Cockroach 12 legs and arranged the UVs of the legs so that the left first and the right second, the left fourth and the right, first, the left third and the right fifth etc. were laid in this order top to bottom of a UV tile.  This was important for creating the illusion of motion. Isolating several legs at at time and masking the others, then driving a Panner on the Y axis gave the illusion of motion. To ensure that the legs only moved when needed, used the particle speed to drive the speed of the Panner.  

RoachLegMat.jpg

ROACH BEHAVIOUR NIAGARA

To setup the roach behaviour I created a bounds in which they initially stay within by changing direction to head to the centre if they get too close to their outer bounds, this was then shaken up by adding a curl noise force to make this movement back and forth random. The torch avoidance required several parameters to be fed into the avoid cone from the light itself, this data was then used to tell the particles where to avoid. Player avoidance, fed in the players current location and an attractor was set to move the particles that were close towards the players position, I then set the force of the attraction to a negative number, thus repelling them.

RoachesNiagara.jpg

A custom Scratch Pad entry was made to calculate the orientation along the distance field by getting the surface normal data at the location of the particle. This was then used to ensure the Roaches always orientated to the surface they were on.

RoachesNiagaraSP.jpg

TORCH DATA BLUEPRINT

The blueprint passes the light position, cone size and light direction into the Niagara system. This is then updated on a tick, so that the Roaches react to the light. This data is attached to a blueprint that I select the Roaches Niagara system in the level to use. This is useful as it can affect multiple instances of the Niagara effect.

BPRoachLight.jpg
bottom of page