The great thing about node based programming is how linear it is. When I have a issue, it’s easy for me to step through my VFX graph by disabling blocks until the problem is solved. I’ve been testing the sphere collision blocks and noticed that the bounce of particles off of the spheres helps to curb the formation of vortexes between the separate SDF attraction areas. Compare the two images below. Sphere collision is enabled on the right.
The other benefit of the sphere collision is the enhanced uniformity of the separate bodies. I’m able to compensate for a lack of metaball resolution with this node. Unfortunately, it serves as a double-edged sword when the metaballs begin to merge and causes an over-pooling of particles along metaball merge boundaries while leaving other areas devoid of particles. Compare the images below. Once again, sphere collision is enabled on the right.
It seems sphere collisions are desirable when bodies are far apart, and undesirable when bodies merge. I tried toggling the sphere collision node and the difference is immediately noticeable.
Therefore, I think the solution is to lerp between the two as metaball bodies begin to merge. As I’ve stated in previous logs, the scale of the metaballs increase as they merge, but I’m not sure by how much. I need to collect data.
# Metaballs Merged | Init. Radius = 1 | Init. Radius = 2 |
---|---|---|
0 | 1 | 2 |
1 | 1.24 | 2.54 |
2 | 1.4 | 2.8 |
3 | 1.48 | 2.96 |
4 | 1.54 | 3.1 |
5 | 1.56 | 3.15 |
No plotting is needed to see that the size increase begins to fall off as more and more metaballs merge. I need to make sense of the falloff formula used to form the metaballs and see how it can be used to determine radius size during merge.
Tags: gamedev unity vfx particles metaballs physics debugging