Monday, January 12, 2015

Robust Lit Smoke and Fire Particle Material For UE4

This is a particle material for Unreal 4 that incorporates some useful features missing from the Particle SubUV components of the particle editor.  Here are the features it incorporates:

Random Rows:
Many times when making smoke particles I will want to have a number of unique one shot flip books that are chosen from at random at the birth of the particle.  By default UE4 supports blending through a single flip book but not randomly choosing a row to start from.

Directional Pivot Offset:
Velocity aligned particles are great for explosions.  They give a great directionality to smoke, dirt, and debris.  Sometimes, instead of moving the particles outward, I just want them to point outward and then scale them and play an animation or something.

Angular Opacity Falloff:
Every once in a while when using velocity aligned particles a particle will be moving mostly towards or away from the camera.  When this happens the particle gets all skewed and can spin around it's axis.  Using an inverse fresnel falloff doesn't fix the problem but it does a good job of hiding it while it's happening.

Fake Gravity:
In another particle editor I used there was a feature called Align To Initial Velocity, this was a great feature because it allowed you to align a particle to its initial velocity, then add a gravitational force without changing the direction the particle was facing.  This was great for making big directional dirt puffs fall straight down without rotating.

Wind:
The shader probably isn't the best place to add wind, but like with fake gravity, I don't want the wind to change the direction of the velocity aligned particles.

Depth Biased Alpha Blending:
This is a very popular feature for making particles blend into the world better when they come into contact with opaque geometry.

Lit Smoke With Fire:
Lit smoke is good, and fire is good, Why not combine them into a single material?

Material Properties:
Material Domain: Surface
Blend Mode: Translucent
Shading Model: Default Lit
Everything else left default




No comments:

Post a Comment