Got a response from Havard on LinkedIn regarding the VFX graph metaball setup. Turns out he couldn’t find the project files, although he offered me another piece of info from memory, which was that he spawned tons of particles inside a cube and used a threshold to determine which ones should be visible. I didn’t understand how that could lead to metaballs, but decided I’d try and recreate his VFX graph anyway from the limited screenshots he posted in the thread. That led me to more confusion, so I decided to try a tutorial on creating metaballs in URP, since I obviously had no idea how metaballs worked. Although I couldn’t get metaballs working after completing the first two parts of the tutorial, I was able to test them out anyways using the author’s project file and did learn some important things about metaballs, like the fact that they’re very resource-intensive. Similar to SDFs, they use an equation to draw their shape, which is why I believe Havard used cube spawning node for the particles in his implementation. If the particles are everywhere in a confined space, we can iterate through them and see if they should be visible or hidden according to the metaball formula.
Metaballs work using raytracing, so by spawning a ton of particles in a cube, we can make particles visible on the implicit surface of the metaball meshes within the box when the transforms they’re based on come within range of one another. It sounds a bit wasteful, and maybe once I figure this all out, I can design my graph so that particles are only spawned on the implicit surfaces, not within the entire box all the time.
Tags: unity vfx-graph metaballs particles urp sdf raycasting