Dynamic Materials for Particle FX

Refraction / screen distortion is always great eye candy :slight_smile:

More often than not I use a spherical env map for reflections/highlights (rather than a full cube map) - normally does the job and is pretty artist friendly. If your particle is based on a normal map (possibly with alpha), then you can take the entire colour of the pixel from the env map (so you don’t need a diffuse texture).

Getting the normals in there is the trickier part - spherical env map and screen distortion both need view space normal, so there’s only one to calculate.

Depending how close the particles / effects are seen, you may be able to get away with not using a normal map at all - the ddx/ddy derivatives of a mask texture will give you view/screen space semi-normals that are close enough for jazz. If seen close, it breaks up across the 2x2 pixel blocks that the derivatives are calculated across, but at mid distance it looks fine.
This also means you only need a single channel (or summed RGB channels) mask for the shape of the particles - which can be UV-warped via a distortion texture and thresholded down to change the shape over the life of the particle. As it thresholds down there’s less range for the ddx/ddy so it starts to break up, but as long as it’s fast and not too close, it’s a cheap way to do it.

Pretty tweakable and artist-friendly as it boils down to a single mask texture for the shape of the particle (with gradient controlling how shape changes over time, optional distortion texture to warp it) and an env map for the colour (with the highlights / reflections drawn in - you can also use the env map alpha channel for controllable fresnel or other alpha effects).

Like Drew says though - the majority of the “sell” of the effect is down to the motion, so the more controllable the movement of the particles/ribbons, the more control you have over changing the texture shapes and the more options you have for scrolling and distorting UVs the better :slight_smile: