Szymon Kaliski

  1. Main
  2. Projects
  3. Notes
  4. Music
  5. Bio

SDF-UI

SDF-UI ↗ is a node-based DSL for generating complex shapes using SDF, GLSL and WebGL.

SDF stands for Signed Distance Function - a function which returns the shortest distance between given input point and some surface. Sign of returned value indicates if point is inside, or outside that surface. Complex scenes can be defined in terms of SDFs and calculated using raymarching.

One of the nicest properties of SDFs is ease of manipulating shapes with constructive solid geometry (CSG): intersection, union and difference can be represented as simple operations on distances from two surfaces: example of CSG operations with SDF-UI ↗

For more explanation on SDFs visit:

Project was made with react ↗, react-gl ↗, redux ↗ and immutable ↗. Some of the SDF/GLSL code was borrowed from stack.gl ↗ and hg_sdf ↗.

Live version is running on firebase: https://sdf-ui.firebaseapp.com/ ↗, and code is open sourced: szymonkaliski/SDF-UI ↗.

You can read more about process behind making this project on the blog: building SDF-UI.

Backlinks

  1. 2023-05-20SDFSheetsA Spreadsheet of Signed Distance Functions1
  2. 2018-11-25hiccup-sdfModeling with Signed Distance Functions1
  3. 2018-01-28DIY Monome1
  4. 2017-09-08Building DAS-UIKeyboard-Based Visual Programming Language2
  5. 2017-02-28Building WallgenEvolving Abstract Wallpapers with GLSL1
  6. 2017-01-31Building SDF-UINode-Based UI for Generating SDF Shaders5

148 words published on 2017-01-29let me know what you think