NIAGARA FOLIAGE GUN

Niagara Setup –

There are two variations of this effect

  1. Foliage Gun 
  2. Foliage Bomb

 

Foliage gun spawns a random amount of grass, flowering plants and sometimes a tree. 

All of these are GPU mesh particles to keep it performance friendly.

All of the meshes scale up over time and rotate. Also they do have a random size and rotation to keep the look natural.

 

Grass and flowering plants have 3 different meshes and I select a random mesh using Particle visibility tag module/attribute where I have added a random int value.

Grass and Flower plants :

Same with the trees, I have 2 different meshes to keep things natural.

Blueprint setup for the niagara system:

One interesting challenge I had was to spawn tree collisions. This was done using blueprints.

 

I am sending the info to the blueprint whenever a tree is spawned ( it spawns every few hits randomly) Then in Blueprint I take the location of that tree particle and spawn a capsule collider at the given location.

To spawn the foliage niagara FX I have updated the blueprint with the following setting. I just take the hit location and spawn the niagara particle spawn blueprint there.

Niagara Foliage Bomb :

Setting up the grenade was quite straightforward. I just added another projectile in the firstpersonBP so when we right click it shoots the bomb.

I am spawning a grenade as the projectile and after a particular time (2.5 sec here) I spawn the grenade nigara particle system along with the cam shake and fire impulse to push surrounding physics objects with some force.

Impulse added using this blueprint

One more small challenge I had in this effect is to spawn the particles only on the flat ground, This was solved using the custom collisions.

This FX was retweeted by Unreal’s official twitter handle.