Hello there, I have a simple question for an effect I seek to achieve.
I would like to have ENORMOUS amounts of bullet holes, liquid spills, ash trails, blood splatters, etc.
But using decals for this would be absolutely HORRENDOUS for performance.
If you would want to have like 3000+ bullets holes, spills and ash from explosions rendered on screen it would rack up draw calls like crazy and produce overdraw as well as the result.
So instead I thought of using alternatives.
Meshparts
I know for a fact that Roblox can instance meshparts if they’re all the same, this easily allows you to have thousands of them visible on screen at once.
Plus, meshparts have collision so I can do basic raycasts and some math to merge things like liquid spills and blood splatters together and improve performance.
The cons
- When using meshparts I will likely be restricted to only using very basic shapes, using too many triangles for puddles and bullet holes can tax the GPU too much perhaps so liquid spills might have to look a bit sharp and have visible corners.
Beams
Beams might be a viable option as a replacement for decals.
They pretty much are decals, you can even animate them and you don’t have to apply them to the surface of a part.
The cons
-
I have no idea how beams work behind the scenes.
No idea how much draw calls it requires to draw a whole bunch of them but I suspect since they work differently that they’re more optimal than parts. -
Potential overdraw if many are overlapping?
-
Not affected by lighting as far as I know or lighting looks very basic / unrealistic.
Particles
Particles have gotten quite some upgrades over time.
If I recall you can even align them to an axis now or disable the billboarding effect so they pretty much behave similar to decals.
Particles are also very efficient as it easily allows you to have tens of thousands of them.
The cons
Particles have a maximum lifetime of 20 seconds, I’d have to spawn a new particle effect every 19 seconds to also reduce the weird flicker that appears when a particle spawns right after one despawns.
I’d also have to do some scripting to I can spawn particles with animations first but then “pause” the animation so the particle can act as a true decal.
What answers I seek
I seek to replace decals and find the most ideal replacement.
I’m fine with using meshparts really, I can model low-poly splatters in Blender.
But it only works for some art styles.
If I wanted more realistic bullet holes, spills, etc I’d have to use something more decal-like that allows the use of textures with transparency.
I want to avoid decals at all costs though because rendering a few thousands on them on screen just won’t do.
They’re terribly optimized for use in large quantities.
With all kindness, correct me if I’m wrong somewhere and if you’re someone with more knowledge and expertise on how Roblox’s graphics engine works then please educate me.
If you know better methods or alternatives I’d gladly hear them.