https://github.com/Scrawk/Marching-Cubes
Marching cubes in Unity
https://github.com/Scrawk/Marching-Cubes
marching-cubes marching-tetrahedron-algorithm unity voxel
Last synced: 27 days ago
JSON representation
Marching cubes in Unity
- Host: GitHub
- URL: https://github.com/Scrawk/Marching-Cubes
- Owner: Scrawk
- License: mit
- Created: 2017-06-20T23:40:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T15:04:27.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T05:19:48.365Z (10 months ago)
- Topics: marching-cubes, marching-tetrahedron-algorithm, unity, voxel
- Language: C#
- Homepage:
- Size: 465 KB
- Stars: 461
- Watchers: 20
- Forks: 69
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - Marching-Cubes - Marching cubes (Sample Project)
README
# Marching-Cubes
Using objects represented by a 3d array of data has become quite popular in games in the last few years. Voxel terrain is probable the most common application. Of course GPUs only understand triangles so the voxels have to be converted to a mesh some how.
The most common algorithm for doing this is called the marching cubes algorithm. Examples of code are very common on the internet. One of the best ones around in my opinion is this one [here](http://www.siafoo.net/snippet/100) and it is what I have based my code on. The thing I like about this code is that it also implements the marching tetrahedron algorithm that is a little more difficult to find good examples of. The marching tetrahedron algorithm produces a mesh that matches the voxel data much better than the cubes algorithm but produces far more vertices.
Update - Added the option to create smooth normals.
