Skip to content

bigos91/fastMarchingCubes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastMarchingCubes

Features:

  • 2 different triangulation tables (read Mesher.Arrays.cs)
  • Naive version, SIMD, and SIMD multithreaded.
  • No normals generated, intead they are calculated in fragment shader (ddx,ddy)
  • No comment on simd stuff - if you need explanation read https://github.com/bigos91/fastNaiveSurfaceNets it is same.
  • Cornermask calculations are done using SIMD stuff, 32 cubes at time (32x2x2 voxels), reusing values calculated from previous loop steps.

Problems:

  • Multithreaded version sometimes gives better performance results, sometimes not. No idea why.

Limitations:

  • Meshed area must have 32 voxels in Z dimension to make SIMD implementation work
  • 32x32x32 volumes, but it is possible to make it working with 32xNxM (Chunk.cs), or any size if you do not use SIMD stuff.
  • It is only meshing algorithm. No any king of world management, etc.

Requirements:

  • Unity (2020.3 works fine, dont know about previous versions)
  • CPU with SSE4.1 support (around year 2007)

Usage:

  • Clone, run, open scene [FastMarchingCubes/Scenes/SampleScene],
  • Disable everything what makes burst safe to make it faster :)

Resources:

Todo:

  • 16^3 size version
  • maybe 64^3 size version but on AVX