This is a new set where I experiment metaballs based on Perlin noise, and more based on electrical fields. You can find out more about it on the internet.
Usually, implementations of this family of objects use the marching cubes algorithm. This is indeed quite efficient when using a rasterizer, which is the rendering model used by your graphic card and DirectX/OpenGL. It’s still possible to use it in raytracing, but it’s an approximation, and you end up with a polygon mesh or a voxel buffer. I don’t like them, so I’m left with two solutions. Either I run a volumetric raytracing with a fixed step (this is raymarching, still an approximation), or I keep using the distance field raytracing I was already using so much before (this is sphere tracing). The only problem is, these things are NOT distance fields. The electrical field is a bunch of 3D gaussian “curves” mashed together, and the object is defined when its value goes above a certain threshold. Fundamentally the same for the 3D Perlin noise.
The solution here is to find out the lipschitzian constant of the field/noise, and divide it by said constant. It becomes a pseudo-distance field where you can evaluate the field/noise value at some point, and you’re 100% sure the object is placed FURTHER than this point. It fits in the sphere tracing algorithm, but in the end, it actually works like raymarching, except the step is dynamic and never overshoots behind the object.













