[HN Gopher] Smooth voxel terrain: isosurface extraction with mar...
       ___________________________________________________________________
        
       Smooth voxel terrain: isosurface extraction with marching cubes and
       surface nets
        
       Author : fanf2
       Score  : 41 points
       Date   : 2021-01-08 20:43 UTC (2 hours ago)
        
 (HTM) web link (0fps.net)
 (TXT) w3m dump (0fps.net)
        
       | mkeeter wrote:
       | Isosurface extraction is a _fascinating_ rabbit hole to go down
       | (speaking as someone that 's deep underground).
       | 
       | There's a long list of properties that you want your algorithm to
       | have:
       | 
       | - Meshes should be watertight
       | 
       | - Meshes should be manifold
       | 
       | - There should be no self-intersections
       | 
       | - Sharp features (edges and corners) should be reproduced
       | accurately, rather than blurred or bevelled
       | 
       | - Thin features should be preserved (which makes it tricky to
       | sample on a regular grid!)
       | 
       | - The mesh should be adaptive, i.e. having fewer triangles in
       | flat areas
       | 
       | It's relatively easy to get ~3 of these properties, and (last
       | time I checked) nigh impossible to get 5 or 6 in the general
       | case.
       | 
       | If you'd like to read more, Doug Moen has a comprehensive
       | overview of the literature:
       | https://github.com/curv3d/curv/blob/master/ideas/v-rep/To_Me...
       | 
       | I've also written up a 2D study of Marching Cubes (Squares) vs
       | Dual Contouring: https://www.mattkeeter.com/projects/contours/
       | 
       | And a deep dive into the math that lets you precisely position
       | vertexes in dual contouring:
       | https://www.mattkeeter.com/projects/qef
        
         | Jarred wrote:
         | I wish there was an easy and few memory allocation QEF library
         | for JavaScript.
         | 
         | Most JavaScript linear algebra libraries create multiple arrays
         | each function call and use nested arrays for matrices (rather
         | than strided arrays). This makes them unusable in meshing
         | algorithms or anything that needs to be run repeatedly &
         | quickly.
         | 
         | Its unfortunate that the easiest way to write JavaScript causes
         | lots of GC pressure (e.g. calling [].map and [].filter creates
         | new arrays each time and, if you use an anonymous function, it
         | won't get JIT'd because you're recreating the function each
         | call).
        
         | 3327 wrote:
         | Yes and try doing it over network in a multiplayer setting.
         | 
         | Pc title we have been working on foe 2 years entering Alpha
         | soon...
        
       | airstrike wrote:
       | That demo is oddly satisfying
        
       | muth02446 wrote:
       | worth mentioning: Eric Lengyel's improved Cube Marching Look-up
       | Tables:
       | 
       | http://transvoxel.org/
       | 
       | weblgl demo using them:
       | 
       | http://art.muth.org/microcosm.html#TorusBox
       | 
       | http://art.muth.org/microcosm.html#SimpleKaleidoscope
       | 
       | code: https://github.com/robertmuth/Microcosm
        
       ___________________________________________________________________
       (page generated 2021-01-08 23:00 UTC)