Voxel edges

Voxel edges in 200 lines

Very impressed by this slick implementation of edge detection in 3D for voxels, all done as a shader in GLSL with just over 200 lines of code. A beautiful visual experience as well, that you can enjoy on Shadertoy through the iFrame below (Hover on the image and press play).

Wikipedia:

A voxel represents a value on a regular grid in three-dimensional space. As with pixels in a bitmap, voxels themselves do not typically have their position (their coordinates) explicitly encoded along with their values. Instead, the position of a voxel is inferred based upon its position relative to other voxels (i.e., its position in the data structure that makes up a single volumetric image). In contrast to pixels and voxels, points and polygons are often explicitly represented by the coordinates of their vertices. A direct consequence of this difference is that polygons are able to efficiently represent simple 3D structures with lots of empty or homogeneously filled space, while voxels are good at representing regularly sampled spaces that are non-homogeneously filled.

Voxels are frequently used in the visualization and analysis of medical and scientific data. Some volumetric displays use voxels to describe their resolution. For example, a display might be able to show 512×512×512 voxels.

The word voxel is based on a contraction of vox (“volume”) and el (for “element”); similar formations with el for “element” include the words pixel and texel.

Screen Shot 2016-01-26 at 7.55.33 PM

Screen Shot 2016-01-26 at 7.55.34 PM

Leave a Reply