ParticleEffect | Overdraw & Offset & Order

As a developer, I would like more control over ParticleEffects.

In Source Engine’s Particle System, there are a few more options that provide valuable performance, aesthetic, and function benefits.

These include
minfade, maxfade (scalar a la screenspace): Fades particles with screenspace sizes.
minsize, maxsize (scalar a la screenspace): Constrains particles to screenspace sizes.

In Source, these properties are based on a particle’s percentage of screensize.

minfade, maxfade has visual and performant benefits:

  • Ground fog, generally large-particle, high-transparency environments, can cull insensibly close particles to 1 to increase performance, user control of a starting depth and clipping, resulting in visual and performance improvements.

  • firefighting games can increase opacity when near particles, reducing Performance cost and escalating tension.

  • interaction flares can maximize their visibility only when near the object, allowing for many points-of-interest without being overwhelming.

  • Ballpits, completely opaque particle fields can cull a little void around the camera, making for all sorts of zanny psychedelic effect fields.

minsize, maxsize has visual, functional, and performant benefit:

  • Blood or hitmarking: using minsize, enemies shot a very far way away will still have a visible effect.

  • Dust motes, seen in a library sun shadow can be limited to a very small min-max range so at a distance you see these sparkling pixel sized motes floating in the air, but they don’t grow to be golf ball sized bits of fuzz in the air when you approach them.


Overdraw lags even the most powerful computers. It’s optimal conditions, many transparent particles occupying 60-100% screenspace, are ameliorated by these two ranges. Said properties also greatly diversify the appropriate usage of ParticleEffects. Current patches would be intensive Luau solutions.


Offset (byStud,byUDim;inWorldspace,inScreenspace): Controlled positioning of particles.

BillboardGui already supports these four offset vectors natively. Why not ParticleEffects?

  • Auras, tags, labels and volumetric icons can be supported with WorldStud and ScreenStud offsets.

  • Gun flashes, tactical markings, and holographic sights can positioned and calibrated, by Screen or World coordinate.

  • ParticleEffects could be more naturally integrated into 2D perspectives, like Loadout Menus, for backgrounds with ScreenUDim.

AlwaysOnTop, AlwaysOnBottom (a la other particles): Simple particle sort for Z-position.

For particles used as signs and backgrounds, the exception to support basic command of layout holds desirable, much more use is found with singular sort options for ParticleEffects than elsewhere.

It has been repeatedly hammered in that OIT (complete proper Zsorting) is too expensive @Jan2018. Even if in two years we do get approximate OIT, AlwaysOnTop, AlwaysOnBottom would still guarantee order whereas approximate OIT implementations may mess up. Additionally, AlwaysOnTop, AlwaysOnBottom could serve escape-hatches for eccentric styles where correct sorting was undesired.

  • Character heatmap effects, like in Stalker, dreamlike auras that signal their location in all places and world-based screen effects.

  • Extended to Beam and Trail objects, Oceans, Shields, Masks, Cloth. Multi-layered, transparent bearing assortments with great extents in screenspace would resist flickering or clipping behind/ infront. Proper layering for up to 3 levels, technically.

  • Foilage, Icons, world-based HUDs etc. Listed insturctions and Backgrounds, either through ParticleEffects, or if the behavior was extended, Beam or Trails.

Aside: This post by @Sharksie inspires the extension to Beam, Trail Support as well in 2018.


Personal Example:

Visual and performance problems present for a dust storm:

  • It’s close to the camera, overdraw, (Solution: dust MaxSize or dust MaxFade)
  • It’s in a grass field, clipping. (Solution: dust DrawOnTop, or better, grass DrawOnBottom)

The difference between fast framerates, good looks and clippy overdraw death.

41 Likes