Marching Cubes

Visualising Scalar Fields 3D: Marching Cubes Part 3 : Terrain

July 4, 2016

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

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

Related : Visualising Scalar Fields : Marching Squares Part 1 : Contour Map

Related : Visualising Scalar Fields : Marching Squares Part 3 : Tilemaps


This example builds upon work covered in the Contour example, but instead of simply modelling a cone, I have generated the height values using noise (like the previous tilemap post). I’ve used the LibNoise library (the c# version can be found here) as I’ve been meaning to try for a while – hopefully I’ll have time to play around with it a bit more as it produces some really interesting terrains. The results (displayed in the images below and in the DesertTerrain and GrassTerrain scenes) look really nice – the first grassy terrain uses a mix of RidgedMultifractal and Perlin noise, and the desert terrain uses Voronoi noise (you can try out different ones in the demo). To finish, I’ve applied colours to the mesh using the Unity Gradient class, using the y-value of the vertex over the total height of the grid.

Screen Shot 2016-07-04 at 18.49.50

Screen Shot 2016-07-04 at 18.36.56

 

And again using 3D Simplex Noise (instead of LibNoise)


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

Related : Visualising Scalar Fields : Marching Squares Part 1 : Contour Map

Related : Visualising Scalar Fields : Marching Squares Part 3 : Tilemaps

0 likes

Author

Your email address will not be published.