Website powered by

High Performance Iso Surface function for Black and White Images

This project is a little bit different than my other ones, as this is not a 3d design, but the output of an C++ Program I wrote.
Iso Surfaces are functions which take a set of points and calculate for every point in a certain space the distance to every other point.
This technique is for example used in Blenders Metaball System, but the distance can also be displayed as a gradient texture on a 2d image.
Inspired by a tutorial (https://www.youtube.com/watch?v=ccYLb7cLB1I) I got the idea to calculate the distance to every white Pixel on a black canvas. The huge performance issue of this problem, which is generated by the fact that every pixel on an image has to be compared to every other pixel on an image got solved by implementing a mipmap representation of the image and use the average value of pixel chunks as they get further away from the current pixel. The Images show the various artefacts and smoothing methods of the algorithm.

Black and White gradient, showing fractal pattern of mipmap algorithm.
The Bethesda softworks Logo is property of Bethesda Game Studios.

Black and White gradient, showing fractal pattern of mipmap algorithm.
The Bethesda softworks Logo is property of Bethesda Game Studios.

Smoothing function to get rid of artefacts, 1 iteration

Smoothing function to get rid of artefacts, 1 iteration

2 iterations

2 iterations

3 iterations

3 iterations