Marching Cubes

Visualising Scalar Fields 3D: Marching Cubes Part 2 : Metaballs

July 4, 2016

Tags: , , , , , , , , , , , , , ,

Previous : Visualising Scalar Fields : Marching Cubes Part 1 : Contour Map

Related : Visualising Scalar Fields : Marching Squares Part 2 : Metaballs


This is a nice easy example! To get metaballs working, we simply need to use the Marching Cubes cases to the work done in the 2D metaballs post and apply values to our scalar field based on spheres rather than circles.

The code for the marching cubes examples can be found here and you can view the result in the Metaballs scene.

Unfortunately I haven’t had time to optimise the code (so the resolution isn’t great), but I’ve got it running with 5 balls at 60fps at the quality shown in the image below, which isn’t too shabby.

Screen Shot 2016-07-04 at 18.58.52


Previous : Visualising Scalar Fields : Marching Cubes Part 1 : Contour Map

Related : Visualising Scalar Fields : Marching Squares Part 2 : Metaballs

0 likes

Author

Your email address will not be published.