5 ms·
Depending on blur function the result could be identical. Rendering blurred balls means brute-force calculation of contribution of each metaball for each render
by jmiskovic 6y ago
Depending on blur function the result could be identical. Rendering blurred balls means brute-force calculation of contribution of each metaball for each rendered pixel. The larger your blurred image, the higher your fill rate will be. This would choke the performance for large number of balls. You also end up with sampled (pixelized) output which doesn't give you normals and similar geometry information.
- rezmason 6y agoIf your metaballs are mostly the same size, the blurring step can happen ahead of time with a commutative convolution, stored in the texture. Then, rather than applying a threshold to the resulting pixel/voxel contribution, you can apply a sigmoid function (or something cheaper approximating it) and get smooth edges. You can cheat normals like you can with any other sort of height map, by measuring the differences between neighboring fragments. like so: https://rezmason.net/scourge/quick_metaballs.mp4 https://rezmason.net/scourge/quick_metaballs.mp4