Marching cubes #9
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
a very useful tool to have earlier in design is marching cubes. with it we could do some procedural cave generation, terrain generation, cloud rendering, or any shape that can be generated with an SDF or pseudo-SDF. Inigo Quilez's work will come in handy. CSG-based modeling could also have a jumping-off point by using this. if the marching cubes algorithm is fast enough, maybe we could do some real-time generation of complex moving shapes like metaballs.
the implementation would be pretty simple, in my opinion: the marching cubes function takes:
and spits out:
a basic implementation could:
vertex deduplication can be done in post, at the expense of processing time. the next improvement on the algorithm would be to deduplicate vertices as cubes are being marched by smartly reusing them from other cubes.
someone out there has figured out how to cache-optimize this for sure, that'll need some research tho
triplanar mapping shaders and the basic algorithm could be used to do some simple terrain generation pretty easily, as a demo.
advanced features i'd like to explore are: